]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxEditor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxEditor.h
index fb5551a2e0d9d59d80a43494cfdf5047ae92c059..5ce7e1fdafa01d7c8e373a418458cbfdc45af14c 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxEditor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/18 15:31:51 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/03/20 09:51:29 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -42,6 +42,8 @@
 #include "bbtkInterpreter.h"
 #include <wx/splitter.h>
 
+#include "bbtkWxGUICommand.h"
+
 namespace bbtk
 {
 
@@ -55,7 +57,8 @@ namespace bbtk
     WxEditor( wxWindow *parent );
     ~WxEditor();
 
-    void OnKeyPress(wxKeyEvent& event);
+    void OnKeyDown(wxKeyEvent& event);
+    void OnKeyUp(wxKeyEvent& event);
 
     void OnButtonNew(wxCommandEvent& event);
     void OnButtonOpen(wxCommandEvent& event);
@@ -72,7 +75,9 @@ namespace bbtk
     void Quit();
 
     void HighlightSyntax();
-    
+    void UpdatePosition();
+
+
   private:
     Interpreter* mInterpreter;
     wxSplitterWindow* mwxSplit;
@@ -80,7 +85,7 @@ namespace bbtk
     wxTextAttr* mwxInputTextAttr;
     WxTextCtrlGettingKeyEvents* mwxOutputText;
     wxTextAttr* mwxOutputTextAttr;
-    wxBitmapButton *  mwxButtonNew; 
+    wxButton *  mwxButtonNew; 
     wxButton *  mwxButtonOpen; 
     wxButton *  mwxButtonSave; 
     wxButton *  mwxButtonRun; 
@@ -107,12 +112,15 @@ namespace bbtk
 
 
   /// Editor in a frame 
-  class BBTK_EXPORT WxEditorWindow : public wxFrame
+  class BBTK_EXPORT WxEditorWindow : public wxFrame, public WxGUICommandUser
   {
   public:
     WxEditorWindow( wxWindow *parent, wxString title, wxSize size);
     ~WxEditorWindow();
     void Open(const std::string& filename) { mEditor->Open(filename); }
+    void WxGUICommandEnter(const std::string& s);
+
+
   private :
     
     WxEditor* mEditor;