00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00048 #ifdef _USE_WXWIDGETS_
00049
00050
00051 #ifndef __bbWxInputText_h__
00052 #define __bbWxInputText_h__
00053
00054 #include "bbtkWxBlackBox.h"
00055
00056
00057
00058 namespace bbwx
00059 {
00060
00061
00062
00063
00064 class InputText;
00065
00066
00067 class InputTextWidget : wxPanel
00068 {
00069 public:
00070 InputTextWidget(InputText* box, wxWindow *parent,
00071 wxString In, wxString title);
00072 ~InputTextWidget();
00073
00074 std::string GetValue();
00075 void OnTextUpdate(wxCommandEvent& event);
00076
00077 void SetTitle(wxString);
00078
00079 private:
00080 InputText *mBox;
00081 wxTextCtrl *mwxTextCtrl;
00082 wxStaticText *mwxTitle;
00083 };
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093 class InputText : public bbtk::WxBlackBox
00094 {
00095
00096 BBTK_BLACK_BOX_INTERFACE(InputText,bbtk::WxBlackBox);
00097 BBTK_DECLARE_INPUT(In,std::string);
00098 BBTK_DECLARE_INPUT(Title,std::string);
00099 BBTK_DECLARE_OUTPUT(Out,std::string);
00100 BBTK_PROCESS(Process);
00101 void Process();
00102 BBTK_CREATE_WIDGET(CreateWidget);
00103 void CreateWidget();
00104
00105 protected:
00106 virtual void bbUserConstructor();
00107 };
00108
00109
00110
00111
00112 BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WxBlackBox);
00113 BBTK_NAME("InputText");
00114 BBTK_AUTHOR("laurent guigues at creatis.insa-lyon.fr");
00115 BBTK_DESCRIPTION("A zone in which the user can enter a text (wxTextCtrl)");
00116 BBTK_INPUT(InputText,In,"Initial text (default '')",std::string,"");
00117
00118 BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ",
00119 std::string,"");
00120
00121 BBTK_OUTPUT(InputText,Out,"Current text",std::string,"");
00122 BBTK_END_DESCRIBE_BLACK_BOX(InputText);
00123
00124
00125
00126
00127 }
00128
00129
00130
00131
00132 #endif //__bbWxInputText_h__
00133
00134 #endif //_USE_WXWIDGETS_