X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxConsole.h;h=183c9073e20709ae213d5d2c3c9d8bb226e60e71;hb=a4fe3363034ebb3d905fc1cdbc6725539bf272a1;hp=d45758931ca472cead8f6151ae5d263606f25f02;hpb=01f46ce7ba8fe9067dff0688706986475aaec73e;p=bbtk.git diff --git a/kernel/src/bbtkWxConsole.h b/kernel/src/bbtkWxConsole.h index d457589..183c907 100644 --- a/kernel/src/bbtkWxConsole.h +++ b/kernel/src/bbtkWxConsole.h @@ -3,8 +3,8 @@ Program: bbtk Module: $RCSfile: bbtkWxConsole.h,v $ Language: C++ - Date: $Date: 2008/02/12 12:55:16 $ - Version: $Revision: 1.3 $ + Date: $Date: 2008/03/07 11:37:48 $ + Version: $Revision: 1.7 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -36,7 +36,7 @@ #ifndef __bbtkWxConsole_h__ #define __bbtkWxConsole_h__ - +#include #include "bbtkWx.h" #include #include @@ -57,7 +57,14 @@ namespace bbtk WxConsole( wxWindow *parent, wxString title, wxSize size); ~WxConsole(); - static WxConsole* GetInstance() { return mInstance; } + // static WxConsole* GetInstance() { return mInstance; } + + /// Returns the Interpreter used + /// ONLY ONE FOR THE MOMENT BUT IN THE FUTURE CAN BE DIFFERENT + /// (DIFFERENT WORKSPACES) + Interpreter* GetInterpreter() { return mInterpreter; } + /// Returns the Interpreter used (const) + const Interpreter* GetInterpreter() const { return mInterpreter; } /// Sets the inputs of the workspace : /// the map is passed as is to the Executer @@ -68,39 +75,60 @@ namespace bbtk /// which creates but does not execute pipelines. void SetNoExecMode(bool b) { mInterpreter->SetNoExecMode(b); } - void SetDialogMode(Interpreter::DialogModeType t) { mInterpreter->SetDialogMode(t); } + void SetDialogMode(Interpreter::DialogModeType t) + { mInterpreter->SetDialogMode(t); } /// Runs the interpretation of a file - void InterpretFile( const std::string& filename, bool use_configuration_file = true) - { mInterpreter->InterpretFile(filename,use_configuration_file); } + void InterpretFile( const std::string& filename) + { mInterpreter->InterpretFile(filename); } void OnMenuQuit(wxCommandEvent& event); void OnMenuAbout(wxCommandEvent& event); + void OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event)); + void OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event)); + void OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event)); + + void OnBtnGo(wxCommandEvent& event); void OnCommandEnter(wxCommandEvent& event); void OnCommandChar(wxCommandEvent& event); + void OnBtnInclude(wxCommandEvent& event); + void OnBtnReset(wxCommandEvent& event); + void OnBtnConfig(wxCommandEvent& event); + void OnBtnGraphS(wxCommandEvent& event); + void OnBtnGraphD(wxCommandEvent& event); + void OnBtnHelp(wxCommandEvent& event); + + void ShowHtmlPage(std::string&); private: Interpreter* mInterpreter; wxTextCtrl* mwxTextHistory; - wxTextCtrl* mwxTextCommand; +//EED wxTextCtrl* mwxTextCommand; + wxComboBox* mwxTextCommand; wxTextAttr* mwxTextHistoryAttr; wxTextAttr* mwxTextCommandAttr; - wxNotebook* mwxNotebook; +//EED wxNotebook* mwxNotebook; + wxAuiNotebook* mwxNotebook; wxPanel *mwxPageCommand, *mwxPageHelp; WxTextCtrlStreamRedirector* mRedirect_cout; WxTextCtrlStreamRedirector* mRedirect_cerr; - WxBrowser* mwxHtmlWindow; - - static WxConsole* mInstance; + // static WxConsole* mInstance; + + wxPanel* CreateBtnsCtrlPanel(wxWindow *parent); + void CommandString(wxString line ); + public: enum { ID_Menu_Quit = 1, ID_Menu_About, + ID_Menu_CreatePackage, + ID_Menu_CreateBlackBox, + ID_Menu_ShowImageGraph, ID_Text_Command, ID_Text_History,