X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=kernel%2Fsrc%2FbbtkWxEditor.h;h=5ce7e1fdafa01d7c8e373a418458cbfdc45af14c;hb=28300312b87bd50ca689d497c5a500ad4d343d5d;hp=fb5551a2e0d9d59d80a43494cfdf5047ae92c059;hpb=b28ab0adce098cc25dd4422761a225d7facd968c;p=bbtk.git diff --git a/kernel/src/bbtkWxEditor.h b/kernel/src/bbtkWxEditor.h index fb5551a..5ce7e1f 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 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 +#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;