本文整理汇总了C++中JXWindow::PlaceAsDialogWindow方法的典型用法代码示例。如果您正苦于以下问题:C++ JXWindow::PlaceAsDialogWindow方法的具体用法?C++ JXWindow::PlaceAsDialogWindow怎么用?C++ JXWindow::PlaceAsDialogWindow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类JXWindow
的用法示例。
在下文中一共展示了JXWindow::PlaceAsDialogWindow方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: JXTextButton
//.........这里部分代码省略.........
new JXStaticText(JGetString("obj9_JXLayout::JXWMainDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,160, 120,20);
assert( obj9_JXLayout != NULL );
obj9_JXLayout->SetToLabel();
JXStaticText* obj10_JXLayout =
new JXStaticText(JGetString("obj10_JXLayout::JXWMainDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,110, 120,20);
assert( obj10_JXLayout != NULL );
obj10_JXLayout->SetToLabel();
itsCompanyName =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,110, 350,20);
assert( itsCompanyName != NULL );
itsDevURL =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,130, 350,20);
assert( itsDevURL != NULL );
itsBinaryName =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,160, 350,20);
assert( itsBinaryName != NULL );
itsSrcPrefix =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,180, 350,20);
assert( itsSrcPrefix != NULL );
itsProjectDir =
new JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,240, 290,20);
assert( itsProjectDir != NULL );
itsTemplateDir =
new JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,270, 260,20);
assert( itsTemplateDir != NULL );
itsTmplDirHistory =
new JXPathHistoryMenu(kHistoryLength, "", window,
JXWidget::kHElastic, JXWidget::kFixedTop, 450,270, 30,20);
assert( itsTmplDirHistory != NULL );
JXStaticText* obj11_JXLayout =
new JXStaticText(JGetString("obj11_JXLayout::JXWMainDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,300, 120,20);
assert( obj11_JXLayout != NULL );
obj11_JXLayout->SetToLabel();
itsOpenCmd =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 130,300, 350,20);
assert( itsOpenCmd != NULL );
// end JXLayout
const JCharacter* map[] =
{
"vers", JXWGetVersionNumberStr()
};
const JString title = JGetString(kWindowTitleID, map, sizeof(map));
window->SetTitle(title);
window->ShouldFocusWhenShow(kJTrue);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
ListenTo(itsCreateButton);
ListenTo(itsQuitButton);
ListenTo(itsHelpButton);
ListenTo(itsChooseProjDirButton);
ListenTo(itsChooseTmplDirButton);
ListenTo(itsTmplDirHistory);
itsProgramVersion->SetText("1.0.0");
itsDevURL->SetText(kDefaultURLText);
itsNeedsMDICB->SetState(kJTrue);
itsProjectDir->ShouldAllowInvalidPath();
itsProjectDir->ShouldRequireWritable();
itsProjectDir->SetText(kDefaultProjDir);
itsTemplateDir->ShouldAllowInvalidPath();
itsTemplateDir->SetText(kDefaultTemplateDir);
itsOpenCmd->SetText(kDefaultOpenCmd);
JPrefObject::ReadPrefs();
// after read prefs to overwrite itsProjectDir
if (argc == 3)
{
itsProjectDir->SetText(argv[1]);
itsProgramName->SetText(argv[2]);
itsBinaryName->SetText(argv[2]);
}
}
示例2: JXTextButton
void
THXBaseConvDirector::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 300,130, "");
assert( window != NULL );
SetWindow(window);
itsCloseButton =
new JXTextButton("Close", window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 180,100, 60,20);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts("#W^[");
itsFromValue =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 110,20, 70,20);
assert( itsFromValue != NULL );
JXStaticText* obj1 =
new JXStaticText("Convert from:", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 90,20);
assert( obj1 != NULL );
itsHelpButton =
new JXTextButton("Help", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 60,100, 60,20);
assert( itsHelpButton != NULL );
itsFromBase =
new THXBaseConvMenu(window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 190,15, 90,30);
assert( itsFromBase != NULL );
JXStaticText* obj2 =
new JXStaticText("Result:", window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,60, 90,20);
assert( obj2 != NULL );
itsToBase =
new THXBaseConvMenu(window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 190,55, 90,30);
assert( itsToBase != NULL );
itsToValue =
new JXStaticText("", kJFalse, kJTrue, NULL, window,
JXWidget::kHElastic, JXWidget::kFixedTop, 110,60, 70,20);
assert( itsToValue != NULL );
// end JXLayout
window->SetTitle("Base Conversion");
window->SetWMClass(THXGetWMClassInstance(), THXGetBaseConvWindowClass());
window->LockCurrentMinSize();
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->ShouldFocusWhenShow(kJTrue);
window->PlaceAsDialogWindow();
JXDisplay* display = GetDisplay();
JXImage* icon = new JXImage(display, display->GetColormap(), thx_base_conv_window);
assert( icon != NULL );
window->SetIcon(icon);
itsFromValue->ShouldBroadcastAllTextChanged(kJTrue); // want every keypress
ListenTo(itsFromValue);
ListenTo(itsFromBase);
ListenTo(itsToBase);
ListenTo(itsCloseButton);
ListenTo(itsHelpButton);
}
示例3: JXDownRect
void
JXSearchTextDialog::SetObjects
(
JXInputField* searchInput,
JXStringHistoryMenu* prevSearchMenu,
JXTextCheckbox* ignoreCaseCB,
JXTextCheckbox* entireWordCB,
JXTextCheckbox* wrapSearchCB,
JXTextCheckbox* searchIsRegexCB,
JXTextCheckbox* singleLineCB,
JXInputField* replaceInput,
JXStringHistoryMenu* prevReplaceMenu,
JXTextCheckbox* replaceIsRegexCB,
JXTextCheckbox* preserveCaseCB,
JXTextCheckbox* stayOpenCB,
JXTextCheckbox* retainFocusCB,
JXSearchTextButton* findFwdButton,
JXSearchTextButton* findBackButton,
JXTextButton* replaceButton,
JXSearchTextButton* replaceFindFwdButton,
JXSearchTextButton* replaceFindBackButton,
JXSearchTextButton* replaceAllFwdButton,
JXSearchTextButton* replaceAllBackButton,
JXTextButton* replaceAllInSelButton,
JXTextButton* closeButton,
JXTextButton* helpButton,
JXTextButton* qRefButton
)
{
JXWindow* window = searchInput->GetWindow();
window->SetTitle("Search text");
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
window->ShouldFocusWhenShow(kJTrue);
ListenTo(window);
itsSearchInput = searchInput;
itsPrevSearchMenu = prevSearchMenu;
itsIgnoreCaseCB = ignoreCaseCB;
itsEntireWordCB = entireWordCB;
itsWrapSearchCB = wrapSearchCB;
itsSearchIsRegexCB = searchIsRegexCB;
itsSingleLineCB = singleLineCB;
itsReplaceInput = replaceInput;
itsPrevReplaceMenu = prevReplaceMenu;
itsReplaceIsRegexCB = replaceIsRegexCB;
itsPreserveCaseCB = preserveCaseCB;
itsStayOpenCB = stayOpenCB;
itsRetainFocusCB = retainFocusCB;
itsFindFwdButton = findFwdButton;
itsFindBackButton = findBackButton;
itsReplaceButton = replaceButton;
itsReplaceFindFwdButton = replaceFindFwdButton;
itsReplaceFindBackButton = replaceFindBackButton;
itsReplaceAllFwdButton = replaceAllFwdButton;
itsReplaceAllBackButton = replaceAllBackButton;
itsReplaceAllInSelButton = replaceAllInSelButton;
itsCloseButton = closeButton;
itsHelpButton = helpButton;
itsQRefButton = qRefButton;
SetFont(JGetMonospaceFontName(), kJDefaultMonoFontSize);
// decor
const JRect wFrame = window->GetFrame();
const JRect soFrame = itsStayOpenCB->GetFrame();
JXDownRect* line =
new JXDownRect(window, JXWidget::kFixedLeft, JXWidget::kFixedTop,
soFrame.left, soFrame.top-6,
wFrame.right-10-soFrame.left, 2);
assert( line != NULL );
line->SetBorderWidth(1);
// shortcuts
itsCloseButton->SetShortcuts("#W^[");
itsIgnoreCaseCB->SetShortcuts("#I");
itsWrapSearchCB->SetShortcuts("#S");
itsEntireWordCB->SetShortcuts("#E");
itsSearchIsRegexCB->SetShortcuts("#X");
itsSingleLineCB->SetShortcuts("#T");
itsPreserveCaseCB->SetShortcuts("#P");
if (JXMenu::GetDefaultStyle() == JXMenu::kMacintoshStyle)
{
itsFindFwdButton->SetShortcuts("#G");
itsFindFwdButton->SetHint("Return / Meta-G");
itsFindBackButton->SetHint("Shift-Return / Meta-Shift-G");
//.........这里部分代码省略.........
示例4: JXScrollbarSet
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: JXRadioGroup
void
SyGFindFileDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 360,220, "");
assert( window != NULL );
itsActionRG =
new JXRadioGroup(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 10,50, 340,120);
assert( itsActionRG != NULL );
itsCloseButton =
new JXTextButton(JGetString("itsCloseButton::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 120,190, 60,20);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts(JGetString("itsCloseButton::SyGFindFileDialog::shortcuts::JXLayout"));
itsSearchButton =
new JXTextButton(JGetString("itsSearchButton::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 280,190, 60,20);
assert( itsSearchButton != NULL );
itsSearchButton->SetShortcuts(JGetString("itsSearchButton::SyGFindFileDialog::shortcuts::JXLayout"));
itsFileInput =
new JXInputField(itsActionRG,
JXWidget::kHElastic, JXWidget::kFixedTop, 35,30, 295,20);
assert( itsFileInput != NULL );
JXTextRadioButton* obj1_JXLayout =
new JXTextRadioButton(kFindFileAction, JGetString("obj1_JXLayout::SyGFindFileDialog::JXLayout"), itsActionRG,
JXWidget::kHElastic, JXWidget::kFixedTop, 10,10, 320,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetShortcuts(JGetString("obj1_JXLayout::SyGFindFileDialog::shortcuts::JXLayout"));
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 200,190, 60,20);
assert( itsHelpButton != NULL );
itsHelpButton->SetShortcuts(JGetString("itsHelpButton::SyGFindFileDialog::shortcuts::JXLayout"));
itsStayOpenCB =
new JXTextCheckbox(JGetString("itsStayOpenCB::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,190, 90,20);
assert( itsStayOpenCB != NULL );
itsExprInput =
new JXInputField(itsActionRG,
JXWidget::kHElastic, JXWidget::kFixedTop, 35,90, 295,20);
assert( itsExprInput != NULL );
JXTextRadioButton* obj2_JXLayout =
new JXTextRadioButton(kFindExprAction, JGetString("obj2_JXLayout::SyGFindFileDialog::JXLayout"), itsActionRG,
JXWidget::kHElastic, JXWidget::kFixedTop, 10,70, 320,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetShortcuts(JGetString("obj2_JXLayout::SyGFindFileDialog::shortcuts::JXLayout"));
JXStaticText* obj3_JXLayout =
new JXStaticText(JGetString("obj3_JXLayout::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 50,20);
assert( obj3_JXLayout != NULL );
obj3_JXLayout->SetToLabel();
itsPathInput =
new JXPathInput(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 70,20, 210,20);
assert( itsPathInput != NULL );
itsChoosePathButton =
new JXTextButton(JGetString("itsChoosePathButton::SyGFindFileDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 280,20, 60,20);
assert( itsChoosePathButton != NULL );
// end JXLayout
window->SetTitle("Find files");
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
window->ShouldFocusWhenShow(kJTrue);
itsActionRG->SetBorderWidth(0);
ListenTo(itsChoosePathButton);
ListenTo(itsActionRG);
ListenTo(itsSearchButton);
ListenTo(itsCloseButton);
ListenTo(itsHelpButton);
itsPathInput->ShouldAllowInvalidPath();
itsFileInput->ShouldBroadcastAllTextChanged(kJTrue);
itsFileInput->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
itsFileInput->SetFont(JGetMonospaceFontName(), kJDefaultMonoFontSize, JFontStyle());
ListenTo(itsFileInput);
itsExprInput->ShouldBroadcastAllTextChanged(kJTrue);
itsExprInput->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
itsExprInput->SetFont(JGetMonospaceFontName(), kJDefaultMonoFontSize, JFontStyle());
//.........这里部分代码省略.........
示例6: JXScrollbarSet
//.........这里部分代码省略.........
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,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0, 0, 100, 100);
assert(itsFn != NULL);
itsFn->FitToEnclosure(kJTrue, kJTrue);
itsFn->Hide();
ListenTo(itsHelpButton);
const JSize count = 10;
for (JIndex i = 1; i <= count; i++)
{
ListenTo(itsCB[i-1]);
}
window->SetTitle("Polynomial Fit");
UseModalPlacement(kJFalse);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
SetButtons(okButton, cancelButton);
}
示例7: JXTextButton
void
SyGViewManPageDialog::BuildWindow()
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 360,150, "");
assert( window != NULL );
itsCloseButton =
new JXTextButton(JGetString("itsCloseButton::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 120,120, 60,20);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts(JGetString("itsCloseButton::SyGViewManPageDialog::shortcuts::JXLayout"));
itsViewButton =
new JXTextButton(JGetString("itsViewButton::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 280,120, 60,20);
assert( itsViewButton != NULL );
itsViewButton->SetShortcuts(JGetString("itsViewButton::SyGViewManPageDialog::shortcuts::JXLayout"));
itsFnName =
new JXInputField(window,
JXWidget::kHElastic, JXWidget::kFixedTop, 20,40, 290,20);
assert( itsFnName != NULL );
JXStaticText* obj1_JXLayout =
new JXStaticText(JGetString("obj1_JXLayout::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,20, 100,20);
assert( obj1_JXLayout != NULL );
obj1_JXLayout->SetToLabel();
JXStaticText* obj2_JXLayout =
new JXStaticText(JGetString("obj2_JXLayout::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,80, 90,20);
assert( obj2_JXLayout != NULL );
obj2_JXLayout->SetToLabel();
itsAproposCheckbox =
new JXTextCheckbox(JGetString("itsAproposCheckbox::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 210,80, 80,20);
assert( itsAproposCheckbox != NULL );
itsAproposCheckbox->SetShortcuts(JGetString("itsAproposCheckbox::SyGViewManPageDialog::shortcuts::JXLayout"));
itsHelpButton =
new JXTextButton(JGetString("itsHelpButton::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 200,120, 60,20);
assert( itsHelpButton != NULL );
itsHelpButton->SetShortcuts(JGetString("itsHelpButton::SyGViewManPageDialog::shortcuts::JXLayout"));
itsFnHistoryMenu =
new JXStringHistoryMenu(kHistoryLength, "", window,
JXWidget::kFixedRight, JXWidget::kFixedTop, 310,40, 30,20);
assert( itsFnHistoryMenu != NULL );
itsManIndex =
new JXCharInput(window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 110,80, 30,20);
assert( itsManIndex != NULL );
itsStayOpenCB =
new JXTextCheckbox(JGetString("itsStayOpenCB::SyGViewManPageDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,120, 90,20);
assert( itsStayOpenCB != NULL );
// end JXLayout
window->SetTitle("Man pages");
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
window->ShouldFocusWhenShow(kJTrue);
ListenTo(itsViewButton);
ListenTo(itsCloseButton);
ListenTo(itsHelpButton);
ListenTo(itsFnHistoryMenu);
itsFnName->ShouldBroadcastAllTextChanged(kJTrue);
itsFnName->SetCharacterInWordFunction(JXChooseSaveFile::IsCharacterInWord);
ListenTo(itsFnName);
itsManIndex->SetIsRequired(kJFalse);
itsStayOpenCB->SetState(kJTrue);
UpdateDisplay();
}
示例8: JXFlatRect
void
JXTipOfTheDayDialog::BuildWindow
(
const JBoolean showStartupCB,
const JBoolean showAtStartup
)
{
// begin JXLayout
JXWindow* window = new JXWindow(this, 410,260, "");
assert( window != NULL );
JXFlatRect* sideBar =
new JXFlatRect(window,
JXWidget::kFixedLeft, JXWidget::kVElastic, 10,10, 50,200);
assert( sideBar != NULL );
sideBar->SetColor((GetColormap())->GetInactiveLabelColor());
itsCloseButton =
new JXTextButton(JGetString("itsCloseButton::JXTipOfTheDayDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 340,225, 60,20);
assert( itsCloseButton != NULL );
itsNextTipButton =
new JXTextButton(JGetString("itsNextTipButton::JXTipOfTheDayDialog::JXLayout"), window,
JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,225, 60,20);
assert( itsNextTipButton != NULL );
itsNextTipButton->SetShortcuts(JGetString("itsNextTipButton::JXTipOfTheDayDialog::shortcuts::JXLayout"));
JXImageWidget* icon =
new JXImageWidget(sideBar,
JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,15, 30,30);
assert( icon != NULL );
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(window,
JXWidget::kHElastic, JXWidget::kVElastic, 60,60, 340,150);
assert( scrollbarSet != NULL );
JXStaticText* title =
new JXStaticText(JGetString("title::JXTipOfTheDayDialog::JXLayout"), window,
JXWidget::kHElastic, JXWidget::kFixedTop, 60,10, 340,50);
assert( title != NULL );
itsShowAtStartupCB =
new JXTextCheckbox(JGetString("itsShowAtStartupCB::JXTipOfTheDayDialog::JXLayout"), window,
JXWidget::kFixedLeft, JXWidget::kFixedBottom, 10,225, 140,20);
assert( itsShowAtStartupCB != NULL );
// end JXLayout
window->SetTitle("Tip of the Day");
window->LockCurrentMinSize();
window->PlaceAsDialogWindow();
JXDisplay* display = GetDisplay();
JXImage* wIcon = new JXImage(display, jx_tip_of_the_day);
assert( wIcon != NULL );
window->SetIcon(wIcon);
sideBar->SetColor((GetColormap())->GetGrayColor(50));
icon->SetXPM(jx_tip_of_the_day, (GetColormap())->GetGrayColor(50));
title->SetBorderWidth(kJXDefaultBorderWidth);
title->TESetLeftMarginWidth(5);
title->SetBackColor(title->GetFocusColor());
title->JTextEditor::SetFont(1, title->GetTextLength(), "Times", 18,
JFontStyle(kJTrue, kJFalse, 0, kJFalse), kJTrue);
title->SetCaretLocation(1);
title->Paste("\n");
itsText =
new JXStaticText("", kJTrue, kJFalse,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 100,100);
assert( itsText != NULL );
itsText->FitToEnclosure();
itsText->TESetLeftMarginWidth(5);
itsShowAtStartupCB->SetVisible(showStartupCB);
itsShowAtStartupCB->SetState(showAtStartup);
ListenTo(itsNextTipButton);
ListenTo(itsCloseButton);
}
示例9: JXStaticText
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
}
示例10: JXMenuBar
void
GAddressBookTreeDir::BuildWindow()
{
JCoordinate w = 300;
JCoordinate minW = 250;
JCoordinate h = 500;
JCoordinate minH = 250;
JXWindow* window = new JXWindow(this, w,h, "Addresses");
assert( window != NULL );
window->SetWMClass(GMGetWMClassInstance(), GMGetAddressBookWindowClass());
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->PlaceAsDialogWindow();
window->ShouldFocusWhenShow(kJTrue);
//window->SetMinSize(200, 300);
//window->LockCurrentMinSize();
JXMenuBar* menuBar =
new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
0,0, w - kCloseButtonWidth,kJXDefaultMenuBarHeight);
assert( menuBar != NULL );
itsCloseButton =
new JXTextButton("Close", window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
w - kCloseButtonWidth,0,
kCloseButtonWidth,kJXDefaultMenuBarHeight);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts("#W"); //^[
ListenTo(itsCloseButton);
itsToolBar =
new JXToolBar(GGetPrefsMgr(), kGAddressToolBarID,
menuBar, minW, minH, window,
JXWidget::kHElastic, JXWidget::kVElastic,
0, kJXDefaultMenuBarHeight, w, h - kJXDefaultMenuBarHeight);
assert(itsToolBar != NULL);
const JSize newHeight = itsToolBar->GetWidgetEnclosure()->GetBoundsHeight();
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(itsToolBar->GetWidgetEnclosure(),
JXWidget::kHElastic,JXWidget::kVElastic,
0, 0,
w, newHeight);
assert( scrollbarSet != NULL );
JNamedTreeNode* base = new JNamedTreeNode(NULL, "");
assert(base != NULL);
itsTree = new JTree(base);
assert(itsTree != NULL);
JNamedTreeList* list = new JNamedTreeList(itsTree);
itsWidget =
new GAddressBookTreeWidget(itsTree, list, menuBar,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,w,newHeight);
assert(itsWidget != NULL);
GMDirectorMenu* menu =
new GMDirectorMenu(kWindowsMenuTitleStr, menuBar,
JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
assert(menu != NULL);
menuBar->AppendMenu(menu);
itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);
itsHelpMenu->SetMenuItems(kHelpMenuStr);
itsHelpMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsHelpMenu);
itsHelpMenu->SetItemImage(kTOCCmd, JXPM(jx_help_toc));
itsHelpMenu->SetItemImage(kThisWindowCmd, JXPM(jx_help_specific));
itsToolBar->LoadPrefs();
if (itsToolBar->IsEmpty())
{
itsWidget->AddDefaultButtcons(itsToolBar);
itsToolBar->AppendButton(itsHelpMenu, kTOCCmd);
itsToolBar->AppendButton(itsHelpMenu, kThisWindowCmd);
}
itsMenuIcon = new JXImage(window->GetDisplay(), address_entry);
assert(itsMenuIcon != NULL);
itsMenuIcon->ConvertToRemoteStorage();
}
示例11: JXScrollbarSet
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();
}
示例12: JXMenuBar
void
GMailboxTreeDir::BuildWindow()
{
JCoordinate w = 360;
JCoordinate h = 500;
JXWindow* window = new JXWindow(this, w,h, "Mailbox window");
assert( window != NULL );
window->SetWMClass(GMGetWMClassInstance(), GMGetMailboxWindowClass());
window->SetCloseAction(JXWindow::kDeactivateDirector);
window->PlaceAsDialogWindow();
window->ShouldFocusWhenShow(kJTrue);
window->LockCurrentMinSize();
JXMenuBar* menuBar =
new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop,
0,0, w - kCloseButtonWidth,kJXDefaultMenuBarHeight);
assert( menuBar != NULL );
itsCloseButton =
new JXTextButton("Close", window,
JXWidget::kFixedRight, JXWidget::kFixedTop,
w - kCloseButtonWidth,0,
kCloseButtonWidth,kJXDefaultMenuBarHeight);
assert( itsCloseButton != NULL );
itsCloseButton->SetShortcuts("#W"); //^[
ListenTo(itsCloseButton);
itsToolBar =
new JXToolBar(GGetPrefsMgr(), kGMailboxToolBarID,
menuBar, w, h, window,
JXWidget::kHElastic, JXWidget::kVElastic,
0, kJXDefaultMenuBarHeight, w, h - kJXDefaultMenuBarHeight);
assert(itsToolBar != NULL);
itsFileMenu = menuBar->AppendTextMenu(kFileMenuTitleStr);
itsFileMenu->SetMenuItems(kFileMenuStr);
itsFileMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsFileMenu);
GMPOPRetrieverMenu* popmenu =
new GMPOPRetrieverMenu(itsFileMenu, kCheckAccountCmd, menuBar);
assert(popmenu != NULL);
itsFileMenu->SetItemImage(kNewCmd, filenew);
itsFileMenu->SetItemImage(kOpenCmd, fileopen);
itsFileMenu->SetItemImage(kCheckMailCmd, check_mail);
const JSize newHeight = itsToolBar->GetWidgetEnclosure()->GetBoundsHeight();
JXScrollbarSet* scrollbarSet =
new JXScrollbarSet(itsToolBar->GetWidgetEnclosure(),
JXWidget::kHElastic,JXWidget::kVElastic,
0, 0,
w, newHeight);
assert( scrollbarSet != NULL );
GMTreeRootNode* base = new GMTreeRootNode();
assert(base != NULL);
JDirInfo* info;
if (base->GetDirInfo(&info))
{
JString regex("^$|");
regex += GMGetMailRegexStr();
info->SetContentFilter(regex);
}
itsTree = new GMFileTree(base);
assert(itsTree != NULL);
JNamedTreeList* list = new JNamedTreeList(itsTree);
itsWidget =
new GMailboxTreeWidget(itsTree, list, menuBar,
scrollbarSet, scrollbarSet->GetScrollEnclosure(),
JXWidget::kHElastic, JXWidget::kVElastic,
0,0,w,newHeight);
assert(itsWidget != NULL);
GMDirectorMenu* menu =
new GMDirectorMenu(kWindowsMenuTitleStr, menuBar,
JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10);
assert(menu != NULL);
menuBar->AppendMenu(menu);
itsPrefsMenu = menuBar->AppendTextMenu(kPrefsMenuTitleStr);
itsPrefsMenu->SetMenuItems(kPrefsMenuStr);
itsPrefsMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsPrefsMenu);
itsHelpMenu = menuBar->AppendTextMenu(kHelpMenuTitleStr);
itsHelpMenu->SetMenuItems(kHelpMenuStr);
itsHelpMenu->SetUpdateAction(JXMenu::kDisableNone);
ListenTo(itsHelpMenu);
itsHelpMenu->SetItemImage(kTOCCmd, JXPM(jx_help_toc));
itsHelpMenu->SetItemImage(kThisWindowCmd, JXPM(jx_help_specific));
itsToolBar->LoadPrefs();
if (itsToolBar->IsEmpty())
//.........这里部分代码省略.........
示例13: JXScrollbarSet
//.........这里部分代码省略.........
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();
window->AdjustSize(0, bdh - aph);
scrollbarSet1->SetSizing(JXWidget::kHElastic, JXWidget::kFixedTop);
scrollbarSet2->SetSizing(JXWidget::kHElastic, JXWidget::kVElastic);
okButton->SetSizing(JXWidget::kFixedLeft, JXWidget::kFixedBottom);
cancelButton->SetSizing(JXWidget::kFixedLeft, JXWidget::kFixedBottom);
itsHelpButton->SetSizing(JXWidget::kFixedLeft, JXWidget::kFixedBottom);
newWordButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
removeButton->SetSizing(JXWidget::kFixedRight, JXWidget::kFixedTop);
UseModalPlacement(kJFalse);
window->PlaceAsDialogWindow();
window->LockCurrentMinSize();
}