void SDetailsView::SetObject( UObject* InObject, bool bForceRefresh ) { TArray< TWeakObjectPtr< UObject > > ObjectWeakPtrs; ObjectWeakPtrs.Add( InObject ); SetObjects( ObjectWeakPtrs, bForceRefresh ); }
void InitializeObjects( CREATE_TABLE objtable ) /*********************************************/ { /* initialize the application specific objects */ SetObjects( objtable ); CreateMainObject(); }
void CShellContextMenu::SetObjects(LPCTSTR strObject) { // only one object is passed SetObjects ((const LPTSTR *) &strObject, 1); // and pass it to SetObjects (CStringArray &strArray) // for further processing }
void CShellContextMenu::SetObjects(CString strObject) { // only one object is passed CStringArray strArray; strArray.Add (strObject); // create a CStringArray with one element SetObjects (strArray); // and pass it to SetObjects (CStringArray &strArray) // for further processing }
void CShellContextMenu::SetObjects(const QString& strObject) { // only one object is passed QStringList strArray; strArray << strObject; // create a CStringArray with one element SetObjects (strArray); // and pass it to SetObjects (CStringArray &strArray) // for further processing }
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); }
// Release a reference count and protect against reentrancy STDMETHODIMP_(ULONG) TffdshowPageBase::NonDelegatingRelease(void) { // If the reference count drops to zero delete ourselves if (InterlockedDecrement((LONG*)&m_cRef) == 0) { m_cRef++; SetPageSite(NULL); SetObjects(0, NULL); delete this; return ULONG(0); } else { return std::max(ULONG(m_cRef), 1ul); } }
STDMETHODIMP_(ULONG) CBasePropertyPage::NonDelegatingRelease() { // If the reference count drops to zero delete ourselves if (InterlockedDecrement(&m_cRef) == 0) { m_cRef++; SetPageSite(NULL); SetObjects(0,NULL); delete this; return ULONG(0); } else { return max(ULONG(m_cRef),1ul); } }
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); }
void JXPTPrintSetupDialog::BuildWindow ( const JXPTPrinter::Destination dest, const JCharacter* printCmd, const JCharacter* fileName, const JBoolean printLineNumbers ) { // begin JXLayout JXWindow* window = new JXWindow(this, 370,220, ""); assert( window != NULL ); itsPrintCmdLabel = new JXStaticText(JGetString("itsPrintCmdLabel::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,70, 100,19); assert( itsPrintCmdLabel != NULL ); itsPrintCmdLabel->SetToLabel(); JXTextButton* okButton = new JXTextButton(JGetString("okButton::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 220,190, 70,20); assert( okButton != NULL ); okButton->SetShortcuts(JGetString("okButton::JXPTPrintSetupDialog::shortcuts::JXLayout")); JXTextButton* cancelButton = new JXTextButton(JGetString("cancelButton::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 70,190, 70,20); assert( cancelButton != NULL ); JXStaticText* obj1_JXLayout = new JXStaticText(JGetString("obj1_JXLayout::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 50,30, 80,20); assert( obj1_JXLayout != NULL ); obj1_JXLayout->SetToLabel(); itsDestination = new JXRadioGroup(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 135,20, 139,39); assert( itsDestination != NULL ); JXTextRadioButton* obj2_JXLayout = new JXTextRadioButton(1, JGetString("obj2_JXLayout::JXPTPrintSetupDialog::JXLayout"), itsDestination, JXWidget::kFixedLeft, JXWidget::kFixedTop, 5,8, 70,20); assert( obj2_JXLayout != NULL ); obj2_JXLayout->SetShortcuts(JGetString("obj2_JXLayout::JXPTPrintSetupDialog::shortcuts::JXLayout")); JXTextRadioButton* obj3_JXLayout = new JXTextRadioButton(2, JGetString("obj3_JXLayout::JXPTPrintSetupDialog::JXLayout"), itsDestination, JXWidget::kFixedLeft, JXWidget::kFixedTop, 75,8, 50,20); assert( obj3_JXLayout != NULL ); obj3_JXLayout->SetShortcuts(JGetString("obj3_JXLayout::JXPTPrintSetupDialog::shortcuts::JXLayout")); itsPrintCmd = new JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 110,70, 240,20); assert( itsPrintCmd != NULL ); itsChooseFileButton = new JXTextButton(JGetString("itsChooseFileButton::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 30,70, 80,20); assert( itsChooseFileButton != NULL ); itsChooseFileButton->SetShortcuts(JGetString("itsChooseFileButton::JXPTPrintSetupDialog::shortcuts::JXLayout")); itsCopyCount = new JXIntegerInput(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 140,110, 40,20); assert( itsCopyCount != NULL ); itsFirstPageIndex = new JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 230,150, 40,20); assert( itsFirstPageIndex != NULL ); itsLastPageIndex = new JXIntegerInput(window, JXWidget::kFixedRight, JXWidget::kFixedTop, 290,150, 40,20); assert( itsLastPageIndex != NULL ); itsPrintAllCB = new JXTextCheckbox(JGetString("itsPrintAllCB::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 40,150, 120,20); assert( itsPrintAllCB != NULL ); itsPrintAllCB->SetShortcuts(JGetString("itsPrintAllCB::JXPTPrintSetupDialog::shortcuts::JXLayout")); itsFirstPageIndexLabel = new JXStaticText(JGetString("itsFirstPageIndexLabel::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 160,150, 70,20); assert( itsFirstPageIndexLabel != NULL ); itsFirstPageIndexLabel->SetToLabel(); itsLastPageIndexLabel = new JXStaticText(JGetString("itsLastPageIndexLabel::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 270,150, 20,20); assert( itsLastPageIndexLabel != NULL ); itsLastPageIndexLabel->SetToLabel(); JXStaticText* obj4_JXLayout = new JXStaticText(JGetString("obj4_JXLayout::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 25,110, 115,20); assert( obj4_JXLayout != NULL ); obj4_JXLayout->SetToLabel(); itsPrintLineNumbersCB = new JXTextCheckbox(JGetString("itsPrintLineNumbersCB::JXPTPrintSetupDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 220,110, 130,20); assert( itsPrintLineNumbersCB != NULL ); itsPrintLineNumbersCB->SetShortcuts(JGetString("itsPrintLineNumbersCB::JXPTPrintSetupDialog::shortcuts::JXLayout")); // end JXLayout SetObjects(okButton, cancelButton, itsDestination, dest, itsPrintCmdLabel, itsPrintCmd, printCmd, itsChooseFileButton, fileName, itsCopyCount, itsPrintAllCB, itsFirstPageIndexLabel, itsFirstPageIndex, itsLastPageIndexLabel, itsLastPageIndex, itsPrintLineNumbersCB, printLineNumbers); }
void JXSaveFileDialog::BuildWindow ( const JCharacter* origName, const JCharacter* prompt, const JCharacter* message ) { // begin JXLayout JXWindow* window = new JXWindow(this, 310,340, ""); assert( window != NULL ); JXScrollbarSet* scrollbarSet = new JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,140); assert( scrollbarSet != NULL ); JXTextButton* saveButton = new JXTextButton(JGetString("saveButton::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,280, 70,20); assert( saveButton != NULL ); saveButton->SetShortcuts(JGetString("saveButton::JXSaveFileDialog::shortcuts::JXLayout")); JXTextButton* cancelButton = new JXTextButton(JGetString("cancelButton::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,310, 70,20); assert( cancelButton != NULL ); JXTextButton* homeButton = new JXTextButton(JGetString("homeButton::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,140, 40,20); assert( homeButton != NULL ); JXStaticText* pathLabel = new JXStaticText(JGetString("pathLabel::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,20, 40,20); assert( pathLabel != NULL ); pathLabel->SetToLabel(); JXSaveFileInput* fileNameInput = new JXSaveFileInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,310, 180,20); assert( fileNameInput != NULL ); JXPathInput* pathInput = new JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20); assert( pathInput != NULL ); JXTextCheckbox* showHiddenCB = new JXTextCheckbox(JGetString("showHiddenCB::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 130,20); assert( showHiddenCB != NULL ); JXStaticText* promptLabel = new JXStaticText(JGetString("promptLabel::JXSaveFileDialog::JXLayout"), window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,290, 180,20); assert( promptLabel != NULL ); promptLabel->SetToLabel(); JXStaticText* filterLabel = new JXStaticText(JGetString("filterLabel::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,50, 40,20); assert( filterLabel != NULL ); filterLabel->SetToLabel(); JXInputField* filterInput = new JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20); assert( filterInput != NULL ); JXPathHistoryMenu* pathHistory = new JXPathHistoryMenu(1, "", window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); assert( pathHistory != NULL ); JXStringHistoryMenu* filterHistory = new JXStringHistoryMenu(1, "", window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); assert( filterHistory != NULL ); JXTextButton* upButton = new JXTextButton(JGetString("upButton::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,140, 30,20); assert( upButton != NULL ); JXNewDirButton* newDirButton = new JXNewDirButton(window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20); assert( newDirButton != NULL ); JXCurrentPathMenu* currPathMenu = new JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != NULL ); JXTextButton* desktopButton = new JXTextButton(JGetString("desktopButton::JXSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,160, 70,20); assert( desktopButton != NULL ); // end JXLayout SetObjects(scrollbarSet, promptLabel, prompt, fileNameInput, origName, pathLabel, pathInput, pathHistory, filterLabel, filterInput, filterHistory, saveButton, cancelButton, upButton, homeButton, desktopButton, newDirButton, showHiddenCB, currPathMenu, message); }
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); itsUnitMenu->SetToPopupChoice(kJTrue, unit); ListenTo(itsUnitMenu); // predefined sizes itsPredefSizeMenu->SetMenuItems(kPredefSizeMenuStr); itsPredefSizeMenu->SetUpdateAction(JXMenu::kDisableNone); ListenTo(itsPredefSizeMenu); // last, because file chooser may open, and that runs FTC SetObjects(okButton, cancelButton, fileInput, fileName, chooseFileButton, previewCB, printPreview, bwCB, bw); }
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 ); itsOpenButton = new JXTextButton(JGetString("itsOpenButton::SyGChoosePathDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,280, 70,20); assert( itsOpenButton != NULL ); itsOpenButton->SetShortcuts(JGetString("itsOpenButton::SyGChoosePathDialog::shortcuts::JXLayout")); JXTextButton* desktopButton = new JXTextButton(JGetString("desktopButton::SyGChoosePathDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,160, 70,20); assert( desktopButton != NULL ); // end JXLayout itsNewWindowCB->SetState(newWindow); SetObjects(scrollbarSet, pathLabel, pathInput, pathHistory, filterLabel, filterInput, filterHistory, itsOpenButton, itsSelectButton, cancelButton, upButton, homeButton, desktopButton, newDirButton, showHiddenCB, currPathMenu, message); }
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, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); assert( pathHistory != NULL ); JXStringHistoryMenu* filterHistory = jnew JXStringHistoryMenu(1, "", window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); assert( filterHistory != NULL ); JXTextButton* upButton = jnew JXTextButton(JGetString("upButton::CBNewProjectSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,140, 30,20); assert( upButton != NULL ); JXNewDirButton* newDirButton = jnew JXNewDirButton(window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,190, 70,20); assert( newDirButton != NULL ); JXCurrentPathMenu* currPathMenu = jnew JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != NULL ); itsTemplateMenu = jnew JXTextMenu(JGetString("itsTemplateMenu::CBNewProjectSaveFileDialog::JXLayout"), window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,350, 270,30); assert( itsTemplateMenu != NULL ); JXTextRadioButton* cmakeRB = jnew JXTextRadioButton(CBBuildManager::kCMake, JGetString("cmakeRB::CBNewProjectSaveFileDialog::JXLayout"), itsMethodRG, JXWidget::kFixedLeft, JXWidget::kFixedTop, 10,50, 110,20); assert( cmakeRB != NULL ); JXTextButton* desktopButton = jnew JXTextButton(JGetString("desktopButton::CBNewProjectSaveFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,160, 70,20); assert( desktopButton != NULL ); // end JXLayout SetObjects(scrollbarSet, promptLabel, prompt, fileNameInput, origName, pathLabel, pathInput, pathHistory, filterLabel, filterInput, filterHistory, saveButton, cancelButton, upButton, homeButton, desktopButton, newDirButton, showHiddenCB, currPathMenu, message); itsMethodRG->SelectItem(itsMakefileMethod); }
void CBSearchTextDialog::BuildWindow() { // begin JXLayout JXWindow* window = jnew JXWindow(this, 450,470, ""); assert( window != NULL ); JXStaticText* replaceLabel = jnew JXStaticText(JGetString("replaceLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,101, 220,20); assert( replaceLabel != NULL ); replaceLabel->SetToLabel(); JXStaticText* searchLabel = jnew JXStaticText(JGetString("searchLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,31, 220,20); assert( searchLabel != NULL ); searchLabel->SetToLabel(); JXInputField* searchInput = jnew JXInputField(kJTrue, kJFalse, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,50, 220,40); assert( searchInput != NULL ); JXInputField* replaceInput = jnew JXInputField(kJTrue, kJFalse, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,120, 220,40); assert( replaceInput != NULL ); JXTextButton* closeButton = jnew JXTextButton(JGetString("closeButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 320,440, 80,20); assert( closeButton != NULL ); JXTextCheckbox* ignoreCaseCB = jnew JXTextCheckbox(JGetString("ignoreCaseCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,180, 130,20); assert( ignoreCaseCB != NULL ); JXTextCheckbox* wrapSearchCB = jnew JXTextCheckbox(JGetString("wrapSearchCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,240, 130,20); assert( wrapSearchCB != NULL ); JXTextButton* replaceButton = jnew JXTextButton(JGetString("replaceButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,50, 140,20); assert( replaceButton != NULL ); JXTextCheckbox* entireWordCB = jnew JXTextCheckbox(JGetString("entireWordCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,210, 130,20); assert( entireWordCB != NULL ); JXStringHistoryMenu* prevReplaceMenu = jnew JXStringHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 250,130, 30,20); assert( prevReplaceMenu != NULL ); JXStringHistoryMenu* prevSearchMenu = jnew JXStringHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 250,60, 30,20); assert( prevSearchMenu != NULL ); JXTextButton* helpButton = jnew JXTextButton(JGetString("helpButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,440, 80,20); assert( helpButton != NULL ); helpButton->SetShortcuts(JGetString("helpButton::CBSearchTextDialog::shortcuts::JXLayout")); JXTextCheckbox* searchIsRegexCB = jnew JXTextCheckbox(JGetString("searchIsRegexCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,180, 150,20); assert( searchIsRegexCB != NULL ); JXTextCheckbox* replaceIsRegexCB = jnew JXTextCheckbox(JGetString("replaceIsRegexCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,180, 110,20); assert( replaceIsRegexCB != NULL ); JXTextCheckbox* singleLineCB = jnew JXTextCheckbox(JGetString("singleLineCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,210, 150,20); assert( singleLineCB != NULL ); JXTextCheckbox* preserveCaseCB = jnew JXTextCheckbox(JGetString("preserveCaseCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,210, 110,20); assert( preserveCaseCB != NULL ); JXTextButton* qRefButton = jnew JXTextButton(JGetString("qRefButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 190,440, 80,20); assert( qRefButton != NULL ); itsMultifileCB = jnew JXTextCheckbox(JGetString("itsMultifileCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,360, 100,20); assert( itsMultifileCB != NULL ); itsMultifileCB->SetShortcuts(JGetString("itsMultifileCB::CBSearchTextDialog::shortcuts::JXLayout")); JXScrollbarSet* scrollbarSet = jnew JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 140,360, 300,60); assert( scrollbarSet != NULL ); JXStaticText* findLabel = jnew JXStaticText(JGetString("findLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 320,20, 100,20); assert( findLabel != NULL ); findLabel->SetToLabel(kJTrue); JXSearchTextButton* findBackButton = jnew JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,20, 20,20); assert( findBackButton != NULL ); JXSearchTextButton* findFwdButton = jnew JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,20, 20,20); assert( findFwdButton != NULL ); JXStaticText* replaceFindLabel = jnew JXStaticText(JGetString("replaceFindLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 320,80, 100,20); assert( replaceFindLabel != NULL ); replaceFindLabel->SetToLabel(kJTrue); JXSearchTextButton* replaceFindBackButton = jnew JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,80, 20,20); assert( replaceFindBackButton != NULL ); JXSearchTextButton* replaceFindFwdButton = jnew JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,80, 20,20); assert( replaceFindFwdButton != NULL ); JXStaticText* replaceAllLabel = jnew JXStaticText(JGetString("replaceAllLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 320,110, 100,20); assert( replaceAllLabel != NULL ); replaceAllLabel->SetToLabel(kJTrue); JXSearchTextButton* replaceAllBackButton = jnew JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,110, 20,20); assert( replaceAllBackButton != NULL ); JXSearchTextButton* replaceAllFwdButton = jnew JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,110, 20,20); assert( replaceAllFwdButton != NULL ); JXTextButton* replaceAllInSelButton = jnew JXTextButton(JGetString("replaceAllInSelButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,140, 140,20); assert( replaceAllInSelButton != NULL ); JXTextCheckbox* stayOpenCB = jnew JXTextCheckbox(JGetString("stayOpenCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,240, 150,20); assert( stayOpenCB != NULL ); JXTextCheckbox* retainFocusCB = jnew JXTextCheckbox(JGetString("retainFocusCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,240, 110,20); assert( retainFocusCB != NULL ); itsFileListMenu = jnew JXTextMenu(JGetString("itsFileListMenu::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 30,390, 90,30); assert( itsFileListMenu != NULL ); itsSearchDirCB = jnew JXTextCheckbox(JGetString("itsSearchDirCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,270, 130,20); assert( itsSearchDirCB != NULL ); itsSearchDirCB->SetShortcuts(JGetString("itsSearchDirCB::CBSearchTextDialog::shortcuts::JXLayout")); itsDirInput = jnew JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedTop, 150,270, 190,20); assert( itsDirInput != NULL ); JXStaticText* filterLabel = jnew JXStaticText(JGetString("filterLabel::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 50,300, 100,20); assert( filterLabel != NULL ); filterLabel->SetToLabel(); itsDirHistory = jnew CBSearchPathHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 340,270, 30,20); assert( itsDirHistory != NULL ); itsFileFilterInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 150,300, 190,20); assert( itsFileFilterInput != NULL ); itsFileFilterHistory = jnew CBSearchFilterHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 340,300, 30,20); assert( itsFileFilterHistory != NULL ); itsRecurseDirCB = jnew JXTextCheckbox(JGetString("itsRecurseDirCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 40,330, 215,20); assert( itsRecurseDirCB != NULL ); itsChooseDirButton = jnew JXTextButton(JGetString("itsChooseDirButton::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 380,270, 60,20); assert( itsChooseDirButton != NULL ); itsInvertFileFilterCB = jnew JXTextCheckbox(JGetString("itsInvertFileFilterCB::CBSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 380,300, 60,20); assert( itsInvertFileFilterCB != NULL ); itsPathFilterInput = jnew JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedTop, 255,330, 155,20); assert( itsPathFilterInput != NULL ); itsPathFilterHistory = jnew CBSearchFilterHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 410,330, 30,20); assert( itsPathFilterHistory != NULL ); // end JXLayout SetObjects(searchInput, prevSearchMenu, ignoreCaseCB, entireWordCB, wrapSearchCB, searchIsRegexCB, singleLineCB, replaceInput, prevReplaceMenu, replaceIsRegexCB, preserveCaseCB, stayOpenCB, retainFocusCB, findFwdButton, findBackButton, replaceButton, replaceFindFwdButton, replaceFindBackButton, replaceAllFwdButton, replaceAllBackButton, replaceAllInSelButton, closeButton, helpButton, qRefButton); ListenTo(itsSearchDirCB); ListenTo(itsDirInput); ListenTo(itsMultifileCB); itsFileList = jnew JXFileListTable(scrollbarSet, scrollbarSet->GetScrollEnclosure(), JXWidget::kHElastic, JXWidget::kVElastic, 0,0, 10,10); assert( itsFileList != NULL ); itsFileList->FitToEnclosure(); itsFileList->ShouldAcceptFileDrop(); itsFileList->BackspaceShouldRemoveSelectedFiles(); ListenTo(itsFileList); itsFileListMenu->SetMenuItems(kFileListMenuStr, "CBSearchTextDialog"); ListenTo(itsFileListMenu); ListenTo(itsChooseDirButton); ListenTo(itsDirHistory); ListenTo(itsFileFilterHistory); ListenTo(itsPathFilterHistory); const JFont& font = window->GetFontManager()->GetDefaultMonospaceFont(); itsDirInput->ShouldAllowInvalidPath(); itsDirHistory->SetDefaultFont(font, kJTrue); itsFileFilterInput->SetDefaultFont(font); itsFileFilterHistory->SetDefaultFont(font, kJTrue); itsPathFilterInput->SetDefaultFont(font); itsPathFilterHistory->SetDefaultFont(font, kJTrue); itsRecurseDirCB->SetState(kJTrue); UpdateBasePath(); ListenTo(CBGetDocumentManager()); CBPrefsManager* prefsMgr = CBGetPrefsManager(); JPrefObject::ReadPrefs(); JString fontName; JSize fontSize; prefsMgr->GetDefaultFont(&fontName, &fontSize); SetFont(fontName, fontSize); searchInput->SetCharacterInWordFunction(CBMIsCharacterInWord); replaceInput->SetCharacterInWordFunction(CBMIsCharacterInWord); // create hidden JXDocument so Meta-# shortcuts work JXDocumentMenu* fileListMenu = jnew JXDocumentMenu("", window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 0,-20, 10,10); assert( fileListMenu != NULL ); // decor const JRect wFrame = window->GetFrame(); const JRect cbFrame = itsSearchDirCB->GetFrame(); JXDownRect* line = jnew JXDownRect(window, JXWidget::kFixedLeft, JXWidget::kFixedTop, cbFrame.left, cbFrame.top-6, wFrame.right-10-cbFrame.left, 2); assert( line != NULL ); line->SetBorderWidth(1); }
void JXSearchTextDialog::BuildWindow() { // begin JXLayout JXWindow* window = new JXWindow(this, 450,310, ""); assert( window != NULL ); itsCloseButton = new JXTextButton(JGetString("itsCloseButton::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,280, 80,20); assert( itsCloseButton != NULL ); itsCloseButton->SetShortcuts(JGetString("itsCloseButton::JXSearchTextDialog::shortcuts::JXLayout")); JXStaticText* obj1_JXLayout = new JXStaticText(JGetString("obj1_JXLayout::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,30, 80,20); assert( obj1_JXLayout != NULL ); obj1_JXLayout->SetToLabel(); JXStaticText* obj2_JXLayout = new JXStaticText(JGetString("obj2_JXLayout::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,100, 90,20); assert( obj2_JXLayout != NULL ); obj2_JXLayout->SetToLabel(); itsIgnoreCaseCB = new JXTextCheckbox(JGetString("itsIgnoreCaseCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,180, 130,20); assert( itsIgnoreCaseCB != NULL ); itsIgnoreCaseCB->SetShortcuts(JGetString("itsIgnoreCaseCB::JXSearchTextDialog::shortcuts::JXLayout")); itsWrapSearchCB = new JXTextCheckbox(JGetString("itsWrapSearchCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,240, 130,20); assert( itsWrapSearchCB != NULL ); itsWrapSearchCB->SetShortcuts(JGetString("itsWrapSearchCB::JXSearchTextDialog::shortcuts::JXLayout")); itsReplaceButton = new JXTextButton(JGetString("itsReplaceButton::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,50, 140,20); assert( itsReplaceButton != NULL ); itsReplaceButton->SetShortcuts(JGetString("itsReplaceButton::JXSearchTextDialog::shortcuts::JXLayout")); itsEntireWordCB = new JXTextCheckbox(JGetString("itsEntireWordCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 20,210, 130,20); assert( itsEntireWordCB != NULL ); itsEntireWordCB->SetShortcuts(JGetString("itsEntireWordCB::JXSearchTextDialog::shortcuts::JXLayout")); itsPrevReplaceMenu = new JXStringHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 250,130, 30,20); assert( itsPrevReplaceMenu != NULL ); itsPrevSearchMenu = new JXStringHistoryMenu(kHistoryLength, "", window, JXWidget::kFixedRight, JXWidget::kFixedTop, 250,60, 30,20); assert( itsPrevSearchMenu != NULL ); itsHelpButton = new JXTextButton(JGetString("itsHelpButton::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 60,280, 80,20); assert( itsHelpButton != NULL ); itsHelpButton->SetShortcuts(JGetString("itsHelpButton::JXSearchTextDialog::shortcuts::JXLayout")); itsSearchIsRegexCB = new JXTextCheckbox(JGetString("itsSearchIsRegexCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,180, 150,20); assert( itsSearchIsRegexCB != NULL ); itsSearchIsRegexCB->SetShortcuts(JGetString("itsSearchIsRegexCB::JXSearchTextDialog::shortcuts::JXLayout")); itsReplaceIsRegexCB = new JXTextCheckbox(JGetString("itsReplaceIsRegexCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,180, 110,20); assert( itsReplaceIsRegexCB != NULL ); itsReplaceIsRegexCB->SetShortcuts(JGetString("itsReplaceIsRegexCB::JXSearchTextDialog::shortcuts::JXLayout")); itsSingleLineCB = new JXTextCheckbox(JGetString("itsSingleLineCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,210, 150,20); assert( itsSingleLineCB != NULL ); itsSingleLineCB->SetShortcuts(JGetString("itsSingleLineCB::JXSearchTextDialog::shortcuts::JXLayout")); itsPreserveCaseCB = new JXTextCheckbox(JGetString("itsPreserveCaseCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,210, 110,20); assert( itsPreserveCaseCB != NULL ); itsPreserveCaseCB->SetShortcuts(JGetString("itsPreserveCaseCB::JXSearchTextDialog::shortcuts::JXLayout")); itsQRefButton = new JXTextButton(JGetString("itsQRefButton::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 190,280, 80,20); assert( itsQRefButton != NULL ); JXStaticText* obj3_JXLayout = new JXStaticText(JGetString("obj3_JXLayout::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 355,20, 40,20); assert( obj3_JXLayout != NULL ); obj3_JXLayout->SetToLabel(); itsFindBackButton = new JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,20, 20,20); assert( itsFindBackButton != NULL ); itsFindFwdButton = new JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,20, 20,20); assert( itsFindFwdButton != NULL ); JXStaticText* obj4_JXLayout = new JXStaticText(JGetString("obj4_JXLayout::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 323,80, 100,20); assert( obj4_JXLayout != NULL ); obj4_JXLayout->SetToLabel(); itsReplaceFindBackButton = new JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,80, 20,20); assert( itsReplaceFindBackButton != NULL ); itsReplaceFindFwdButton = new JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,80, 20,20); assert( itsReplaceFindFwdButton != NULL ); JXStaticText* obj5_JXLayout = new JXStaticText(JGetString("obj5_JXLayout::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 335,110, 80,20); assert( obj5_JXLayout != NULL ); obj5_JXLayout->SetToLabel(); itsReplaceAllBackButton = new JXSearchTextButton(kJFalse, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,110, 20,20); assert( itsReplaceAllBackButton != NULL ); itsReplaceAllFwdButton = new JXSearchTextButton(kJTrue, window, JXWidget::kFixedRight, JXWidget::kFixedTop, 420,110, 20,20); assert( itsReplaceAllFwdButton != NULL ); itsReplaceAllInSelButton = new JXTextButton(JGetString("itsReplaceAllInSelButton::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedTop, 300,140, 140,20); assert( itsReplaceAllInSelButton != NULL ); itsStayOpenCB = new JXTextCheckbox(JGetString("itsStayOpenCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 160,240, 150,20); assert( itsStayOpenCB != NULL ); itsRetainFocusCB = new JXTextCheckbox(JGetString("itsRetainFocusCB::JXSearchTextDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedTop, 320,240, 110,20); assert( itsRetainFocusCB != NULL ); itsSearchInput = new JXInputField(kJTrue, kJFalse, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,50, 220,40); assert( itsSearchInput != NULL ); itsReplaceInput = new JXInputField(kJTrue, kJFalse, window, JXWidget::kHElastic, JXWidget::kFixedTop, 20,120, 220,40); assert( itsReplaceInput != NULL ); // end JXLayout SetObjects(itsSearchInput, itsPrevSearchMenu, itsIgnoreCaseCB, itsEntireWordCB, itsWrapSearchCB, itsSearchIsRegexCB, itsSingleLineCB, itsReplaceInput, itsPrevReplaceMenu, itsReplaceIsRegexCB, itsPreserveCaseCB, itsStayOpenCB, itsRetainFocusCB, itsFindFwdButton, itsFindBackButton, itsReplaceButton, itsReplaceFindFwdButton, itsReplaceFindBackButton, itsReplaceAllFwdButton, itsReplaceAllBackButton, itsReplaceAllInSelButton, itsCloseButton, itsHelpButton, itsQRefButton); }
void JXChooseFileDialog::BuildWindow ( const JCharacter* origName, const JCharacter* message ) { // begin JXLayout JXWindow* window = new JXWindow(this, 310,340, ""); assert( window != NULL ); SetWindow(window); itsOpenButton = new JXTextButton(JGetString("itsOpenButton::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 219,279, 72,22); assert( itsOpenButton != NULL ); itsOpenButton->SetShortcuts(JGetString("itsOpenButton::JXChooseFileDialog::shortcuts::JXLayout")); JXTextButton* cancelButton = new JXTextButton(JGetString("cancelButton::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,310, 70,20); assert( cancelButton != NULL ); JXTextButton* homeButton = new JXTextButton(JGetString("homeButton::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 250,140, 40,20); assert( homeButton != NULL ); JXStaticText* pathLabel = new JXStaticText(JGetString("pathLabel::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,20, 40,20); assert( pathLabel != NULL ); JXScrollbarSet* scrollbarSet = new JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,140, 180,190); assert( scrollbarSet != NULL ); JXStaticText* filterLabel = new JXStaticText(JGetString("filterLabel::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 20,50, 40,20); assert( filterLabel != NULL ); JXTextCheckbox* showHiddenCB = new JXTextCheckbox(JGetString("showHiddenCB::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedLeft, JXWidget::kFixedBottom, 60,80, 130,20); assert( showHiddenCB != NULL ); JXPathInput* pathInput = new JXPathInput(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,20, 200,20); assert( pathInput != NULL ); JXInputField* filterInput = new JXInputField(window, JXWidget::kHElastic, JXWidget::kFixedBottom, 60,50, 200,20); assert( filterInput != NULL ); JXPathHistoryMenu* pathHistory = new JXPathHistoryMenu(1, "", window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,20, 30,20); assert( pathHistory != NULL ); JXStringHistoryMenu* filterHistory = new JXStringHistoryMenu(1, "", window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 260,50, 30,20); assert( filterHistory != NULL ); JXTextButton* upButton = new JXTextButton(JGetString("upButton::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,140, 30,20); assert( upButton != NULL ); itsSelectAllButton = new JXTextButton(JGetString("itsSelectAllButton::JXChooseFileDialog::JXLayout"), window, JXWidget::kFixedRight, JXWidget::kFixedBottom, 220,170, 70,20); assert( itsSelectAllButton != NULL ); JXCurrentPathMenu* currPathMenu = new JXCurrentPathMenu("/", window, JXWidget::kHElastic, JXWidget::kFixedBottom, 20,110, 180,20); assert( currPathMenu != NULL ); // end JXLayout SetObjects(scrollbarSet, pathLabel, pathInput, pathHistory, filterLabel, filterInput, filterHistory, itsOpenButton, cancelButton, upButton, homeButton, itsSelectAllButton, showHiddenCB, currPathMenu, origName, message); }