bbtkWxGUIConsole.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00048 #ifdef _USE_WXWIDGETS_
00049
00050
00051 #ifndef __bbtkWxGUIConsole_h__
00052 #define __bbtkWxGUIConsole_h__
00053
00054 #include <wx/aui/aui.h>
00055 #include "bbtkWx.h"
00056 #include <wx/notebook.h>
00057 #include <wx/html/htmlwin.h>
00058
00059
00060 #include "bbtkInterpreter.h"
00061
00062 #include "bbtkWxGUICommand.h"
00063 #include "bbtkWxGUIOutputMessages.h"
00064 #include "bbtkWxGUIHtmlBrowser.h"
00065
00066 namespace bbtk
00067 {
00068
00070 class BBTK_EXPORT WxGUIConsole : public wxFrame,
00071 public InterpreterUser,
00072 public WxGUICommandUser
00073 {
00074 public:
00075 WxGUIConsole( wxWindow *parent, wxString title, wxSize size);
00076 ~WxGUIConsole();
00077
00081
00083 Interpreter::Pointer GetInterpreter() const { return mInterpreter; }
00084
00087 void SetInputs(const std::map<std::string,std::string>& m)
00088 { mInterpreter->SetInputs(m); }
00089
00092 void SetNoExecMode(bool b) { mInterpreter->SetNoExecMode(b); }
00093
00094 void SetDialogMode(Interpreter::DialogModeType t)
00095 { mInterpreter->SetDialogMode(t); }
00096
00099 bool InterpretFile( const std::string& filename);
00100
00101
00102 void OnMenuQuit(wxCommandEvent& event);
00103 void OnMenuAbout(wxCommandEvent& event);
00104 void OnMenuEditConfig(wxCommandEvent& WXUNUSED(event));
00105 void OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event));
00106 void OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event));
00107 void OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event));
00108 void OnMenuShowHTMLDoc(wxCommandEvent& WXUNUSED(event));
00109 void OnMenuCreateIndex(wxCommandEvent& WXUNUSED(event));
00110
00111
00112 void OnButtonRun(wxCommandEvent& WXUNUSED(event));
00113
00114
00115 bool InterpreterUserHasOwnHtmlPageViewer() { return true; }
00116 void InterpreterUserViewHtmlPage(const std::string&);
00117
00118
00119 void WxGUICommandEnter(const std::string&);
00120
00121
00122
00123 virtual bool Show(bool show = true);
00124
00125 void OnClose(wxCloseEvent& event);
00126
00127
00128 private:
00129 wxAuiManager m_mgr;
00130 Interpreter::Pointer mInterpreter;
00131
00132
00133
00134 wxAuiNotebook* mwxNotebook;
00135 wxPanel *mwxPageCommand, *mwxPageHelp;
00136
00137 WxGUICommand* mWxGUICommand;
00138 WxGUIOutputMessages* mWxGUIOutputMessages;
00139 WxGUIHtmlBrowser* mWxGUIHtmlBrowser;
00140
00141 wxButton* mwxButtonRun;
00142
00143 public:
00144
00145
00146 void OnWxSignal();
00147 DECLARE_EVENT_TABLE()
00148
00149 };
00150
00151
00152 }
00153
00154
00155 #endif // __bbtkWxGUIConsole_h__
00156
00157 #endif //_USE_WXWIDGETS_