1 /*=========================================================================
3 Module: $RCSfile: bbwxRadioButton.h,v $
5 Date: $Date: 2008/11/24 15:45:51 $
6 Version: $Revision: 1.6 $
7 =========================================================================*/
9 /* ---------------------------------------------------------------------
11 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
12 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
14 * This software is governed by the CeCILL-B license under French law and
15 * abiding by the rules of distribution of free software. You can use,
16 * modify and/ or redistribute the software under the terms of the CeCILL-B
17 * license as circulated by CEA, CNRS and INRIA at the following URL
18 * http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
19 * or in the file LICENSE.txt.
21 * As a counterpart to the access to the source code and rights to copy,
22 * modify and redistribute granted by the license, users are provided only
23 * with a limited warranty and the software's author, the holder of the
24 * economic rights, and the successive licensors have only limited
27 * The fact that you are presently reading this means that you have had
28 * knowledge of the CeCILL-B license and that you accept its terms.
29 * ------------------------------------------------------------------------ */
33 * \brief Short description in one line
35 * Long description which
36 * can span multiple lines
40 * \brief Pattern for the definition of a new type of Node (header)
43 * \class bbtk::NodePatern
44 * \brief Pattern for the definition of a new type of Node
48 #ifdef _USE_WXWIDGETS_
50 // Prevents multiple inclusions : use symbols of the form
51 // __FILENAME_INCLUDED__
52 // where FILENAME must be replaced by the actual file name
53 #ifndef __bbWxRadioButton_h__
54 #define __bbWxRadioButton_h__
56 #include "bbtkWxBlackBox.h"
58 // Namespace of the package "wx" is "bbwx"
59 // Namespace associated to packages should be of the form :
69 //--------------------------------------------------------------------------
70 // The widget created by the box
71 class RadioButtonWidget : public wxPanel
74 RadioButtonWidget( RadioButton* box, wxWindow *parent,
77 std::vector<wxString> lstIn );
82 void OnRadioButton(wxEvent& event);
87 wxRadioButton *mwxRadioButton[10];
90 //------------------------------------------------------------------------
91 //------------------------------------------------------------------------
92 //------------------------------------------------------------------------
94 class /*BBTK_EXPORT*/ RadioButton : public bbtk::WxBlackBox
97 BBTK_BLACK_BOX_INTERFACE(RadioButton,bbtk::WxBlackBox);
98 BBTK_DECLARE_INPUT(In,int);
99 BBTK_DECLARE_INPUT(In0,std::string);
100 BBTK_DECLARE_INPUT(In1,std::string);
101 BBTK_DECLARE_INPUT(In2,std::string);
102 BBTK_DECLARE_INPUT(In3,std::string);
103 BBTK_DECLARE_INPUT(In4,std::string);
104 BBTK_DECLARE_INPUT(In5,std::string);
105 BBTK_DECLARE_INPUT(In6,std::string);
106 BBTK_DECLARE_INPUT(In7,std::string);
107 BBTK_DECLARE_INPUT(In8,std::string);
108 BBTK_DECLARE_INPUT(In9,std::string);
109 BBTK_DECLARE_INPUT(Title,std::string);
110 BBTK_DECLARE_OUTPUT(Out,int);
111 BBTK_CREATE_WIDGET(CreateWidget);
112 BBTK_PROCESS(Process);
114 void CreateWidget(wxWindow*);
117 virtual void bbUserConstructor();
120 //=================================================================
121 // UserBlackBox description
122 BBTK_BEGIN_DESCRIBE_BLACK_BOX(RadioButton,bbtk::WxBlackBox);
123 BBTK_NAME("RadioButton");
124 BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
125 BBTK_DESCRIPTION("RadioButton group widget 0-9 entries");
126 BBTK_INPUT(RadioButton,In,"Set initial item",int,"");
128 BBTK_INPUT(RadioButton,In0,"option 0",std::string,"");
129 BBTK_INPUT(RadioButton,In1,"option 1",std::string,"");
130 BBTK_INPUT(RadioButton,In2,"option 2",std::string,"");
131 BBTK_INPUT(RadioButton,In3,"option 3",std::string,"");
132 BBTK_INPUT(RadioButton,In4,"option 4",std::string,"");
133 BBTK_INPUT(RadioButton,In5,"option 5",std::string,"");
134 BBTK_INPUT(RadioButton,In6,"option 6",std::string,"");
135 BBTK_INPUT(RadioButton,In7,"option 7",std::string,"");
136 BBTK_INPUT(RadioButton,In8,"option 8",std::string,"");
137 BBTK_INPUT(RadioButton,In9,"option 9",std::string,"");
139 BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",
142 BBTK_OUTPUT(RadioButton,Out,"Item selected",int,"");
143 BBTK_END_DESCRIBE_BLACK_BOX(RadioButton);
144 //=================================================================
149 #endif //__bbWxRadioButton_h__
151 #endif //_USE_WXWIDGETS_