wxBBIApp Class Reference

Collaboration diagram for wxBBIApp:

Collaboration graph
[legend]

List of all members.

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


Detailed Description

Definition at line 112 of file bbi.cxx.


Member Function Documentation

bool wxBBIApp::OnCmdLineParsed ( wxCmdLineParser &  parser  ) 

bool wxBBIApp::OnCmdLineParsed ( wxCmdLineParser &  parser  ) 

Definition at line 136 of file bbi.cxx.

References cmd, and WxProcessCmdLine::Process().

00137 {
00138   cmd.Process(parser);
00139   // if (!cmd.proceed) return false;
00140   return true;
00141 }

Here is the call graph for this function:

int wxBBIApp::OnExit (  )  [inline]

Definition at line 26 of file bbStudio.cxx.

00026 { return true; }

int wxBBIApp::OnExit (  )  [inline]

Definition at line 116 of file bbi.cxx.

00116                 { 
00117     //    std::cout << "wxBBIApp::OnExit()"<<std::endl;
00118     // bbtk::Object::PrintObjectListInfo();
00119     return true; }

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 }

Here is the call graph for this function:

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 }


Member Data Documentation

Definition at line 123 of file bbi.cxx.

Referenced by OnCmdLineParsed(), and OnInit().

std::vector<std::string> wxBBIApp::input_file

Definition at line 31 of file bbStudio.cxx.

Definition at line 30 of file bbStudio.cxx.


The documentation for this class was generated from the following files:

Generated on Thu May 31 14:13:21 2012 for BBTK by  doxygen 1.5.7.1