1 /*=========================================================================
4 Module: $RCSfile: bbwxRadioButton.h,v $
6 Date: $Date: 2008/02/11 14:47:12 $
7 Version: $Revision: 1.1 $
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_
35 // Prevents multiple inclusions : use symbols of the form
36 // __FILENAME_INCLUDED__
37 // where FILENAME must be replaced by the actual file name
38 #ifndef __bbWxRadioButton_h__
39 #define __bbWxRadioButton_h__
41 #include "bbtkWxBlackBox.h"
43 // Namespace of the package "wx" is "bbwx"
44 // Namespace associated to packages should be of the form :
54 //--------------------------------------------------------------------------
55 // The widget created by the box
56 class RadioButtonWidget : public wxPanel
59 RadioButtonWidget( RadioButton* box, wxWindow *parent,
62 std::vector<wxString> lstIn );
67 void OnRadioButton(wxEvent& event);
72 wxRadioButton *mwxRadioButton[10];
75 //------------------------------------------------------------------------
76 //------------------------------------------------------------------------
77 //------------------------------------------------------------------------
79 class /*BBTK_EXPORT*/ RadioButton : public bbtk::WxBlackBox
82 BBTK_USER_BLACK_BOX_INTERFACE(RadioButton,bbtk::WxBlackBox);
83 BBTK_DECLARE_INPUT(In,int);
84 BBTK_DECLARE_INPUT(In0,std::string);
85 BBTK_DECLARE_INPUT(In1,std::string);
86 BBTK_DECLARE_INPUT(In2,std::string);
87 BBTK_DECLARE_INPUT(In3,std::string);
88 BBTK_DECLARE_INPUT(In4,std::string);
89 BBTK_DECLARE_INPUT(In5,std::string);
90 BBTK_DECLARE_INPUT(In6,std::string);
91 BBTK_DECLARE_INPUT(In7,std::string);
92 BBTK_DECLARE_INPUT(In8,std::string);
93 BBTK_DECLARE_INPUT(In9,std::string);
94 BBTK_DECLARE_INPUT(Title,std::string);
95 BBTK_DECLARE_OUTPUT(Out,int);
96 BBTK_CREATE_WIDGET(CreateWidget);
97 BBTK_PROCESS(Process);
102 virtual void bbUserConstructor();
106 //=================================================================
107 // UserBlackBox description
108 BBTK_BEGIN_DESCRIBE_BLACK_BOX(RadioButton,bbtk::WxBlackBox);
109 BBTK_NAME("RadioButton");
110 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
111 BBTK_DESCRIPTION("RadioButton group widget 0-9 entries");
112 BBTK_INPUT(RadioButton,In,"Set initial item",int);
114 BBTK_INPUT(RadioButton,In0,"option 0",std::string);
115 BBTK_INPUT(RadioButton,In1,"option 1",std::string);
116 BBTK_INPUT(RadioButton,In2,"option 2",std::string);
117 BBTK_INPUT(RadioButton,In3,"option 3",std::string);
118 BBTK_INPUT(RadioButton,In4,"option 4",std::string);
119 BBTK_INPUT(RadioButton,In5,"option 5",std::string);
120 BBTK_INPUT(RadioButton,In6,"option 6",std::string);
121 BBTK_INPUT(RadioButton,In7,"option 7",std::string);
122 BBTK_INPUT(RadioButton,In8,"option 8",std::string);
123 BBTK_INPUT(RadioButton,In9,"option 9",std::string);
125 BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",std::string);
127 BBTK_OUTPUT(RadioButton,Out,"Item selected",int);
128 BBTK_END_DESCRIBE_BLACK_BOX(RadioButton);
129 //=================================================================
134 #endif //__bbWxRadioButton_h__
136 #endif //_USE_WXWIDGETS_