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/19 14:58:13 $
+ Version: $Revision: 1.10 $
Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
l'Image). All rights reserved. See Doc/License.txt or
#ifndef __bbtkWxConsole_h__
#define __bbtkWxConsole_h__
-
+#include <wx/aui/aui.h>
#include "bbtkWx.h"
#include <wx/notebook.h>
#include <wx/html/htmlwin.h>
namespace bbtk
{
- class WxTextCtrlStreamRedirector;
+ class WxStreamRedirector;
/// A console in which user can enter commands
class BBTK_EXPORT WxConsole : public wxFrame
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
/// 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);
+
void OnMenuQuit(wxCommandEvent& event);
void OnMenuAbout(wxCommandEvent& event);
+ void OnMenuEditConfig(wxCommandEvent& WXUNUSED(event));
+ void OnMenuCreatePackage(wxCommandEvent& WXUNUSED(event));
+ void OnMenuCreateBlackBox(wxCommandEvent& WXUNUSED(event));
+ void OnMenuShowImageGraph(wxCommandEvent& WXUNUSED(event));
+ void OnMenuCreateIndex(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:
+ wxAuiManager m_mgr;
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;
-
+ WxStreamRedirector* mRedirect_cout;
+ WxStreamRedirector* 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_EditConfig,
+ ID_Menu_CreatePackage,
+ ID_Menu_CreateBlackBox,
+ ID_Menu_ShowImageGraph,
+ ID_Menu_CreateIndex,
ID_Text_Command,
ID_Text_History,