1 /*=========================================================================
4 Module: $RCSfile: bbwxInputText.h,v $
6 Date: $Date: 2008/04/18 12:59:52 $
7 Version: $Revision: 1.3 $
9 Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10 l'Image). All rights reserved. See Doc/License.txt or
11 http://www.creatis.insa-lyon.fr/Public/bbtk/License.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*//**
18 * \brief Short description in one line
20 * Long description which
21 * can span multiple lines
25 * \brief Pattern for the definition of a new type of Node (header)
28 * \class bbtk::NodePatern
29 * \brief Pattern for the definition of a new type of Node
33 #ifdef _USE_WXWIDGETS_
36 #ifndef __bbWxInputText_h__
37 #define __bbWxInputText_h__
39 #include "bbtkWxBlackBox.h"
51 //--------------------------------------------------------------------------
52 class InputTextWidget : wxPanel
55 InputTextWidget(InputText* box, wxWindow *parent,
56 wxString In, wxString title);
59 std::string GetValue();
60 void OnTextUpdate(wxCommandEvent& event);
62 void SetTitle(wxString);
66 wxTextCtrl *mwxTextCtrl;
67 wxStaticText *mwxTitle;
70 //------------------------------------------------------------------------
71 //------------------------------------------------------------------------
72 //------------------------------------------------------------------------
78 class /*BBTK_EXPORT*/ InputText : public bbtk::WxBlackBox
81 BBTK_BLACK_BOX_INTERFACE(InputText,bbtk::WxBlackBox);
82 BBTK_DECLARE_INPUT(In,std::string);
83 BBTK_DECLARE_INPUT(Title,std::string);
84 BBTK_DECLARE_OUTPUT(Out,std::string);
85 BBTK_PROCESS(Process);
87 BBTK_CREATE_WIDGET(CreateWidget);
91 virtual void bbUserConstructor();
95 //=================================================================
96 // UserBlackBox description
97 BBTK_BEGIN_DESCRIBE_BLACK_BOX(InputText,bbtk::WxBlackBox);
98 BBTK_NAME("InputText");
99 BBTK_AUTHOR("laurent guigues at creatis.insa-lyon.fr");
100 BBTK_DESCRIPTION("A zone in which the user can enter a text (wxTextCtrl)");
101 BBTK_INPUT(InputText,In,"Initial text (default '')",std::string,"");
103 BBTK_INPUT(InputText,Title,"Title of the input zone (default '') ",
106 BBTK_OUTPUT(InputText,Out,"Current text",std::string,"");
107 BBTK_END_DESCRIBE_BLACK_BOX(InputText);
108 //=================================================================
117 #endif //__bbWxInputText_h__
119 #endif //_USE_WXWIDGETS_