本文整理汇总了C++中JXStaticText::SetToLabel方法的典型用法代码示例。如果您正苦于以下问题:C++ JXStaticText::SetToLabel方法的具体用法?C++ JXStaticText::SetToLabel怎么用?C++ JXStaticText::SetToLabel使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXStaticText
的用法示例。
在下文中一共展示了JXStaticText::SetToLabel方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXTextButton
void
SyGNewGitRemoteDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 310,160, "");
assert( window != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::SyGNewGitRemoteDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 190,130, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::SyGNewGitRemoteDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::SyGNewGitRemoteDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,130, 60,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::SyGNewGitRemoteDialog::shortcuts::JXLayout"));
itsRemoteURLInputField =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 270,20);
assert( itsRemoteURLInputField != NULL );
JXStaticText* remoteLabel =
jnew JXStaticText(JGetString("remoteLabel::SyGNewGitRemoteDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,20, 270,20);
assert( remoteLabel != NULL );
remoteLabel->SetToLabel();
itsLocalNameInputField =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,90, 270,20);
assert( itsLocalNameInputField != NULL );
JXStaticText* localLabel =
jnew JXStaticText(JGetString("localLabel::SyGNewGitRemoteDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,70, 270,20);
assert( localLabel != NULL );
localLabel->SetToLabel();
// end JXLayout
window->SetTitle(JGetString("WindowTitle::SyGNewGitRemoteDialog"));
SetButtons(okButton, cancelButton);
itsRemoteURLInputField->SetIsRequired();
itsLocalNameInputField->SetIsRequired();
}
示例2: JXTextButton
void
JXGetStringDialog::BuildWindow
(
const JCharacter* windowTitle,
const JCharacter* prompt,
const JCharacter* initialValue,
const JBoolean password
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 310,110, "");
assert( window != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JXGetStringDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 190,80, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXGetStringDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXGetStringDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 60,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::JXGetStringDialog::shortcuts::JXLayout"));
itsInputField =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 270,20);
assert( itsInputField != NULL );
JXStaticText* promptDisplay =
new JXStaticText(JGetString("promptDisplay::JXGetStringDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,20, 270,20);
assert( promptDisplay != NULL );
promptDisplay->SetToLabel();
// end JXLayout
window->SetTitle(windowTitle);
SetButtons(okButton, cancelButton);
promptDisplay->SetText(prompt);
if (password)
{
const JRect r = itsInputField->GetFrame();
delete itsInputField;
itsInputField =
new JXPasswordInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop,
r.left, r.top, r.width(), r.height());
assert( itsInputField != NULL );
}
else if (!JStringEmpty(initialValue))
{
itsInputField->SetText(initialValue);
}
itsInputField->SetIsRequired();
}
示例3: JXTextButton
void
JXVarLenPGDirector::BuildWindow
(
JXProgressDisplay* pg,
const JCharacter* message,
const JBoolean allowCancel
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 270,80, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXVarLenPGDirector::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 190,40, 60,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::JXVarLenPGDirector::shortcuts::JXLayout"));
JXStaticText* text =
new JXStaticText(JGetString("text::JXVarLenPGDirector::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,10, 230,20);
assert( text != NULL );
text->SetToLabel();
JXStaticText* counter =
new JXStaticText(JGetString("counter::JXVarLenPGDirector::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,40, 100,20);
assert( counter != NULL );
counter->SetToLabel();
// end JXLayout
Init(window, text, message, allowCancel, cancelButton);
pg->SetItems(cancelButton, counter, NULL);
}
示例4: JXTextButton
void
JXFixLenPGDirector::BuildWindow
(
JXProgressDisplay* pg,
const JCharacter* message,
const JBoolean allowCancel
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 270,80, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXFixLenPGDirector::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 190,10, 60,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::JXFixLenPGDirector::shortcuts::JXLayout"));
JXStaticText* text =
new JXStaticText(JGetString("text::JXFixLenPGDirector::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,10, 160,20);
assert( text != NULL );
text->SetToLabel();
JXProgressIndicator* indicator =
new JXProgressIndicator(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,50, 230,10);
assert( indicator != NULL );
// end JXLayout
if (!allowCancel)
{
// expand text to fill window because Cancel button will be hidden
text->AdjustSize(indicator->GetFrameWidth() - text->GetFrameWidth(), 0);
}
Init(window, text, message, allowCancel, cancelButton);
pg->SetItems(cancelButton, NULL, indicator);
}
示例5: JXTextButton
void
SetElasticDialog::BuildWindow
(
const JIndex index,
const JIndex maxIndex
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 200,90, "");
assert( window != NULL );
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::SetElasticDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 30,60, 50,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::SetElasticDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 120,60, 50,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::SetElasticDialog::shortcuts::JXLayout"));
itsElasticIndex =
jnew JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 140,20, 40,20);
assert( itsElasticIndex != NULL );
JXStaticText* elasticLabel =
jnew JXStaticText(JGetString("elasticLabel::SetElasticDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,20, 130,20);
assert( elasticLabel != NULL );
elasticLabel->SetToLabel();
// end JXLayout
window->SetTitle("Set elastic compartment");
SetButtons(okButton, cancelButton);
itsElasticIndex->SetValue(index);
itsElasticIndex->SetLimits(0, maxIndex);
}
示例6: JXInputField
void
CBExtEditorDialog::BuildWindow
(
const JBoolean editTextLocally,
const JCharacter* editTextFileCmd,
const JCharacter* editTextFileLineCmd,
const JBoolean editBinaryLocally,
const JCharacter* editBinaryFileCmd
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 450,220, "");
assert( window != NULL );
itsEditTextFileCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,40, 230,20);
assert( itsEditTextFileCmdInput != NULL );
itsEditTextFileLineCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,60, 230,20);
assert( itsEditTextFileLineCmdInput != NULL );
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 100,190, 70,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 270,190, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CBExtEditorDialog::shortcuts::JXLayout"));
JXStaticText* editTextHint =
jnew JXStaticText(JGetString("editTextHint::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 160,80, 270,20);
assert( editTextHint != NULL );
editTextHint->SetFontSize(JGetDefaultFontSize()-2);
editTextHint->SetToLabel();
JXStaticText* editTextLabel =
jnew JXStaticText(JGetString("editTextLabel::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,40, 170,20);
assert( editTextLabel != NULL );
editTextLabel->SetToLabel();
JXStaticText* editLineLabel =
jnew JXStaticText(JGetString("editLineLabel::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,60, 170,20);
assert( editLineLabel != NULL );
editLineLabel->SetToLabel();
itsExtTextEditorCB =
jnew JXTextCheckbox(JGetString("itsExtTextEditorCB::CBExtEditorDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,20, 160,20);
assert( itsExtTextEditorCB != NULL );
itsEditBinaryFileCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,130, 230,20);
assert( itsEditBinaryFileCmdInput != NULL );
JXStaticText* editBinaryHint =
jnew JXStaticText(JGetString("editBinaryHint::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,150, 230,20);
assert( editBinaryHint != NULL );
editBinaryHint->SetFontSize(JGetDefaultFontSize()-2);
editBinaryHint->SetToLabel();
JXStaticText* editBinaryLabel =
jnew JXStaticText(JGetString("editBinaryLabel::CBExtEditorDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,130, 170,20);
assert( editBinaryLabel != NULL );
editBinaryLabel->SetToLabel();
itsExtBinaryEditorCB =
jnew JXTextCheckbox(JGetString("itsExtBinaryEditorCB::CBExtEditorDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,110, 180,20);
assert( itsExtBinaryEditorCB != NULL );
// end JXLayout
window->SetTitle("External Editor");
SetButtons(okButton, cancelButton);
itsExtTextEditorCB->SetState(!editTextLocally);
itsEditTextFileCmdInput->SetText(editTextFileCmd);
itsEditTextFileCmdInput->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
itsEditTextFileLineCmdInput->SetText(editTextFileLineCmd);
itsEditTextFileLineCmdInput->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
itsExtBinaryEditorCB->SetState(!editBinaryLocally);
itsEditBinaryFileCmdInput->SetText(editBinaryFileCmd);
itsEditBinaryFileCmdInput->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
// until we have a built-in one
itsExtBinaryEditorCB->SetState(kJTrue);
//.........这里部分代码省略.........
示例7: JXTextButton
void
GXCreatePlotDialog::BuildWindow
(
GRaggedFloatTableData* data,
const JIndex startX,
const JIndex startY,
const JIndex startXErr,
const JIndex startYErr
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 370,160, "");
assert( window != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 280,130, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::GXCreatePlotDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 180,130, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::GXCreatePlotDialog::shortcuts::JXLayout"));
itsLabelInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 115,10, 200,20);
assert( itsLabelInput != NULL );
JXStaticText* labelLabel =
jnew JXStaticText(JGetString("labelLabel::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 65,10, 50,20);
assert( labelLabel != NULL );
labelLabel->SetToLabel();
itsXMenu =
jnew JXTextMenu(JGetString("itsXMenu::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,40, 160,30);
assert( itsXMenu != NULL );
itsXErrMenu =
jnew JXTextMenu(JGetString("itsXErrMenu::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,80, 160,30);
assert( itsXErrMenu != NULL );
itsYErrMenu =
jnew JXTextMenu(JGetString("itsYErrMenu::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,80, 160,30);
assert( itsYErrMenu != NULL );
itsYMenu =
jnew JXTextMenu(JGetString("itsYMenu::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,40, 160,30);
assert( itsYMenu != NULL );
itsPlotsMenu =
jnew JXTextMenu(JGetString("itsPlotsMenu::GXCreatePlotDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,120, 130,30);
assert( itsPlotsMenu != NULL );
// end JXLayout
window->SetTitle("Choose Plot Data Columns");
SetButtons(okButton, cancelButton);
itsXErrMenu->AppendItem("None");
itsYErrMenu->AppendItem("None");
const JSize count = data->GetDataColCount();
for (JSize i = 1; i <= count; i++)
{
JString str(i);
str.Prepend("Column ");
itsXMenu->AppendItem(str);
itsXErrMenu->AppendItem(str);
itsYMenu->AppendItem(str);
itsYErrMenu->AppendItem(str);
}
itsStartX = startX;
if (startX == 0)
{
itsStartX = 1;
}
itsStartXErr = startXErr + 1;
itsStartY = startY;
if (startY == 0)
{
itsStartY = 1;
}
itsStartYErr = startYErr + 1;
//.........这里部分代码省略.........
示例8: JXIntegerInput
void
CBEditTextPrefsDialog::BuildWindow
(
CBTextDocument* doc
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 640,530, "");
assert( window != NULL );
itsTabCharCountInput =
jnew JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kVElastic, 540,130, 40,20);
assert( itsTabCharCountInput != NULL );
itsCRMLineWidthInput =
jnew JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kVElastic, 540,150, 40,20);
assert( itsCRMLineWidthInput != NULL );
itsUndoDepthInput =
jnew JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kVElastic, 540,170, 40,20);
assert( itsUndoDepthInput != NULL );
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 40,490, 60,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 220,490, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CBEditTextPrefsDialog::shortcuts::JXLayout"));
itsCreateBackupCB =
jnew JXTextCheckbox(JGetString("itsCreateBackupCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,230, 300,20);
assert( itsCreateBackupCB != NULL );
itsAutoIndentCB =
jnew JXTextCheckbox(JGetString("itsAutoIndentCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,160, 280,20);
assert( itsAutoIndentCB != NULL );
JXStaticText* spacesPerTabLabel =
jnew JXStaticText(JGetString("spacesPerTabLabel::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,130, 210,20);
assert( spacesPerTabLabel != NULL );
spacesPerTabLabel->SetToLabel();
itsExtraSpaceWindTitleCB =
jnew JXTextCheckbox(JGetString("itsExtraSpaceWindTitleCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,310, 300,20);
assert( itsExtraSpaceWindTitleCB != NULL );
itsOpenComplFileOnTopCB =
jnew JXTextCheckbox(JGetString("itsOpenComplFileOnTopCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,280, 300,20);
assert( itsOpenComplFileOnTopCB != NULL );
itsFontMenu =
jnew JXChooseMonoFont(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 280,60);
assert( itsFontMenu != NULL );
itsEmulatorMenu =
jnew JXTextMenu(JGetString("itsEmulatorMenu::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,90, 280,25);
assert( itsEmulatorMenu != NULL );
JXStaticText* undoDepthLabel =
jnew JXStaticText(JGetString("undoDepthLabel::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,170, 210,20);
assert( undoDepthLabel != NULL );
undoDepthLabel->SetToLabel();
itsUseDNDCB =
jnew JXTextCheckbox(JGetString("itsUseDNDCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,130, 280,20);
assert( itsUseDNDCB != NULL );
itsOnlyBackupIfNoneCB =
jnew JXTextCheckbox(JGetString("itsOnlyBackupIfNoneCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,250, 300,20);
assert( itsOnlyBackupIfNoneCB != NULL );
itsLeftToFrontOfTextCB =
jnew JXTextCheckbox(JGetString("itsLeftToFrontOfTextCB::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 330,450, 300,20);
assert( itsLeftToFrontOfTextCB != NULL );
itsHelpButton =
jnew JXTextButton(JGetString("itsHelpButton::CBEditTextPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 130,490, 60,20);
assert( itsHelpButton != NULL );
itsHelpButton->SetShortcuts(JGetString("itsHelpButton::CBEditTextPrefsDialog::shortcuts::JXLayout"));
//.........这里部分代码省略.........
示例9: JXScrollbarSet
void
JXSaveFileDialog::BuildWindow
(
const JCharacter* origName,
const JCharacter* prompt,
const JCharacter* message
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 310,340, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,140);
assert( scrollbarSet != NULL );
JXTextButton* saveButton =
new JXTextButton(JGetString("saveButton::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,280, 70,20);
assert( saveButton != NULL );
saveButton->SetShortcuts(JGetString("saveButton::JXSaveFileDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,310, 70,20);
assert( cancelButton != NULL );
JXTextButton* homeButton =
new JXTextButton(JGetString("homeButton::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,140, 40,20);
assert( homeButton != NULL );
JXStaticText* pathLabel =
new JXStaticText(JGetString("pathLabel::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,20, 40,20);
assert( pathLabel != NULL );
pathLabel->SetToLabel();
JXSaveFileInput* fileNameInput =
new JXSaveFileInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,310, 180,20);
assert( fileNameInput != NULL );
JXPathInput* pathInput =
new JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20);
assert( pathInput != NULL );
JXTextCheckbox* showHiddenCB =
new JXTextCheckbox(JGetString("showHiddenCB::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 130,20);
assert( showHiddenCB != NULL );
JXStaticText* promptLabel =
new JXStaticText(JGetString("promptLabel::JXSaveFileDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,290, 180,20);
assert( promptLabel != NULL );
promptLabel->SetToLabel();
JXStaticText* filterLabel =
new JXStaticText(JGetString("filterLabel::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,50, 40,20);
assert( filterLabel != NULL );
filterLabel->SetToLabel();
JXInputField* filterInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20);
assert( filterInput != NULL );
JXPathHistoryMenu* pathHistory =
new JXPathHistoryMenu(1, "", window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20);
assert( pathHistory != NULL );
JXStringHistoryMenu* filterHistory =
new JXStringHistoryMenu(1, "", window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20);
assert( filterHistory != NULL );
JXTextButton* upButton =
new JXTextButton(JGetString("upButton::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,140, 30,20);
assert( upButton != NULL );
JXNewDirButton* newDirButton =
new JXNewDirButton(window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20);
assert( newDirButton != NULL );
JXCurrentPathMenu* currPathMenu =
new JXCurrentPathMenu("/", window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20);
assert( currPathMenu != NULL );
JXTextButton* desktopButton =
new JXTextButton(JGetString("desktopButton::JXSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,160, 70,20);
//.........这里部分代码省略.........
示例10: JXTextButton
void
JX2DPlotPrintEPSDialog::BuildWindow
(
const JCharacter* fileName,
const JBoolean printPreview,
const JBoolean bw,
const JCoordinate w,
const JCoordinate h,
const Unit unit
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 370,190, "");
assert( window != NULL );
JXTextButton* chooseFileButton =
jnew JXTextButton(JGetString("chooseFileButton::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 80,20);
assert( chooseFileButton != NULL );
chooseFileButton->SetShortcuts(JGetString("chooseFileButton::JX2DPlotPrintEPSDialog::shortcuts::JXLayout"));
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 230,160, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JX2DPlotPrintEPSDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 80,160, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::JX2DPlotPrintEPSDialog::shortcuts::JXLayout"));
JXTextCheckbox* bwCB =
jnew JXTextCheckbox(JGetString("bwCB::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 190,120, 150,20);
assert( bwCB != NULL );
bwCB->SetShortcuts(JGetString("bwCB::JX2DPlotPrintEPSDialog::shortcuts::JXLayout"));
JXTextCheckbox* previewCB =
jnew JXTextCheckbox(JGetString("previewCB::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 30,120, 130,20);
assert( previewCB != NULL );
previewCB->SetShortcuts(JGetString("previewCB::JX2DPlotPrintEPSDialog::shortcuts::JXLayout"));
JXFileInput* fileInput =
jnew JXFileInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 100,20, 250,20);
assert( fileInput != NULL );
itsWidthInput =
jnew JXFloatInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 70,60, 60,20);
assert( itsWidthInput != NULL );
itsHeightInput =
jnew JXFloatInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 70,80, 60,20);
assert( itsHeightInput != NULL );
JXStaticText* widthLabel =
jnew JXStaticText(JGetString("widthLabel::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,60, 50,20);
assert( widthLabel != NULL );
widthLabel->SetToLabel();
JXStaticText* heightLabel =
jnew JXStaticText(JGetString("heightLabel::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,80, 50,20);
assert( heightLabel != NULL );
heightLabel->SetToLabel();
itsUnitMenu =
jnew JXTextMenu(JGetString("itsUnitMenu::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 130,70, 60,20);
assert( itsUnitMenu != NULL );
itsPredefSizeMenu =
jnew JXTextMenu(JGetString("itsPredefSizeMenu::JX2DPlotPrintEPSDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 220,65, 120,30);
assert( itsPredefSizeMenu != NULL );
// end JXLayout
// size
itsWidthInput->SetValue(w);
itsWidthInput->SetLowerLimit(0.01);
itsHeightInput->SetValue(h);
itsHeightInput->SetLowerLimit(0.01);
// unit
itsUnit = kPixels;
HandleUnitMenu(unit);
itsUnitMenu->SetMenuItems(kUnitMenuStr);
itsUnitMenu->SetUpdateAction(JXMenu::kDisableNone);
//.........这里部分代码省略.........
示例11: JXTextButton
void
SyGChoosePathDialog::BuildWindow
(
const JBoolean newWindow,
const JCharacter* message
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 310,400, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,310, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::SyGChoosePathDialog::shortcuts::JXLayout"));
JXTextButton* homeButton =
new JXTextButton(JGetString("homeButton::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,140, 40,20);
assert( homeButton != NULL );
homeButton->SetShortcuts(JGetString("homeButton::SyGChoosePathDialog::shortcuts::JXLayout"));
JXStaticText* pathLabel =
new JXStaticText(JGetString("pathLabel::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,20, 40,20);
assert( pathLabel != NULL );
pathLabel->SetToLabel();
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,190);
assert( scrollbarSet != NULL );
itsSelectButton =
new JXTextButton(JGetString("itsSelectButton::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,250, 70,20);
assert( itsSelectButton != NULL );
itsSelectButton->SetShortcuts(JGetString("itsSelectButton::SyGChoosePathDialog::shortcuts::JXLayout"));
JXPathInput* pathInput =
new JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20);
assert( pathInput != NULL );
JXTextCheckbox* showHiddenCB =
new JXTextCheckbox(JGetString("showHiddenCB::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 130,20);
assert( showHiddenCB != NULL );
showHiddenCB->SetShortcuts(JGetString("showHiddenCB::SyGChoosePathDialog::shortcuts::JXLayout"));
JXStaticText* filterLabel =
new JXStaticText(JGetString("filterLabel::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,50, 40,20);
assert( filterLabel != NULL );
filterLabel->SetToLabel();
JXInputField* filterInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20);
assert( filterInput != NULL );
JXStaticText* explanText =
new JXStaticText(JGetString("explanText::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,340, 270,20);
assert( explanText != NULL );
explanText->SetToLabel();
JXPathHistoryMenu* pathHistory =
new JXPathHistoryMenu(1, "", window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20);
assert( pathHistory != NULL );
JXStringHistoryMenu* filterHistory =
new JXStringHistoryMenu(1, "", window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20);
assert( filterHistory != NULL );
JXTextButton* upButton =
new JXTextButton(JGetString("upButton::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,140, 30,20);
assert( upButton != NULL );
upButton->SetShortcuts(JGetString("upButton::SyGChoosePathDialog::shortcuts::JXLayout"));
JXNewDirButton* newDirButton =
new JXNewDirButton(window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20);
assert( newDirButton != NULL );
itsNewWindowCB =
new JXTextCheckbox(JGetString("itsNewWindowCB::SyGChoosePathDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,370, 150,20);
assert( itsNewWindowCB != NULL );
itsNewWindowCB->SetShortcuts(JGetString("itsNewWindowCB::SyGChoosePathDialog::shortcuts::JXLayout"));
JXCurrentPathMenu* currPathMenu =
new JXCurrentPathMenu("/", window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 20,110, 180,20);
assert( currPathMenu != NULL );
//.........这里部分代码省略.........
示例12: JXInputField
void
JXEditWWWPrefsDialog::BuildWindow
(
const JCharacter* showURLCmd,
const JCharacter* showFileContentCmd,
const JCharacter* showFileLocationCmd,
const JCharacter* composeMailCmd
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 520,290, "");
assert( window != NULL );
itsShowURLCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 250,20, 250,20);
assert( itsShowURLCmdInput != NULL );
itsShowFileContentCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 250,80, 250,20);
assert( itsShowFileContentCmdInput != NULL );
itsShowFileLocationCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 250,140, 250,20);
assert( itsShowFileLocationCmdInput != NULL );
itsComposeMailCmdInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 250,200, 250,20);
assert( itsComposeMailCmdInput != NULL );
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 120,260, 70,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 330,260, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXEditWWWPrefsDialog::shortcuts::JXLayout"));
JXStaticText* urlVarHint =
jnew JXStaticText(JGetString("urlVarHint::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 250,40, 250,20);
assert( urlVarHint != NULL );
urlVarHint->SetToLabel();
JXStaticText* urlLabel =
jnew JXStaticText(JGetString("urlLabel::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 230,20);
assert( urlLabel != NULL );
urlLabel->SetToLabel();
JXStaticText* mailLabel =
jnew JXStaticText(JGetString("mailLabel::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,200, 230,20);
assert( mailLabel != NULL );
mailLabel->SetToLabel();
JXStaticText* mailVarHint =
jnew JXStaticText(JGetString("mailVarHint::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 250,220, 250,20);
assert( mailVarHint != NULL );
mailVarHint->SetToLabel();
JXStaticText* file1VarHint =
jnew JXStaticText(JGetString("file1VarHint::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 250,100, 250,20);
assert( file1VarHint != NULL );
file1VarHint->SetToLabel();
JXStaticText* file1Label =
jnew JXStaticText(JGetString("file1Label::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,80, 230,20);
assert( file1Label != NULL );
file1Label->SetToLabel();
JXStaticText* file2VarHint =
jnew JXStaticText(JGetString("file2VarHint::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 250,160, 250,20);
assert( file2VarHint != NULL );
file2VarHint->SetToLabel();
JXStaticText* file2Label =
jnew JXStaticText(JGetString("file2Label::JXEditWWWPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,140, 230,20);
assert( file2Label != NULL );
file2Label->SetToLabel();
// end JXLayout
window->SetTitle("Web Browser Preferences");
SetButtons(okButton, cancelButton);
const JFont& font = (window->GetFontManager())->GetDefaultMonospaceFont();
//.........这里部分代码省略.........
示例13: JXScrollbarSet
void
CBNewProjectSaveFileDialog::BuildWindow
(
const JCharacter* origName,
const JCharacter* prompt,
const JCharacter* message
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 310,500, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
jnew JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,140);
assert( scrollbarSet != NULL );
JXTextButton* saveButton =
jnew JXTextButton(JGetString("saveButton::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,280, 70,20);
assert( saveButton != NULL );
saveButton->SetShortcuts(JGetString("saveButton::CBNewProjectSaveFileDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,310, 70,20);
assert( cancelButton != NULL );
JXTextButton* homeButton =
jnew JXTextButton(JGetString("homeButton::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,140, 40,20);
assert( homeButton != NULL );
JXStaticText* pathLabel =
jnew JXStaticText(JGetString("pathLabel::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,20, 40,20);
assert( pathLabel != NULL );
pathLabel->SetToLabel();
JXSaveFileInput* fileNameInput =
jnew JXSaveFileInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,310, 180,20);
assert( fileNameInput != NULL );
JXPathInput* pathInput =
jnew JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20);
assert( pathInput != NULL );
JXTextCheckbox* showHiddenCB =
jnew JXTextCheckbox(JGetString("showHiddenCB::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 130,20);
assert( showHiddenCB != NULL );
JXStaticText* promptLabel =
jnew JXStaticText(JGetString("promptLabel::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,290, 180,20);
assert( promptLabel != NULL );
promptLabel->SetToLabel();
JXStaticText* filterLabel =
jnew JXStaticText(JGetString("filterLabel::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,50, 40,20);
assert( filterLabel != NULL );
filterLabel->SetToLabel();
JXInputField* filterInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20);
assert( filterInput != NULL );
JXStaticText* makefileTitle =
jnew JXStaticText(JGetString("makefileTitle::CBNewProjectSaveFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,420, 140,20);
assert( makefileTitle != NULL );
makefileTitle->SetToLabel();
itsMethodRG =
jnew JXRadioGroup(window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 160,390, 132,106);
assert( itsMethodRG != NULL );
JXTextRadioButton* manualRB =
jnew JXTextRadioButton(CBBuildManager::kManual, JGetString("manualRB::CBNewProjectSaveFileDialog::JXLayout"), itsMethodRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,10, 110,20);
assert( manualRB != NULL );
JXTextRadioButton* qmakeRB =
jnew JXTextRadioButton(CBBuildManager::kQMake, JGetString("qmakeRB::CBNewProjectSaveFileDialog::JXLayout"), itsMethodRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,70, 110,20);
assert( qmakeRB != NULL );
JXTextRadioButton* makemakeRB =
jnew JXTextRadioButton(CBBuildManager::kMakemake, JGetString("makemakeRB::CBNewProjectSaveFileDialog::JXLayout"), itsMethodRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,30, 110,20);
assert( makemakeRB != NULL );
JXPathHistoryMenu* pathHistory =
jnew JXPathHistoryMenu(1, "", window,
//.........这里部分代码省略.........
示例14: JXStaticText
void
CBSearchTextDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 450,470, "");
assert( window != NULL );
JXStaticText* replaceLabel =
jnew JXStaticText(JGetString("replaceLabel::CBSearchTextDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,101, 220,20);
assert( replaceLabel != NULL );
replaceLabel->SetToLabel();
JXStaticText* searchLabel =
jnew JXStaticText(JGetString("searchLabel::CBSearchTextDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,31, 220,20);
assert( searchLabel != NULL );
searchLabel->SetToLabel();
JXInputField* searchInput =
jnew JXInputField(kJTrue, kJFalse, window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,50, 220,40);
assert( searchInput != NULL );
JXInputField* replaceInput =
jnew JXInputField(kJTrue, kJFalse, window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,120, 220,40);
assert( replaceInput != NULL );
JXTextButton* closeButton =
jnew JXTextButton(JGetString("closeButton::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 320,440, 80,20);
assert( closeButton != NULL );
JXTextCheckbox* ignoreCaseCB =
jnew JXTextCheckbox(JGetString("ignoreCaseCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,180, 130,20);
assert( ignoreCaseCB != NULL );
JXTextCheckbox* wrapSearchCB =
jnew JXTextCheckbox(JGetString("wrapSearchCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,240, 130,20);
assert( wrapSearchCB != NULL );
JXTextButton* replaceButton =
jnew JXTextButton(JGetString("replaceButton::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 300,50, 140,20);
assert( replaceButton != NULL );
JXTextCheckbox* entireWordCB =
jnew JXTextCheckbox(JGetString("entireWordCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,210, 130,20);
assert( entireWordCB != NULL );
JXStringHistoryMenu* prevReplaceMenu =
jnew JXStringHistoryMenu(kHistoryLength, "", window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 250,130, 30,20);
assert( prevReplaceMenu != NULL );
JXStringHistoryMenu* prevSearchMenu =
jnew JXStringHistoryMenu(kHistoryLength, "", window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 250,60, 30,20);
assert( prevSearchMenu != NULL );
JXTextButton* helpButton =
jnew JXTextButton(JGetString("helpButton::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,440, 80,20);
assert( helpButton != NULL );
helpButton->SetShortcuts(JGetString("helpButton::CBSearchTextDialog::shortcuts::JXLayout"));
JXTextCheckbox* searchIsRegexCB =
jnew JXTextCheckbox(JGetString("searchIsRegexCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,180, 150,20);
assert( searchIsRegexCB != NULL );
JXTextCheckbox* replaceIsRegexCB =
jnew JXTextCheckbox(JGetString("replaceIsRegexCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,180, 110,20);
assert( replaceIsRegexCB != NULL );
JXTextCheckbox* singleLineCB =
jnew JXTextCheckbox(JGetString("singleLineCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,210, 150,20);
assert( singleLineCB != NULL );
JXTextCheckbox* preserveCaseCB =
jnew JXTextCheckbox(JGetString("preserveCaseCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,210, 110,20);
assert( preserveCaseCB != NULL );
JXTextButton* qRefButton =
jnew JXTextButton(JGetString("qRefButton::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 190,440, 80,20);
assert( qRefButton != NULL );
itsMultifileCB =
jnew JXTextCheckbox(JGetString("itsMultifileCB::CBSearchTextDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,360, 100,20);
assert( itsMultifileCB != NULL );
//.........这里部分代码省略.........
示例15: CMArrayExprInput
void
CMArray1DDir::BuildWindow()
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 300,500, "");
assert( window != NULL );
itsExprInput =
jnew CMArrayExprInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 110,40, 170,20);
assert( itsExprInput != NULL );
JXStaticText* startLabel =
jnew JXStaticText(JGetString("startLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,70, 90,20);
assert( startLabel != NULL );
startLabel->SetToLabel();
JXStaticText* endLabel =
jnew JXStaticText(JGetString("endLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,100, 90,20);
assert( endLabel != NULL );
endLabel->SetToLabel();
itsStopButton =
jnew JXTextButton(JGetString("itsStopButton::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 200,85, 60,20);
assert( itsStopButton != NULL );
itsStopButton->SetShortcuts(JGetString("itsStopButton::CMArray1DDir::shortcuts::JXLayout"));
JXMenuBar* menuBar =
jnew JXMenuBar(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, 300,30);
assert( menuBar != NULL );
JXScrollbarSet* scrollbarSet =
jnew JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 0,130, 300,370);
assert( scrollbarSet != NULL );
itsStartIndex =
jnew CMArrayIndexInput(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 110,70, 60,20);
assert( itsStartIndex != NULL );
itsEndIndex =
jnew CMArrayIndexInput(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 110,100, 60,20);
assert( itsEndIndex != NULL );
JXStaticText* exprLabel =
jnew JXStaticText(JGetString("exprLabel::CMArray1DDir::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,40, 90,20);
assert( exprLabel != NULL );
exprLabel->SetToLabel();
// end JXLayout
window->SetMinSize(300, 200);
window->ShouldFocusWhenShow(kJTrue);
window->SetWMClass(CMGetWMClassInstance(), CMGetArray1DWindowClass());
UpdateWindowTitle();
JXDisplay* display = GetDisplay();
JXImage* icon = jnew JXImage(display, medic_1d_array_window);
assert( icon != NULL );
window->SetIcon(icon);
CMGetPrefsManager()->GetWindowSize(kArray1DWindSizeID, window, kJTrue);
CMVarNode* root = itsLink->CreateVarNode();
assert( root != NULL );
itsTree = jnew JTree(root);
assert( itsTree != NULL );
JNamedTreeList* treeList = jnew JNamedTreeList(itsTree);
assert( treeList != NULL );
itsWidget =
jnew CMVarTreeWidget(itsCommandDir, kJFalse, menuBar, itsTree, treeList,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 100,100);
assert(itsWidget != NULL);
itsWidget->FitToEnclosure();
itsExprInput->SetText(itsExpr);
itsExprInput->SetIsRequired();
ListenTo(itsExprInput);
itsStartIndex->SetValue(itsRequestRange.first);
ListenTo(itsStartIndex);
itsEndIndex->SetValue(itsRequestRange.last);
ListenTo(itsEndIndex);
itsStopButton->Hide();
ListenTo(itsStopButton);
// menus
//.........这里部分代码省略.........