X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxEditor.h;h=4505af376636cfdeb45a3279ea0e6888451f7914;hb=6d2f79e0ff9b1c0b2db0d7f3d164f4f62434f08d;hp=d20fc95312c855e8e29b06b4497f8e537ea01404;hpb=372f03317f05d4a436b0f9c39b98558ec4810b78;p=bbtk.git diff --git a/kernel/src/bbtkWxEditor.h b/kernel/src/bbtkWxEditor.h index d20fc95..4505af3 100644 --- a/kernel/src/bbtkWxEditor.h +++ b/kernel/src/bbtkWxEditor.h @@ -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 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