本文整理汇总了C++中JXTextButton类的典型用法代码示例。如果您正苦于以下问题:C++ JXTextButton类的具体用法?C++ JXTextButton怎么用?C++ JXTextButton使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了JXTextButton类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXWindow
void
GCLAlarmDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 390,250, "");
assert( window != NULL );
SetWindow(window);
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 80,220, 70,20);
assert( itsHelpButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 230,220, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::GCLAlarmDialog::shortcuts::JXLayout"));
itsStatusText =
new JXStaticText(JGetString("itsStatusText::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,140, 350,20);
assert( itsStatusText != NULL );
itsStatusText->SetFontSize(14);
itsRG =
new JXRadioGroup(window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,170, 350,45);
assert( itsRG != NULL );
JXTextRadioButton* obj1_JXLayout =
new JXTextRadioButton(1, JGetString("obj1_JXLayout::GCLAlarmDialog::JXLayout"), itsRG,
JXWidget::kHElastic, JXWidget::kVElastic, 10,0, 140,20);
assert( obj1_JXLayout != NULL );
JXTextRadioButton* obj2_JXLayout =
new JXTextRadioButton(2, JGetString("obj2_JXLayout::GCLAlarmDialog::JXLayout"), itsRG,
JXWidget::kHElastic, JXWidget::kVElastic, 10,20, 150,20);
assert( obj2_JXLayout != NULL );
itsAmountInput =
new JXIntegerInput(itsRG,
JXWidget::kHElastic, JXWidget::kVElastic, 160,0, 80,20);
assert( itsAmountInput != NULL );
itsTimeUnitMenu =
new JXTextMenu(JGetString("itsTimeUnitMenu::GCLAlarmDialog::JXLayout"), itsRG,
JXWidget::kHElastic, JXWidget::kVElastic, 240,0, 100,20);
assert( itsTimeUnitMenu != NULL );
JXStaticText* obj3_JXLayout =
new JXStaticText(JGetString("obj3_JXLayout::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,10, 350,20);
assert( obj3_JXLayout != NULL );
JXStaticText* obj4_JXLayout =
new JXStaticText(JGetString("obj4_JXLayout::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,40, 70,20);
assert( obj4_JXLayout != NULL );
obj4_JXLayout->SetFontSize(14);
const JFontStyle obj4_JXLayout_style(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetBlackColor());
obj4_JXLayout->SetFontStyle(obj4_JXLayout_style);
itsSubjectText =
new JXStaticText(JGetString("itsSubjectText::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 90,40, 280,20);
assert( itsSubjectText != NULL );
itsSubjectText->SetFontSize(14);
const JFontStyle itsSubjectText_style(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetBlackColor());
itsSubjectText->SetFontStyle(itsSubjectText_style);
JXStaticText* obj5_JXLayout =
new JXStaticText(JGetString("obj5_JXLayout::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,70, 70,20);
assert( obj5_JXLayout != NULL );
obj5_JXLayout->SetFontSize(14);
const JFontStyle obj5_JXLayout_style(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetBlackColor());
obj5_JXLayout->SetFontStyle(obj5_JXLayout_style);
itsTimeText =
new JXStaticText(JGetString("itsTimeText::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 90,70, 280,20);
assert( itsTimeText != NULL );
itsTimeText->SetFontSize(14);
const JFontStyle itsTimeText_style(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetBlackColor());
itsTimeText->SetFontStyle(itsTimeText_style);
itsDateText =
new JXStaticText(JGetString("itsDateText::GCLAlarmDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 90,100, 280,20);
assert( itsDateText != NULL );
itsDateText->SetFontSize(14);
const JFontStyle itsDateText_style(kJTrue, kJFalse, 0, kJFalse, (GetColormap())->GetBlackColor());
itsDateText->SetFontStyle(itsDateText_style);
// end JXLayout
SetButtons(okButton, NULL);
//.........这里部分代码省略.........
示例2: JXWindow
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();
//.........这里部分代码省略.........
示例3: JXWindow
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 );
//.........这里部分代码省略.........
示例4: JXWindow
void
CBEditSearchPathsDialog::BuildWindow
(
const CBDirList& dirList,
CBRelPathCSF* csf
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 370,370, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
jnew JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kFixedBottom, 20,100, 240,220);
assert( scrollbarSet != NULL );
JXTextButton* cancelButton =
jnew JXTextButton(JGetString("cancelButton::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 70,340, 70,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 230,340, 70,20);
assert( okButton != NULL );
JXStaticText* instrText =
jnew JXStaticText(JGetString("instrText::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,20, 330,70);
assert( instrText != NULL );
JXTextButton* addPathButton =
jnew JXTextButton(JGetString("addPathButton::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,110, 70,20);
assert( addPathButton != NULL );
addPathButton->SetShortcuts(JGetString("addPathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));
JXTextButton* removePathButton =
jnew JXTextButton(JGetString("removePathButton::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,140, 70,20);
assert( removePathButton != NULL );
removePathButton->SetShortcuts(JGetString("removePathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));
JXTextButton* choosePathButton =
jnew JXTextButton(JGetString("choosePathButton::CBEditSearchPathsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,190, 70,20);
assert( choosePathButton != NULL );
choosePathButton->SetShortcuts(JGetString("choosePathButton::CBEditSearchPathsDialog::shortcuts::JXLayout"));
// end JXLayout
instrText->SetText(JGetString(kInstructionsID));
window->AdjustSize(0, instrText->GetBoundsHeight() - instrText->GetFrameHeight());
instrText->SetSizing(JXWidget::kHElastic, JXWidget::kFixedTop);
scrollbarSet->SetSizing(JXWidget::kHElastic, JXWidget::kVElastic);
addPathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
removePathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
choosePathButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
window->SetTitle("Search Paths for Symbol Database");
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
UseModalPlacement(kJFalse);
SetButtons(okButton, cancelButton);
itsTable =
jnew CBPathTable(dirList, addPathButton, removePathButton,
choosePathButton, csf,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert( itsTable != NULL );
}
示例5: JXWindow
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,
//.........这里部分代码省略.........
示例6: JXWindow
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);
//.........这里部分代码省略.........
示例7: JXWindow
void
CMEditPrefsDialog::BuildWindow
(
const JCharacter* gdbCmd,
const JCharacter* jdbCmd,
const JCharacter* editFileCmd,
const JCharacter* editFileLineCmd,
const JPtrArray<JString>& cSourceSuffixes,
const JPtrArray<JString>& cHeaderSuffixes,
const JPtrArray<JString>& javaSuffixes,
const JPtrArray<JString>& phpSuffixes,
const JPtrArray<JString>& fortranSuffixes
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 450,420, "");
assert( window != NULL );
itsGDBCmd =
new CMDebuggerProgramInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 350,20);
assert( itsGDBCmd != NULL );
itsJDBCmd =
new CMDebuggerProgramInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,110, 350,20);
assert( itsJDBCmd != NULL );
itsEditFileCmdInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 190,160, 240,20);
assert( itsEditFileCmdInput != NULL );
itsEditFileLineCmdInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 190,180, 240,20);
assert( itsEditFileLineCmdInput != NULL );
itsCSourceSuffixInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 190,240, 240,20);
assert( itsCSourceSuffixInput != NULL );
itsCHeaderSuffixInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 190,260, 240,20);
assert( itsCHeaderSuffixInput != NULL );
itsJavaSuffixInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 190,290, 240,20);
assert( itsJavaSuffixInput != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 280,390, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CMEditPrefsDialog::shortcuts::JXLayout"));
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 100,390, 60,20);
assert( cancelButton != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,240, 170,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXStaticText* obj2_JXLayout =
new JXStaticText(JGetString("obj2_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,260, 170,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetToLabel();
JXStaticText* obj3_JXLayout =
new JXStaticText(JGetString("obj3_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,200, 270,20);
assert( obj3_JXLayout != NULL );
obj3_JXLayout->SetFontSize(8);
obj3_JXLayout->SetToLabel();
JXStaticText* obj4_JXLayout =
new JXStaticText(JGetString("obj4_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,160, 170,20);
assert( obj4_JXLayout != NULL );
obj4_JXLayout->SetToLabel();
JXStaticText* obj5_JXLayout =
new JXStaticText(JGetString("obj5_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,180, 170,20);
assert( obj5_JXLayout != NULL );
obj5_JXLayout->SetToLabel();
JXStaticText* obj6_JXLayout =
new JXStaticText(JGetString("obj6_JXLayout::CMEditPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 31,290, 159,20);
assert( obj6_JXLayout != NULL );
//.........这里部分代码省略.........
示例8: JXWindow
void
CMEditCommandsDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 350,370, "");
assert( window != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,10, 150,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,50, 230,280);
assert( scrollbarSet != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kVElastic, 80,340, 60,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 210,340, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CMEditCommandsDialog::shortcuts::JXLayout"));
itsNewButton =
new JXTextButton(JGetString("itsNewButton::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 260,70, 70,20);
assert( itsNewButton != NULL );
itsNewButton->SetShortcuts(JGetString("itsNewButton::CMEditCommandsDialog::shortcuts::JXLayout"));
itsRemoveButton =
new JXTextButton(JGetString("itsRemoveButton::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 260,110, 70,20);
assert( itsRemoveButton != NULL );
JXStaticText* obj2_JXLayout =
new JXStaticText(JGetString("obj2_JXLayout::CMEditCommandsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,30, 270,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetFontSize(8);
obj2_JXLayout->SetToLabel();
// end JXLayout
window->SetTitle("Edit custom gdb commands");
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
UseModalPlacement(kJFalse);
SetButtons(okButton, cancelButton);
ListenTo(itsNewButton);
ListenTo(itsRemoveButton);
itsWidget =
new CMEditCommandsTable(this, itsRemoveButton, scrollbarSet,
scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0, 10,10);
assert(itsWidget != NULL);
itsWidget->SyncWithData();
itsWidget->FitToEnclosure(kJTrue, kJTrue); // requires sync
}
示例9: JXWindow
void
GLPolyFitDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 380,450, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,40, 340,100);
assert( scrollbarSet != NULL );
itsCB[0] =
new JXTextCheckbox("0 (Constant)", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,155, 110,20);
assert( itsCB[0] != NULL );
itsCB[1] =
new JXTextCheckbox("1", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,180, 110,20);
assert( itsCB[1] != NULL );
itsCB[2] =
new JXTextCheckbox("2", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,205, 110,20);
assert( itsCB[2] != NULL );
itsCB[3] =
new JXTextCheckbox("3", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,230, 110,20);
assert( itsCB[3] != NULL );
itsCB[4] =
new JXTextCheckbox("4", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,255, 110,20);
assert( itsCB[4] != NULL );
itsCB[5] =
new JXTextCheckbox("5", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,280, 110,20);
assert( itsCB[5] != NULL );
itsCB[6] =
new JXTextCheckbox("6", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,305, 110,20);
assert( itsCB[6] != NULL );
itsCB[7] =
new JXTextCheckbox("7", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,330, 110,20);
assert( itsCB[7] != NULL );
itsCB[8] =
new JXTextCheckbox("8", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,355, 110,20);
assert( itsCB[8] != NULL );
itsCB[9] =
new JXTextCheckbox("9", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,380, 110,20);
assert( itsCB[9] != NULL );
JXStaticText* obj1 =
new JXStaticText("Powers:", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 90,158, 65,20);
assert( obj1 != NULL );
JXTextButton* cancelButton =
new JXTextButton("Cancel", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 25,415, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts("^[");
itsHelpButton =
new JXTextButton("Help", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 155,415, 70,20);
assert( itsHelpButton != NULL );
JXTextButton* okButton =
new JXTextButton("OK", window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 285,415, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts("^M");
itsNameInput =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 90,15, 270,20);
assert( itsNameInput != NULL );
JXStaticText* obj2 =
new JXStaticText("Fit name:", window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,15, 65,20);
assert( obj2 != NULL );
// end JXLayout
itsFn =
new JXExprWidget(itsVarList,
//.........这里部分代码省略.........
示例10: JXWindow
void
JXRadioGroupDialog::BuildWindow
(
const JCharacter* windowTitle,
const JCharacter* prompt,
const JPtrArray<JString>& choiceList,
const JPtrArray<JString>* shortcutList
)
{
JIndex i;
const JSize actionCount = choiceList.GetElementCount();
JXWindow* window = new JXWindow(this, 10,10, windowTitle);
assert( window != NULL );
JCoordinate y = kFirstItemTop;
// instructions
JXStaticText* instrText =
new JXStaticText(prompt, window,
JXWidget::kFixedLeft, JXWidget::kFixedTop,
kHMarginWidth,y, 0,0);
assert( instrText != NULL );
y += instrText->GetFrameHeight() + kItemVDelta;
// radio group
const JCoordinate kInitRGWidth = 10; // arbitrary, >0
itsRG =
new JXRadioGroup(window, JXWidget::kFixedLeft, JXWidget::kFixedTop,
kHMarginWidth,y,
kInitRGWidth, kItemVDelta + actionCount * kItemVSeparation);
assert( itsRG != NULL );
// choices
JCoordinate wmin = 0;
JPtrArray<JXRadioButton> buttonList(JPtrArrayT::kForgetAll, actionCount);
for (i=1; i<=actionCount; i++)
{
JXTextRadioButton* button =
new JXTextRadioButton(i, *(choiceList.NthElement(i)), itsRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop,
kRGHLMarginWidth, kItemVDelta + (i-1) * kItemVSeparation,
10,kTextHeight);
assert( button != NULL );
if (shortcutList != NULL)
{
button->SetShortcuts(*(shortcutList->NthElement(i)));
}
buttonList.Append(button);
wmin = JMax(button->GetPreferredWidth(), wmin);
}
// all choices should be the same width
for (i=1; i<=actionCount; i++)
{
(buttonList.NthElement(i))->SetSize(wmin, kTextHeight);
}
wmin += kRGHLMarginWidth + kRGHRMarginWidth;
itsRG->AdjustSize(wmin - kInitRGWidth, 0);
const JCoordinate wminInstr = instrText->GetFrameWidth();
if (wmin < wminInstr)
{
const JCoordinate delta = (wminInstr - wmin)/2;
itsRG->Move(delta, 0);
wmin = wminInstr;
}
y = (itsRG->GetFrame()).bottom + kRGButtonVDelta;
// OK and Cancel buttons
wmin += 2*kHMarginWidth;
const JCoordinate wminButton = 3*kMinButtonHMargin + 2*kButtonWidth;
if (wmin < wminButton)
{
const JCoordinate delta = (wminButton - wmin)/2;
instrText->Move(delta, 0);
itsRG->Move(delta, 0);
wmin = wminButton;
}
const JCoordinate buttonX = (wmin - 2*kButtonWidth)/3;
JXTextButton* cancelButton =
new JXTextButton("Cancel", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop,
buttonX,y, kButtonWidth,kTextHeight);
assert( cancelButton != NULL );
//.........这里部分代码省略.........
示例11: JXWindow
void
GXCreateVectorPlotDialog::BuildWindow
(
GRaggedFloatTableData* data,
const JIndex startX,
const JIndex startY,
const JIndex startX2,
const JIndex startY2
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 380,160, "");
assert( window != NULL );
itsX1Menu =
jnew JXTextMenu("X1", window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,40, 160,30);
assert( itsX1Menu != NULL );
itsY1Menu =
jnew JXTextMenu("Y1", window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,40, 170,30);
assert( itsY1Menu != NULL );
itsX2Menu =
jnew JXTextMenu("DX", window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,80, 160,30);
assert( itsX2Menu != NULL );
itsY2Menu =
jnew JXTextMenu("DY", window,
JXWidget::kHElastic, JXWidget::kVElastic, 200,80, 170,30);
assert( itsY2Menu != NULL );
JXTextButton* okButton =
jnew JXTextButton("OK", window,
JXWidget::kHElastic, JXWidget::kVElastic, 280,130, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts("^M");
JXTextButton* cancelButton =
jnew JXTextButton("Cancel", window,
JXWidget::kHElastic, JXWidget::kVElastic, 190,130, 70,20);
assert( cancelButton != NULL );
cancelButton->SetShortcuts("^[");
itsPlotsMenu =
jnew JXTextMenu("Plot:", window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,120, 130,30);
assert( itsPlotsMenu != NULL );
itsLabelInput =
jnew JXInputField(window,
JXWidget::kHElastic, JXWidget::kVElastic, 115,10, 200,20);
assert( itsLabelInput != NULL );
JXStaticText* obj1 =
jnew JXStaticText("Label:", window,
JXWidget::kHElastic, JXWidget::kVElastic, 65,13, 45,15);
assert( obj1 != NULL );
obj1->SetToLabel();
// end JXLayout
window->SetTitle("Choose Vector Data Columns");
SetButtons(okButton, cancelButton);
const JSize count = data->GetDataColCount();
for (JSize i = 1; i <= count; i++)
{
JString str(i);
str.Prepend("Column ");
itsX1Menu->AppendItem(str);
itsX2Menu->AppendItem(str);
itsY1Menu->AppendItem(str);
itsY2Menu->AppendItem(str);
}
itsStartX1 = startX;
if (startX == 0)
{
itsStartX1 = 1;
}
itsStartX2 = startX2;
if (startX2 == 0)
{
itsStartX2 = 1;
}
itsStartY1 = startY;
if (startY == 0)
{
itsStartY1 = 1;
}
itsStartY2 = startY2;
//.........这里部分代码省略.........
示例12: JXWindow
void
CBEditProjPrefsDialog::BuildWindow
(
const JBoolean reopenTextFiles,
const JBoolean doubleSpaceCompile,
const JBoolean rebuildMakefileDaily,
const CBProjectTable::DropFileAction dropFileAction
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 360,310, "");
assert( window != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 30,280, 70,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 250,280, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::CBEditProjPrefsDialog::shortcuts::JXLayout"));
itsReopenTextFilesCB =
new JXTextCheckbox(JGetString("itsReopenTextFilesCB::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 300,20);
assert( itsReopenTextFilesCB != NULL );
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 140,280, 70,20);
assert( itsHelpButton != NULL );
itsHelpButton->SetShortcuts(JGetString("itsHelpButton::CBEditProjPrefsDialog::shortcuts::JXLayout"));
itsDropFileActionRG =
new JXRadioGroup(window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 70,150, 204,114);
assert( itsDropFileActionRG != NULL );
JXTextRadioButton* obj1_JXLayout =
new JXTextRadioButton(CBProjectTable::kAbsolutePath, JGetString("obj1_JXLayout::CBEditProjPrefsDialog::JXLayout"), itsDropFileActionRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,10, 180,20);
assert( obj1_JXLayout != NULL );
JXTextRadioButton* obj2_JXLayout =
new JXTextRadioButton(CBProjectTable::kProjectRelative, JGetString("obj2_JXLayout::CBEditProjPrefsDialog::JXLayout"), itsDropFileActionRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,30, 180,20);
assert( obj2_JXLayout != NULL );
JXTextRadioButton* obj3_JXLayout =
new JXTextRadioButton(CBProjectTable::kHomeRelative, JGetString("obj3_JXLayout::CBEditProjPrefsDialog::JXLayout"), itsDropFileActionRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,50, 180,20);
assert( obj3_JXLayout != NULL );
JXStaticText* obj4_JXLayout =
new JXStaticText(JGetString("obj4_JXLayout::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,120, 330,20);
assert( obj4_JXLayout != NULL );
obj4_JXLayout->SetToLabel();
JXTextRadioButton* obj5_JXLayout =
new JXTextRadioButton(CBProjectTable::kAskPathType, JGetString("obj5_JXLayout::CBEditProjPrefsDialog::JXLayout"), itsDropFileActionRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,80, 180,20);
assert( obj5_JXLayout != NULL );
itsDoubleSpaceCB =
new JXTextCheckbox(JGetString("itsDoubleSpaceCB::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,50, 300,20);
assert( itsDoubleSpaceCB != NULL );
itsRebuildMakefileDailyCB =
new JXTextCheckbox(JGetString("itsRebuildMakefileDailyCB::CBEditProjPrefsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,80, 300,20);
assert( itsRebuildMakefileDailyCB != NULL );
// end JXLayout
window->SetTitle("Project Preferences");
SetButtons(okButton, cancelButton);
ListenTo(itsHelpButton);
itsReopenTextFilesCB->SetState(reopenTextFiles);
itsDoubleSpaceCB->SetState(doubleSpaceCompile);
itsRebuildMakefileDailyCB->SetState(rebuildMakefileDaily);
itsDropFileActionRG->SelectItem(dropFileAction);
}
示例13: JXWindow
void
JX2DCurveOptionsDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 370,260, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 10,10, 140,240);
assert( scrollbarSet != NULL );
itsCurveStyleRG =
new JXRadioGroup(window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 170,50, 184,104);
assert( itsCurveStyleRG != NULL );
itsShowCurveCB =
new JXTextCheckbox(JGetString("itsShowCurveCB::JX2DCurveOptionsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 180,20, 100,20);
assert( itsShowCurveCB != NULL );
itsShowCurveCB->SetShortcuts(JGetString("itsShowCurveCB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowLinesRB =
new JXTextRadioButton(kShowLines, JGetString("itsShowLinesRB::JX2DCurveOptionsDialog::JXLayout"), itsCurveStyleRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,50, 170,20);
assert( itsShowLinesRB != NULL );
itsShowLinesRB->SetShortcuts(JGetString("itsShowLinesRB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowBothRB =
new JXTextRadioButton(kShowBoth, JGetString("itsShowBothRB::JX2DCurveOptionsDialog::JXLayout"), itsCurveStyleRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,70, 170,20);
assert( itsShowBothRB != NULL );
itsShowBothRB->SetShortcuts(JGetString("itsShowBothRB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowSymbolsRB =
new JXTextRadioButton(kShowSymbols, JGetString("itsShowSymbolsRB::JX2DCurveOptionsDialog::JXLayout"), itsCurveStyleRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,30, 170,20);
assert( itsShowSymbolsRB != NULL );
itsShowSymbolsRB->SetShortcuts(JGetString("itsShowSymbolsRB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowPointsRB =
new JXTextRadioButton(kShowPoints, JGetString("itsShowPointsRB::JX2DCurveOptionsDialog::JXLayout"), itsCurveStyleRG,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,10, 170,20);
assert( itsShowPointsRB != NULL );
itsShowPointsRB->SetShortcuts(JGetString("itsShowPointsRB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::JX2DCurveOptionsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,230, 70,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsCancelButton =
new JXTextButton(JGetString("itsCancelButton::JX2DCurveOptionsDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 170,230, 70,20);
assert( itsCancelButton != NULL );
itsCancelButton->SetShortcuts(JGetString("itsCancelButton::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowXErrorsCB =
new JXTextCheckbox(JGetString("itsShowXErrorsCB::JX2DCurveOptionsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 180,170, 110,20);
assert( itsShowXErrorsCB != NULL );
itsShowXErrorsCB->SetShortcuts(JGetString("itsShowXErrorsCB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
itsShowYErrorsCB =
new JXTextCheckbox(JGetString("itsShowYErrorsCB::JX2DCurveOptionsDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 180,190, 110,20);
assert( itsShowYErrorsCB != NULL );
itsShowYErrorsCB->SetShortcuts(JGetString("itsShowYErrorsCB::JX2DCurveOptionsDialog::shortcuts::JXLayout"));
// end JXLayout
window->SetTitle("Curve Options");
SetButtons(okButton, NULL);
UseModalPlacement(kJFalse);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
ListenTo(itsCancelButton);
itsNameList =
new JX2DCurveNameList(*itsCurveInfo, itsCurrentIndex,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert( itsNameList != NULL );
itsNameList->FitToEnclosure();
ListenTo(itsNameList);
AdjustWidgets();
}
示例14: JXWindow
void
CBEditStylerDialog::BuildWindow
(
const JCharacter* windowTitle,
const JBoolean active,
const JCharacter** typeNames,
const JArray<JFontStyle>& typeStyles,
const JArray<CBStylerBase::WordStyle>& wordList,
const CBTextFileType fileType
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 370,390, "");
assert( window != NULL );
JXScrollbarSet* scrollbarSet1 =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 20,110, 240,110);
assert( scrollbarSet1 != NULL );
JXTextButton* cancelButton =
new JXTextButton(JGetString("cancelButton::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 40,360, 70,20);
assert( cancelButton != NULL );
JXTextButton* okButton =
new JXTextButton(JGetString("okButton::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 250,360, 70,20);
assert( okButton != NULL );
JXStaticText* instrText =
new JXStaticText(JGetString("instrText::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,50, 330,50);
assert( instrText != NULL );
JXTextButton* newWordButton =
new JXTextButton(JGetString("newWordButton::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,240, 70,20);
assert( newWordButton != NULL );
newWordButton->SetShortcuts(JGetString("newWordButton::CBEditStylerDialog::shortcuts::JXLayout"));
JXTextButton* removeButton =
new JXTextButton(JGetString("removeButton::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 280,270, 70,20);
assert( removeButton != NULL );
removeButton->SetShortcuts(JGetString("removeButton::CBEditStylerDialog::shortcuts::JXLayout"));
JXScrollbarSet* scrollbarSet2 =
new JXScrollbarSet(window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,230, 240,110);
assert( scrollbarSet2 != NULL );
itsActiveCB =
new JXTextCheckbox(JGetString("itsActiveCB::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 80,15, 220,20);
assert( itsActiveCB != NULL );
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::CBEditStylerDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 145,360, 70,20);
assert( itsHelpButton != NULL );
itsHelpButton->SetShortcuts(JGetString("itsHelpButton::CBEditStylerDialog::shortcuts::JXLayout"));
// end JXLayout
window->SetTitle(windowTitle);
SetButtons(okButton, cancelButton);
itsActiveCB->SetState(active);
instrText->SetText(JGetString(kInstructionsID));
ListenTo(itsHelpButton);
// create tables
itsTypeTable =
new CBStylerTable(typeNames, typeStyles, scrollbarSet1,
scrollbarSet1->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert( itsTypeTable != NULL );
itsTypeTable->FitToEnclosure();
itsWordTable =
new CBStylerTable(fileType, wordList, newWordButton, removeButton,
scrollbarSet2, scrollbarSet2->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10);
assert( itsWordTable != NULL );
itsWordTable->FitToEnclosure();
// adjust window size
JCoordinate rowBorderWidth;
JColorIndex rowBorderColor;
itsTypeTable->GetRowBorderInfo(&rowBorderWidth, &rowBorderColor);
const JCoordinate bdh =
JMin(itsTypeTable->GetBoundsHeight(),
kMaxTypeRowCount * itsTypeTable->GetDefaultRowHeight() +
(kMaxTypeRowCount-1) * rowBorderWidth);
const JCoordinate aph = itsTypeTable->GetApertureHeight();
//.........这里部分代码省略.........
示例15: JXWindow
void
GLAboutDialog::BuildWindow
(
const JCharacter* prevVersStr
)
{
// begin JXLayout
JXWindow* window = jnew JXWindow(this, 430,180, "");
assert( window != NULL );
JXImageWidget* gloveIcon =
jnew JXImageWidget(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,15, 50,50);
assert( gloveIcon != NULL );
JXStaticText* textWidget =
jnew JXStaticText(JGetString("textWidget::GLAboutDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kVElastic, 90,20, 330,110);
assert( textWidget != NULL );
JXImageWidget* npsIcon =
jnew JXImageWidget(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,75, 65,65);
assert( npsIcon != NULL );
JXTextButton* okButton =
jnew JXTextButton(JGetString("okButton::GLAboutDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 320,150, 60,20);
assert( okButton != NULL );
okButton->SetShortcuts(JGetString("okButton::GLAboutDialog::shortcuts::JXLayout"));
itsHelpButton =
jnew JXTextButton(JGetString("itsHelpButton::GLAboutDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 185,150, 60,20);
assert( itsHelpButton != NULL );
itsCreditsButton =
jnew JXTextButton(JGetString("itsCreditsButton::GLAboutDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 50,150, 60,20);
assert( itsCreditsButton != NULL );
// end JXLayout
window->SetTitle("About");
SetButtons(okButton, NULL);
ListenTo(itsHelpButton);
ListenTo(itsCreditsButton);
const JCharacter* map1[] =
{
"version", JGetString("VERSION"),
"copyright", JGetString("COPYRIGHT")
};
JString text = JGetString(kDescriptionID, map1, sizeof(map1));
if (!JStringEmpty(prevVersStr))
{
const JCharacter* map[] =
{
"vers", prevVersStr
};
text += JGetString(kUpgradeNoticeID);
(JGetStringManager())->Replace(&text, map, sizeof(map));
itsHelpButton->SetLabel(JGetString(kChangeButtonLabelID));
itsIsUpgradeFlag = kJTrue;
}
textWidget->SetText(text);
JXImage* image = jnew JXImage(GetDisplay(), JXPM(glove_icon));
assert(image != NULL);
gloveIcon->SetImage(image, kJTrue);
// NPS icon
image = jnew JXImage(GetDisplay(), nps);
assert( image != NULL );
npsIcon->SetImage(image, kJTrue);
const JSize bdh = textWidget->GetBoundsHeight();
const JSize aph = textWidget->GetApertureHeight();
if (bdh > aph)
{
window->AdjustSize(0, bdh - aph); // safe to calculate once bdh > aph
}
}