X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxConsole.h;h=183c9073e20709ae213d5d2c3c9d8bb226e60e71;hb=6c61e1295d4bedbd7b5abdb256173a2d6df80423;hp=407e5d13d6f9bb16a9377651a9d0a2ba29fa53ce;hpb=9244821a79f4853a78564d37b993b48d4b2ad4e9;p=bbtk.git diff --git a/kernel/src/bbtkWxConsole.h b/kernel/src/bbtkWxConsole.h index 407e5d1..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/05 08:25:23 $ - Version: $Revision: 1.2 $ + 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,63 @@ 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, + }; DECLARE_EVENT_TABLE()