void TestjxCreateGlobals ( TestApp* app, const JBoolean wantMDI ) { theApplication = app; JXMenu::SetDefaultStyle(JXMenu::kWindowsStyle); JXCreateDefaultDocumentManager(); TestDockManager* theDockManager = new TestDockManager((JXGetApplication())->GetCurrentDisplay()); assert( theDockManager != NULL ); if (JFileExists(kDockSetupFileName)) { ifstream input(kDockSetupFileName); theDockManager->ReadSetup(input); } if (wantMDI) { theMDIServer = new TestMDIServer; assert( theMDIServer != NULL ); } JXInitHelp(NULL, kHelpSectionCount, kHelpSectionName); }
void THXCreateGlobals ( THXApp* app ) { theApplication = app; JBoolean isNew; thePrefsManager = new THXPrefsManager(&isNew); assert( thePrefsManager != NULL ); JXInitHelp(kTHXTOCHelpName, kTHXHelpSectionCount, kTHXHelpSectionName); theMDIServer = new THXMDIServer; assert( theMDIServer != NULL ); theTapePrinter = new JXPTPrinter; assert( theTapePrinter != NULL ); JXDisplay* display = app->GetDisplay(1); thePSGraphPrinter = new JXPSPrinter(display); assert( thePSGraphPrinter != NULL ); theEPSGraphPrinter = new JX2DPlotEPSPrinter(display); assert( theEPSGraphPrinter != NULL ); }
JBoolean InitGLGlobals ( GLPlotApp* app ) { itsApplication = app; JBoolean isNew; itsPrefsMgr = jnew GLPrefsMgr(&isNew); assert(itsPrefsMgr != NULL); JXInitHelp(kGLTOCHelpName, kHelpSectionCount, kHelpSectionName); itsPrinter = jnew JXPTPrinter(); assert(itsPrinter != NULL); itsPrefsMgr->ReadPrinterSetup(itsPrinter); itsFitManager = jnew GLFitManager(); assert(itsFitManager != NULL); itsMDIServer = jnew GLMDIServer(app); assert(itsMDIServer != NULL); return isNew; }
JBoolean SyGCreateGlobals ( SyGApplication* app ) { theApplication = app; SyGCreateIcons(); JString oldPrefsFile, newPrefsFile; if (JGetPrefsDirectory(&oldPrefsFile)) { oldPrefsFile = JCombinePathAndName(oldPrefsFile, ".gSystemG.pref"); if (JFileExists(oldPrefsFile) && (JPrefsFile::GetFullName(app->GetSignature(), &newPrefsFile)).OK() && !JFileExists(newPrefsFile)) { JRenameFile(oldPrefsFile, newPrefsFile); } } JBoolean isNew; thePrefsMgr = new SyGPrefsMgr(&isNew); assert(thePrefsMgr != NULL); JXInitHelp(kSyGTOCHelpName, kSyGHelpSectionCount, kSyGHelpSectionName); JXWDManager* wdMgr = new JXWDManager(app->GetCurrentDisplay(), kJTrue); assert( wdMgr != NULL ); // registers itself theMDIServer = new SyGMDIServer; assert( theMDIServer != NULL ); theManPageDialog = new SyGViewManPageDialog(JXGetPersistentWindowOwner()); assert( theManPageDialog != NULL ); theFindFileDialog = new SyGFindFileDialog(JXGetPersistentWindowOwner()); assert( theFindFileDialog != NULL ); theAltChooseSaveFile = new SyGChooseSaveFile(thePrefsMgr, kSAltCSSetupID); assert( theAltChooseSaveFile != NULL ); JString trashDir; SyGGetTrashDirectory(&trashDir, kJFalse); // silently creates it return isNew; }
JBoolean GFGCreateGlobals ( GFGApp* app ) { theApplication = app; JBoolean isNew; thePrefsManager = jnew GFGPrefsManager(&isNew); assert( thePrefsManager != NULL ); JXInitHelp(kGFGTOCHelpName, kGFGHelpSectionCount, kGFGHelpSectionName); theMDIServer = jnew GFGMDIServer; assert( theMDIServer != NULL ); return isNew; }
JBoolean MDCreateGlobals ( MDApp* app ) { theApplication = app; JBoolean isNew; thePrefsManager = new MDPrefsManager(&isNew); assert( thePrefsManager != NULL ); JXInitHelp(kMDTOCHelpName, kMDHelpSectionCount, kMDHelpSectionName); theMDIServer = new MDMDIServer; assert( theMDIServer != NULL ); return isNew; }
JBoolean MDCreateGlobals ( MDApp* app ) { theApplication = app; JBoolean isNew; thePrefsManager = new MDPrefsManager(&isNew); assert( thePrefsManager != NULL ); JXInitHelp(kMDTOCHelpName, kMDHelpSectionCount, kMDHelpSectionName); JXWDManager* wdMgr = new JXWDManager(app->GetCurrentDisplay(), kJTrue); assert( wdMgr != NULL ); // registers itself return isNew; }
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; }