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 void WxGUICommandEnter(const std::string&);
00136
00137
00138 void WxGUITextEditorRun();
00139
00140
00141 bool WxGUIHtmlBrowserUserOnLinkClicked(const std::string& target);
00142
00143
00144 void DoRegeneratePackageDoc(const std::string& pack);
00145 void DoRegenerateBoxesLists();
00146 private:
00147 wxAuiManager m_mgr;
00148 Interpreter::Pointer mInterpreter;
00149
00150 wxAuiNotebook* mwxNotebook;
00151
00152
00153
00154
00155
00156
00157 WxGUICommand *mWxGUICommand;
00158 WxGUIOutputMessages *mWxGUIOutputMessages;
00159 WxGUIHtmlBrowser *mWxGUIHtmlBrowser;
00160 WxGUITextEditor *mWxGUITextEditor;
00161 WxGUIPackageBrowser2 *mWxGUIPackageBrowser2;
00162
00163 wxMenuItem* mwxMenuItemReset;
00164
00165
00166 public:
00167
00168
00169 DECLARE_EVENT_TABLE()
00170
00171 };
00172
00173
00174 }
00175
00176
00177 #endif // __bbtkWxGUIScriptingInterface_h__
00178
00179 #endif //_USE_WXWIDGETS_