本文整理汇总了C++中JXTextButton::SetShortcuts方法的典型用法代码示例。如果您正苦于以下问题:C++ JXTextButton::SetShortcuts方法的具体用法?C++ JXTextButton::SetShortcuts怎么用?C++ JXTextButton::SetShortcuts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXTextButton
的用法示例。
在下文中一共展示了JXTextButton::SetShortcuts方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: 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();
}
示例2: JXInputField
void
GXPlotFunctionDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 500,80, "");
assert( window != NULL );
itsFunctionString =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 80,10, 220,20);
assert( itsFunctionString != NULL );
JXStaticText* obj1 =
new JXStaticText("Function:", window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,13, 60,20);
assert( obj1 != NULL );
itsEditButton =
new JXTextButton("Edit", window,
JXWidget::kHElastic, JXWidget::kVElastic, 310,10, 60,20);
assert( itsEditButton != NULL );
itsEditButton->SetShortcuts("#E");
itsVarMenu =
new JXTextMenu("Constants", window,
JXWidget::kHElastic, JXWidget::kVElastic, 380,10, 110,20);
assert( itsVarMenu != NULL );
JXTextButton* okButton =
new JXTextButton("OK", window,
JXWidget::kHElastic, JXWidget::kVElastic, 115,50, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts("^M");
JXTextButton* cancelButton =
new JXTextButton("Cancel", window,
JXWidget::kHElastic, JXWidget::kVElastic, 315,50, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts("^[");
itsClearButton =
new JXTextButton("Clear", window,
JXWidget::kHElastic, JXWidget::kVElastic, 215,50, 70,20);
assert( itsClearButton != NULL );
// end JXLayout
window->SetTitle("Function Window");
SetButtons(okButton, cancelButton);
itsVarMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsClearButton);
ListenTo(itsEditButton);
ListenTo(itsVarMenu);
}
示例3: 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();
}
示例4: JXTextButton
void
SVNGetRepoDialog::BuildWindow
(
const JCharacter* windowTitle
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 310,110, "");
assert( window != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::SVNGetRepoDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 190,80, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::SVNGetRepoDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::SVNGetRepoDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 60,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::SVNGetRepoDialog::shortcuts::JXLayout"));
itsRepoInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 240,20);
assert( itsRepoInput != NULL );
itsRepoHistoryMenu =
new JXStringHistoryMenu(kHistoryLength, "", window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 260,40, 30,20);
assert( itsRepoHistoryMenu != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::SVNGetRepoDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,20, 270,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
// end JXLayout
window->SetTitle(windowTitle);
window->LockCurrentMinSize();
SetButtons(okButton, cancelButton);
itsRepoInput->SetIsRequired();
ListenTo(itsRepoHistoryMenu);
}
示例5: JXInputField
void
GMMessageFindDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 350,120, "");
assert( window != NULL );
itsSearchInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 85,20, 200,20);
assert( itsSearchInput != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::GMMessageFindDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 25,20, 60,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
itsMessageBodyCB =
new JXTextCheckbox(JGetString("itsMessageBodyCB::GMMessageFindDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 85,50, 200,20);
assert( itsMessageBodyCB != NULL );
itsMessageBodyCB->SetShortcuts(JGetString("itsMessageBodyCB::GMMessageFindDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::GMMessageFindDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,90, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts(JGetString("cancelButton::GMMessageFindDialog::shortcuts::JXLayout"));
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::GMMessageFindDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 140,90, 70,20);
assert( itsHelpButton != NULL );
JXTextButton* searchButton =
new JXTextButton(JGetString("searchButton::GMMessageFindDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 250,90, 70,20);
assert( searchButton != NULL );
searchButton->SetShortcuts(JGetString("searchButton::GMMessageFindDialog::shortcuts::JXLayout"));
// end JXLayout
window->SetTitle("Find message");
SetButtons(searchButton, cancelButton);
}
示例6: JXTextButton
void
JXMessageDialog::BuildWindow
(
const JCharacter* message
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 330,110, "");
assert( window != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JXMessageDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 140,80, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXMessageDialog::shortcuts::JXLayout"));
JXStaticText* text =
new JXStaticText(JGetString("text::JXMessageDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 60,20, 250,50);
assert( text != NULL );
JXImageWidget* icon =
new JXImageWidget(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40);
assert( icon != NULL );
// end JXLayout
window->SetTitle("Message");
SetButtons(okButton, NULL);
Init(window, text, message, icon, jx_un_message);
}
示例7: JXTextButton
void
ResizeWidgetDialog::BuildWindow
(
const JXWidget* widget
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 160,120, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::ResizeWidgetDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 20,90, 50,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::ResizeWidgetDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 90,90, 50,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::ResizeWidgetDialog::shortcuts::JXLayout"));
itsWidth =
new JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 70,20, 70,20);
assert( itsWidth != NULL );
itsHeight =
new JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 70,50, 70,20);
assert( itsHeight != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::ResizeWidgetDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 50,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXStaticText* obj2_JXLayout =
new JXStaticText(JGetString("obj2_JXLayout::ResizeWidgetDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,50, 50,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetToLabel();
// end JXLayout
window->SetTitle("Change widget size");
SetButtons(okButton, cancelButton);
const JRect r = widget->GetBoundsGlobal();
itsWidth->SetLowerLimit(50);
itsWidth->SetUpperLimit(2000);
itsWidth->SetValue(r.width());
itsHeight->SetLowerLimit(50);
itsHeight->SetUpperLimit(2000);
itsHeight->SetValue(r.height());
}
示例8: JXTextButton
void
JXMacWinPrefsDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 350,200, "");
assert( window != NULL );
SetWindow(window);
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 209,169, 62,22);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXMacWinPrefsDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 80,170, 60,20);
assert( cancelButton != NULL );
itsMacStyleCB =
new JXTextCheckbox(JGetString("itsMacStyleCB::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 320,20);
assert( itsMacStyleCB != NULL );
itsHomeEndCB =
new JXTextCheckbox(JGetString("itsHomeEndCB::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,70, 320,20);
assert( itsHomeEndCB != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 40,40, 300,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetFontSize(10);
itsScrollCaretCB =
new JXTextCheckbox(JGetString("itsScrollCaretCB::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,100, 320,20);
assert( itsScrollCaretCB != NULL );
itsCopyWhenSelectCB =
new JXTextCheckbox(JGetString("itsCopyWhenSelectCB::JXMacWinPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,130, 320,20);
assert( itsCopyWhenSelectCB != NULL );
// end JXLayout
window->SetTitle("Macintosh / Windows / X Preferences");
SetButtons(okButton, cancelButton);
itsMacStyleCB->SetState(JI2B(JXMenu::GetDisplayStyle() == JXMenu::kMacintoshStyle));
itsHomeEndCB->SetState(JXTEBase::WillUseWindowsHomeEnd());
itsScrollCaretCB->SetState(JXTEBase::CaretWillFollowScroll());
itsCopyWhenSelectCB->SetState(JTextEditor::WillCopyWhenSelect());
}
示例9: JXStaticText
void
JXPSPageSetupDialog::BuildWindow
(
const JPSPrinter::PaperType paper,
const JPSPrinter::ImageOrientation orient
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 240,160, "");
assert( window != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::JXPSPageSetupDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 15,85, 75,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JXPSPageSetupDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 140,130, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXPSPageSetupDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXPSPageSetupDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 30,130, 70,20);
assert( cancelButton != NULL );
itsOrientation =
new JXRadioGroup(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 95,65, 94,54);
assert( itsOrientation != NULL );
JXImageRadioButton* portraitRB =
new JXImageRadioButton(1, itsOrientation,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 5,5, 40,40);
assert( portraitRB != NULL );
JXImageRadioButton* landscapeRB =
new JXImageRadioButton(2, itsOrientation,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 45,5, 40,40);
assert( landscapeRB != NULL );
itsPaperTypeMenu =
new JXTextMenu(JGetString("itsPaperTypeMenu::JXPSPageSetupDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,20, 180,30);
assert( itsPaperTypeMenu != NULL );
// end JXLayout
SetObjects(okButton, cancelButton, itsPaperTypeMenu, paper,
itsOrientation, portraitRB, landscapeRB, orient);
}
示例10: JXScrollbarSet
void
CMChooseProcessDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 390,500, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,50, 350,400);
assert( scrollbarSet != NULL );
itsProcessIDInput =
new JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 90,470, 80,20);
assert( itsProcessIDInput != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::CMChooseProcessDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,470, 70,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::CMChooseProcessDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 215,470, 60,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::CMChooseProcessDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 310,470, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CMChooseProcessDialog::shortcuts::JXLayout"));
JXStaticText* obj2_JXLayout =
new JXStaticText(JGetString("obj2_JXLayout::CMChooseProcessDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 360,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetToLabel();
// end JXLayout
window->SetTitle("Choose process");
SetButtons(okButton, cancelButton);
itsText =
new CMProcessText(this, scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert( itsText != NULL );
itsText->FitToEnclosure();
itsText->SetDefaultFont(JGetMonospaceFontName(), kJDefaultMonoFontSize);
}
示例11: JXTextButton
void
JXEPSPrintSetupDialog::BuildWindow
(
const JCharacter* fileName,
const JBoolean printPreview,
const JBoolean bw
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 370,130, "");
assert( window != NULL );
SetWindow(window);
itsChooseFileButton =
new JXTextButton(JGetString("itsChooseFileButton::JXEPSPrintSetupDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 80,20);
assert( itsChooseFileButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JXEPSPrintSetupDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 229,99, 72,22);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JXEPSPrintSetupDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXEPSPrintSetupDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 80,100, 70,20);
assert( cancelButton != NULL );
itsBWCheckbox =
new JXTextCheckbox(JGetString("itsBWCheckbox::JXEPSPrintSetupDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 190,60, 150,20);
assert( itsBWCheckbox != NULL );
itsPreviewCheckbox =
new JXTextCheckbox(JGetString("itsPreviewCheckbox::JXEPSPrintSetupDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 30,60, 130,20);
assert( itsPreviewCheckbox != NULL );
itsFileInput =
new JXFileInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 100,20, 250,20);
assert( itsFileInput != NULL );
// end JXLayout
SetObjects(okButton, cancelButton, itsFileInput, fileName, itsChooseFileButton,
itsPreviewCheckbox, printPreview, itsBWCheckbox, bw);
}
示例12: JXTextButton
void
JXOKToCloseDialog::BuildWindow
(
const JCharacter* message
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 330,110, "");
assert( window != NULL );
JXTextButton* saveButton =
new JXTextButton(JGetString("saveButton::JXOKToCloseDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,80, 60,20);
assert( saveButton != NULL );
saveButton->SetShortcuts(JGetString("saveButton::JXOKToCloseDialog::shortcuts::JXLayout"));
itsDiscardButton =
new JXTextButton(JGetString("itsDiscardButton::JXOKToCloseDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 50,80, 80,20);
assert( itsDiscardButton != NULL );
itsDiscardButton->SetShortcuts(JGetString("itsDiscardButton::JXOKToCloseDialog::shortcuts::JXLayout"));
JXStaticText* text =
new JXStaticText(JGetString("text::JXOKToCloseDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 60,20, 250,50);
assert( text != NULL );
JXImageWidget* icon =
new JXImageWidget(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 40,40);
assert( icon != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::JXOKToCloseDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 170,80, 60,20);
assert( cancelButton != NULL );
// end JXLayout
window->SetTitle("Warning");
SetButtons(saveButton, cancelButton);
ListenTo(itsDiscardButton);
Init(window, text, message, icon, jx_un_warning);
}
示例13: 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);
}
示例14: JXTextButton
void
SetElasticDialog::BuildWindow
(
const JIndex index,
const JIndex maxIndex
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 200,90, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::SetElasticDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 30,60, 50,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new 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 =
new JXIntegerInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 140,20, 40,20);
assert( itsElasticIndex != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::SetElasticDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,20, 130,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
// end JXLayout
window->SetTitle("Set elastic compartment");
SetButtons(okButton, cancelButton);
itsElasticIndex->SetValue(index);
itsElasticIndex->SetLimits(0, maxIndex);
}
示例15: JXTextButton
void
SCEditVarValueDialog::BuildWindow
(
SCCircuitVarList* varList,
const JIndex varIndex
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 210,90, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::SCEditVarValueDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,55, 60,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::SCEditVarValueDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 120,55, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::SCEditVarValueDialog::shortcuts::JXLayout"));
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::SCEditVarValueDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,20, 80,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
itsValue =
new JXFloatInput(window,
JXWidget::kHElastic, JXWidget::kVElastic, 100,20, 90,20);
assert( itsValue != NULL );
// end JXLayout
window->SetTitle("Change value");
SetButtons(okButton, cancelButton);
itsValue->SetValue(varList->GetValue(varIndex));
}