//------------------------------------------------------------------------------ // void SaveScript() //------------------------------------------------------------------------------ void GmatSavePanel::SaveScript() { #ifdef DEBUG_SAVE MessageInterface::ShowMessage ("GmatSavePanel::SaveScript() entered\n mFilename = '%s'\n", mFilename.c_str()); #endif SaveData(); mScriptDirtyLabel->SetLabel(""); SetEditorModified(false); if (mIsScriptActive) { GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); mainFrame->SetActiveChildDirty(false); mainFrame->SetScriptFileName(mFilename.c_str()); mainFrame->RefreshActiveScript(mFilename.c_str(), false); mainFrame->UpdateGuiScriptSyncStatus(2, 2); } #ifdef DEBUG_SAVE MessageInterface::ShowMessage ("GmatSavePanel::SaveScript() leaving\n mFilename = '%s'\n", mFilename.c_str()); #endif }
//------------------------------------------------------------------------------ GmatBase* GuiInterpreter::CreateDefaultPropSetup(const std::string &name) { GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); theModerator->SetObjectManageOption(1); GmatBase *obj = theModerator->CreateDefaultPropSetup(name); #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateDefaultPropSetup() type='PropSetup', name='%s', " "Setting GUI %s\n", name.c_str(), obj ? "dirty" : "error"); #endif if (obj == NULL) mainFrame->UpdateGuiScriptSyncStatus(3, 0); // Set GUI error else mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty return obj; }
//------------------------------------------------------------------------------ GmatCommand* GuiInterpreter::CreateDefaultCommand(const std::string &type, const std::string &name, GmatCommand *refCmd) { GmatCommand *cmd = theModerator->CreateDefaultCommand(type, name, refCmd); #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateDefaultCommand() type='%s', name='%s', Setting GUI dirty\n", type.c_str(), name.c_str()); #endif #if !defined __CONSOLE_APP__ GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); if (cmd == NULL) mainFrame->UpdateGuiScriptSyncStatus(3, 0); // Set GUI error else mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty #endif return cmd; }
//------------------------------------------------------------------------------ Parameter* GuiInterpreter::CreateParameter(const std::string &type, const std::string &name, const std::string &ownerName, const std::string &depName, bool manage) { GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); Parameter *obj = theModerator->CreateParameter(type, name, ownerName, depName, manage); #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateParameter() type='%s', name='%s', Setting GUI %s\n", type.c_str(), name.c_str(), obj ? "dirty" : "error"); #endif if (obj == NULL) mainFrame->UpdateGuiScriptSyncStatus(3, 0); // Set GUI error else mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty return obj; }
//------------------------------------------------------------------------------ GmatBase* GuiInterpreter::CreateObject(const std::string &type, const std::string &name, Integer manage, bool createDefault) { #if !defined __CONSOLE_APP__ GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); continueOnError = false; GmatBase *obj = Interpreter::CreateObject(type, name, manage, createDefault, false, false); if (obj == NULL) { #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateObject() type='%s', name='%s', Setting GUI error\n", type.c_str(), name.c_str()); #endif mainFrame->UpdateGuiScriptSyncStatus(3, 0); // Set GUI error } else if (name != "") { #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateObject() type='%s', name='%s', Setting GUI dirty\n", type.c_str(), name.c_str()); #endif mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty } return obj; #else return Interpreter::CreateObject(type, name, manage, createDefault); #endif }
//------------------------------------------------------------------------------ Subscriber* GuiInterpreter::CreateSubscriber(const std::string &type, const std::string &name, const std::string &filename, bool createDefault) { // Set object manage option to configuration object GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); theModerator->SetObjectManageOption(1); Subscriber *obj = theModerator->CreateSubscriber(type, name, filename, createDefault); #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::CreateSubscriber() type='%s', name='%s', Setting GUI %s\n", type.c_str(), name.c_str(), obj ? "dirty" : "error"); #endif if (obj == NULL) mainFrame->UpdateGuiScriptSyncStatus(3, 0); // Set GUI error else mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty return obj; }
//------------------------------------------------------------------------------ // void ConfigurationChanged(GmatBase *obj, bool tf) //------------------------------------------------------------------------------ void GuiInterpreter::ConfigurationChanged(GmatBase *obj, bool tf) { #if !defined __CONSOLE_APP__ GmatMainFrame *mainFrame = GmatAppData::Instance()->GetMainFrame(); theModerator->ConfigurationChanged(obj, tf); if (tf == true) { #ifdef DEBUG_SYNC_STATUS MessageInterface::ShowMessage ("GuiInterpreter::ConfigurationChanged() Setting GUI dirty\n"); #endif mainFrame->UpdateGuiScriptSyncStatus(2, 0); // Set GUI dirty } #else theModerator->ConfigurationChanged(obj, tf); #endif }