]> Creatis software - bbtk.git/blobdiff - kernel/src/bbtkWxEditor.h
*** empty log message ***
[bbtk.git] / kernel / src / bbtkWxEditor.h
index d20fc95312c855e8e29b06b4497f8e537ea01404..4505af376636cfdeb45a3279ea0e6888451f7914 100644 (file)
@@ -3,8 +3,8 @@
   Program:   bbtk
   Module:    $RCSfile: bbtkWxEditor.h,v $
   Language:  C++
-  Date:      $Date: 2008/03/18 12:51:26 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2008/03/19 08:03:59 $
+  Version:   $Revision: 1.4 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,6 +40,7 @@
 #include "bbtkWx.h"
 
 #include "bbtkInterpreter.h"
+#include <wx/splitter.h>
 
 namespace bbtk
 {
@@ -54,7 +55,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);
@@ -71,9 +73,11 @@ namespace bbtk
     void Quit();
 
     void HighlightSyntax();
-    
+    void UpdatePosition();
+
   private:
     Interpreter* mInterpreter;
+    wxSplitterWindow* mwxSplit;
     WxTextCtrlGettingKeyEvents* mwxInputText;
     wxTextAttr* mwxInputTextAttr;
     WxTextCtrlGettingKeyEvents* mwxOutputText;
@@ -83,6 +87,7 @@ namespace bbtk
     wxButton *  mwxButtonSave; 
     wxButton *  mwxButtonRun; 
     wxButton *  mwxButtonQuit; 
+    wxStaticText* mwxPosition;
     WxStreamRedirector* mRedirect_cout;
     WxStreamRedirector* mRedirect_cerr;
    public:
@@ -109,6 +114,10 @@ namespace bbtk
   public:
     WxEditorWindow( wxWindow *parent, wxString title, wxSize size);
     ~WxEditorWindow();
+    void Open(const std::string& filename) { mEditor->Open(filename); }
+  private :
+    
+    WxEditor* mEditor;
   };
   
 } // namespace bbtk