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 | |
WxProcessCmdLine | cmd |
bool | usage |
std::vector< std::string > | input_file |
Definition at line 112 of file bbi.cxx.
bool wxBBIApp::OnCmdLineParsed | ( | wxCmdLineParser & | parser | ) |
bool wxBBIApp::OnCmdLineParsed | ( | wxCmdLineParser & | parser | ) |
int wxBBIApp::OnExit | ( | ) | [inline] |
int wxBBIApp::OnExit | ( | ) | [inline] |
bool wxBBIApp::OnInit | ( | ) |
bool wxBBIApp::OnInit | ( | ) |
Definition at line 152 of file bbi.cxx.
References _T, cmd, WxProcessCmdLine::console, WxProcessCmdLine::debug, bbtk::WxGUIConsole::GetInterpreter(), WxProcessCmdLine::graphical_dialog, bbtk::VirtualExec::GraphicalDialog, WxProcessCmdLine::help, WxProcessCmdLine::input_file, bbtk::WxGUIConsole::InterpretFile(), bbtk::Wx::IsSomeWindowAlive(), WxProcessCmdLine::no_console, WxProcessCmdLine::param_map, WxProcessCmdLine::quiet, bbtk::WxGUIConsole::SetDialogMode(), bbtk::WxGUIConsole::SetInputs(), bbtk::MessageManager::SetMessageLevel(), bbtk::WxGUIConsole::SetNoExecMode(), bbtk::WxGUIConsole::Show(), WxProcessCmdLine::text_dialog, and bbtk::VirtualExec::TextDialog.
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) I->SetNoExecMode(true); 00175 if (cmd.graphical_dialog) I->SetDialogMode(bbtk::VirtualExec::GraphicalDialog); 00176 if (cmd.text_dialog) I->SetDialogMode(bbtk::VirtualExec::TextDialog); 00177 00178 std::vector<std::string>::const_iterator i; 00179 bool error = false; 00180 00181 for (i=cmd.input_file.begin(); i!=cmd.input_file.end(); ++i) 00182 { 00183 error = ! I->InterpretFile(*i); 00184 if (error) break; 00185 } 00186 bool show_on_error = error && ! cmd.no_console; 00187 if (show_on_error) I->Show(); 00188 00189 I->SetNoExecMode(false); 00190 00191 if (help_on_script) 00192 { 00193 std::string package; 00194 I->GetInterpreter()->GetExecuter()->GetFactory()->PrintHelpDescriptor("workspace",package,false); 00195 } 00196 00197 /* 00198 std::cout << "soe="<<show_on_error <<std::endl; 00199 std::cout << "con="<<console<<std::endl; 00200 std::cout << "iws="<<bbtk::Wx::IsSomeWindowShown()<<std::endl; 00201 */ 00202 if (!(show_on_error || cmd.console || bbtk::Wx::IsSomeWindowAlive() )) 00203 { 00204 I->Close(); 00205 // std::cout << "I->Close"<<std::endl; 00206 } 00207 else 00208 { 00209 // std::cout << "!I->Close"<<std::endl; 00210 } 00211 00212 // std::cout << "EO OnInit"<<std::endl; 00213 00214 return true; 00215 00216 }
void wxBBIApp::OnInitCmdLine | ( | wxCmdLineParser & | parser | ) |
void wxBBIApp::OnInitCmdLine | ( | wxCmdLineParser & | parser | ) |
Definition at line 129 of file bbi.cxx.
References cmdLineDesc.
00130 { 00131 parser.SetDesc(cmdLineDesc); 00132 }
std::vector<std::string> wxBBIApp::input_file |
Definition at line 31 of file bbStudio.cxx.
bool wxBBIApp::usage |
Definition at line 30 of file bbStudio.cxx.