bbtkWxGUIScriptingInterface.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 __bbtkWxGUIScriptingInterface_h__
00052 #define __bbtkWxGUIScriptingInterface_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 "bbtkWxGUITextEditor.h"
00063 #include "bbtkWxGUICommand.h"
00064 #include "bbtkWxGUIOutputMessages.h"
00065 #include "bbtkWxGUIHtmlBrowser.h"
00066 #include "bbtkWxGUIPackageBrowser2.h"
00067
00068 namespace bbtk
00069 {
00070
00072 class BBTK_EXPORT WxGUIScriptingInterface : public wxFrame,
00073 public InterpreterUser,
00074 public WxGUICommandUser,
00075 public WxGUITextEditorUser,
00076 public WxGUIHtmlBrowserUser
00077 {
00078 public:
00079 WxGUIScriptingInterface( wxWindow *parent );
00080 ~WxGUIScriptingInterface();
00081
00085 Interpreter::Pointer GetInterpreter() const { return mInterpreter; }
00086
00089 void SetInputs(const std::map<std::string,std::string>& m)
00090 { mInterpreter->SetInputs(m); }
00091
00094 void SetNoExecMode(bool b) { mInterpreter->SetNoExecMode(b); }
00095
00096 void SetDialogMode(Interpreter::DialogModeType t)
00097 { mInterpreter->SetDialogMode(t); }
00098
00101 bool InterpretFile( const std::string& filename);
00102
00103 void Open(const std::string& filename);
00104
00105
00106 void OnMenuQuit(wxCommandEvent& event);
00107 void OnMenuAbout(wxCommandEvent& event);
00108 void OnMenuEditConfig(wxCommandEvent& WXUNUSED(event));
00109 void OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event));
00110 void OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event));
00111 void OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event));
00112 void OnMenuRegeneratePackageDoc(wxCommandEvent& WXUNUSED(event));
00113 void OnMenuRegenerateBoxesLists(wxCommandEvent& WXUNUSED(event));
00114 void OnMenuRegenerateAll(wxCommandEvent& WXUNUSED(event));
00115 void OnMenuPlugPackage(wxCommandEvent& WXUNUSED(event));
00116 void OnMenuWindowsFiles(wxCommandEvent& event);
00117 void OnMenuWindowsHelp(wxCommandEvent& event);
00118 void OnMenuWindowsPackageBrowser(wxCommandEvent& event);
00119 void OnMenuWindowsMessages(wxCommandEvent& event);
00120 void OnMenuWindowsCommand(wxCommandEvent& event);
00121 void OnMenuWindowsSave( wxCommandEvent& WXUNUSED(event));
00122 void OnMenuWindowsCheck( wxCommandEvent& event,
00123 wxWindow* w);
00124 void OnPaneClose(wxAuiManagerEvent& evt);
00125
00126 void SavePerspective();
00127 void LoadPerspective();
00128
00129
00130
00131 bool InterpreterUserHasOwnHtmlPageViewer() { return true; }
00132 void InterpreterUserViewHtmlPage(const std::string&);
00133
00134
00135
00136 void WxGUICommandEnter(const std::string&);
00137
00138
00139 void WxGUITextEditorRun();
00140 void WxGUITextEditorRunBBI();
00141 void WxGUITextEditorGraphSimple();
00142 void WxGUITextEditorGraphDetail();
00143
00144
00145 bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target);
00146
00147
00148 void DoRegeneratePackageDoc(const std::string& pack);
00149 void DoRegenerateBoxesLists();
00150
00151 void OnClose(wxCloseEvent& event);
00152 private:
00153 wxAuiManager m_mgr;
00154 Interpreter::Pointer mInterpreter;
00155
00156 wxAuiNotebook* mwxNotebook;
00157
00158
00159
00160
00161
00162
00163 WxGUICommand *mWxGUICommand;
00164 WxGUIOutputMessages *mWxGUIOutputMessages;
00165 WxGUIHtmlBrowser *mWxGUIHtmlBrowser;
00166 WxGUITextEditor *mWxGUITextEditor;
00167 WxGUIPackageBrowser2 *mWxGUIPackageBrowser2;
00168
00169 wxMenuItem* mwxMenuItemReset;
00170
00171
00172 bool mBreaked;
00173
00174 public:
00175
00176
00177 DECLARE_EVENT_TABLE()
00178
00179 };
00180
00181
00182 }
00183
00184
00185 #endif // __bbtkWxGUIScriptingInterface_h__
00186
00187 #endif //_USE_WXWIDGETS_