SMTPDebugDir::SMTPDebugDir ( JXDirector* supervisor ) : GMManagedDirector(supervisor) { JSize w = 400; JSize h = 300; JXWindow* window = new JXWindow(this, w,h, "Debug Window"); assert( window != NULL ); SetWindow(window); window->SetCloseAction(JXWindow::kDeactivateDirector); JXMenuBar* menuBar = new JXMenuBar(window, JXWidget::kHElastic, JXWidget::kFixedTop, 0,0, w,kJXStdMenuBarHeight); assert( menuBar != NULL ); itsFileMenu = menuBar->AppendTextMenu(kFileMenuTitleStr); itsFileMenu->SetMenuItems(kFileMenuStr); itsFileMenu->SetUpdateAction(JXMenu::kDisableNone); ListenTo(itsFileMenu); GMDirectorMenu* menu = new GMDirectorMenu(kWindowsMenuTitleStr, menuBar, JXWidget::kFixedLeft, JXWidget::kVElastic, 0,0, 10,10); assert(menu != NULL); menuBar->AppendMenu(menu); JXScrollbarSet* scrollbarSet = new JXScrollbarSet(window, JXWidget::kHElastic, JXWidget::kVElastic, 0,kJXStdMenuBarHeight,w,h - kJXStdMenuBarHeight); assert ( scrollbarSet != NULL ); itsText = new JXStaticText("", kJFalse, kJTrue, scrollbarSet, scrollbarSet->GetScrollEnclosure(), JXWidget::kHElastic, JXWidget::kVElastic, 0,0,w,h - kJXStdMenuBarHeight); assert (itsText != NULL); itsMenuIcon = new JXImage(window->GetDisplay(), window->GetColormap(), JXPM(debug_xpm)); assert(itsMenuIcon != NULL); itsMenuIcon->ConvertToRemoteStorage(); GGetDirMgr()->DirectorCreated(this); }
JBoolean CBCreateGlobals ( CBApp* app, const JBoolean useMDI ) { if (JAssertBase::GetAction() == JAssertBase::kAskUser) { JAssertBase::SetAction(JAssertBase::kAbort); } theApplication = app; CBCreateIcons(); // prefs must be created first so everybody can read from it JBoolean isNew; thePrefsManager = new CBPrefsManager(&isNew); assert( thePrefsManager != NULL ); JXInitHelp(kCBTOCHelpName, kCBHelpSectionCount, kCBHelpSectionName); thePrefsManager->UpgradeHelpPrefs(); theDocManager = new CBDocumentManager; assert( theDocManager != NULL ); if (useMDI) { CBDockManager* dockManager = new CBDockManager(); assert( dockManager != NULL ); dockManager->JPrefObject::ReadPrefs(); theMDIServer = new CBMDIServer; assert( theMDIServer != NULL ); } theSearchTextDialog = CBSearchTextDialog::Create(); assert( theSearchTextDialog != NULL ); theRunTEScriptDialog = new CBRunTEScriptDialog(JXGetPersistentWindowOwner()); assert( theRunTEScriptDialog != NULL ); theViewManPageDialog = new CBViewManPageDialog(JXGetPersistentWindowOwner()); assert( theViewManPageDialog != NULL ); theFindFileDialog = new CBFindFileDialog(JXGetPersistentWindowOwner()); assert( theFindFileDialog != NULL ); theDiffFileDialog = new CBDiffFileDialog(JXGetPersistentWindowOwner()); assert( theDiffFileDialog != NULL ); // widgets hidden in permanent window JXWindow* permWindow = theSearchTextDialog->GetWindow(); theDocManager->CreateFileHistoryMenus(permWindow); // global commands theCmdManager = new CBCommandManager(theDocManager); assert( theCmdManager != NULL ); theCmdManager->JPrefObject::ReadPrefs(); // fn menu updater theFnMenuUpdater = new CBFnMenuUpdater; assert( theFnMenuUpdater != NULL ); // symbol type list theSymbolTypeList = new CBSymbolTypeList(permWindow->GetColormap()); assert( theSymbolTypeList != NULL ); // printers thePTTextPrinter = new CBPTPrinter; assert( thePTTextPrinter != NULL ); thePSTextPrinter = new CBPSPrinter(permWindow->GetDisplay()); assert( thePSTextPrinter != NULL ); return isNew; }