Public Member Functions | |
bool | OnInit () |
int | OnExit () |
void | OnInitCmdLine (wxCmdLineParser &parser) |
bool | OnCmdLineParsed (wxCmdLineParser &parser) |
bool | OnInit () |
int | OnExit () |
void | OnInitCmdLine (wxCmdLineParser &parser) |
bool | OnCmdLineParsed (wxCmdLineParser &parser) |
Public Attributes | |
ProcessCmdLine | cmd |
bool | usage |
std::vector< std::string > | input_file |
Definition at line 112 of file bbi.cxx.
bool wxBBIApp::OnInit | ( | ) |
Definition at line 152 of file bbi.cxx.
References _T, cmd, ProcessCmdLine::console, ProcessCmdLine::debug, ProcessCmdLine::graphical_dialog, ProcessCmdLine::help, ProcessCmdLine::input_file, ProcessCmdLine::no_console, ProcessCmdLine::param_map, ProcessCmdLine::quiet, and ProcessCmdLine::text_dialog.
00153 { 00154 // std::cout << "OnInit"<<std::endl; 00155 wxApp::OnInit(); 00156 #ifdef __WXGTK__ 00157 //See http://www.wxwindows.org/faqgtk.htm#locale 00158 setlocale(LC_NUMERIC, "C"); 00159 #endif 00160 00161 00162 if (cmd.quiet) bbtk::MessageManager::SetMessageLevel("max",0); 00163 if (cmd.debug) bbtk::MessageManager::SetMessageLevel("all",9); 00164 00165 00166 bbtk::WxGUIConsole *I = new bbtk::WxGUIConsole(0,_T("bbi"),wxSize(800,600)); 00167 SetTopWindow(I); 00168 if (cmd.console) I->Show(true); 00169 00170 00171 I->SetInputs(cmd.param_map); 00172 00173 bool help_on_script = cmd.help && (cmd.input_file.size() > 0); 00174 if (help_on_script) 00175 I->SetNoExecMode(true); 00176 if (cmd.graphical_dialog) 00177 I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); 00178 if (cmd.text_dialog) 00179 I->SetDialogMode(bbtk::VirtualExec::TextDialog); 00180 00181 std::vector<std::string>::const_iterator i; 00182 bool error = false; 00183 00184 for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) 00185 { 00186 error = ! I->InterpretFile(*i); 00187 if (error) break; 00188 } 00189 bool show_on_error = error && ! cmd.no_console; 00190 if (show_on_error) I->Show(); 00191 00192 I->SetNoExecMode(false); 00193 00194 if (help_on_script) 00195 { 00196 std::string package; 00197 I->GetInterpreter()->GetExecuter()->GetFactory()->HelpBlackBox("workspace",package,false); 00198 } 00199 00200 /* 00201 std::cout << "soe="<<show_on_error <<std::endl; 00202 std::cout << "con="<<console<<std::endl; 00203 std::cout << "iws="<<bbtk::Wx::IsSomeWindowShown()<<std::endl; 00204 */ 00205 if (!(show_on_error || cmd.console || bbtk::Wx::IsSomeWindowShown() )) 00206 { 00207 I->Close(); 00208 // std::cout << "I->Close"<<std::endl; 00209 } 00210 else 00211 { 00212 // std::cout << "!I->Close"<<std::endl; 00213 } 00214 return true; 00215 00216 }
int wxBBIApp::OnExit | ( | ) | [inline] |
void wxBBIApp::OnInitCmdLine | ( | wxCmdLineParser & | parser | ) |
Definition at line 129 of file bbi.cxx.
References cmdLineDesc.
00130 { 00131 parser.SetDesc(cmdLineDesc); 00132 }
bool wxBBIApp::OnCmdLineParsed | ( | wxCmdLineParser & | parser | ) |
bool wxBBIApp::OnInit | ( | ) |
int wxBBIApp::OnExit | ( | ) | [inline] |
void wxBBIApp::OnInitCmdLine | ( | wxCmdLineParser & | parser | ) |
bool wxBBIApp::OnCmdLineParsed | ( | wxCmdLineParser & | parser | ) |
bool wxBBIApp::usage |
Definition at line 29 of file bbStudio.cxx.
std::vector<std::string> wxBBIApp::input_file |
Definition at line 30 of file bbStudio.cxx.