]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxRadioButton.h
Clean code
[bbtk.git] / packages / wx / src / bbwxRadioButton.h
1 /*
2  # ---------------------------------------------------------------------
3  #
4  # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5  #                        pour la SantÈ)
6  # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7  # Previous Authors : Laurent Guigues, Jean-Pierre Roux
8  # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9  #
10  #  This software is governed by the CeCILL-B license under French law and
11  #  abiding by the rules of distribution of free software. You can  use,
12  #  modify and/ or redistribute the software under the terms of the CeCILL-B
13  #  license as circulated by CEA, CNRS and INRIA at the following URL
14  #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
15  #  or in the file LICENSE.txt.
16  #
17  #  As a counterpart to the access to the source code and  rights to copy,
18  #  modify and redistribute granted by the license, users are provided only
19  #  with a limited warranty  and the software's author,  the holder of the
20  #  economic rights,  and the successive licensors  have only  limited
21  #  liability.
22  #
23  #  The fact that you are presently reading this means that you have had
24  #  knowledge of the CeCILL-B license and that you accept its terms.
25  # ------------------------------------------------------------------------ */
26
27
28 /*=========================================================================
29   Program:   bbtk
30   Module:    $RCSfile: bbwxRadioButton.h,v $
31   Language:  C++
32   Date:      $Date: 2012/11/16 08:52:14 $
33   Version:   $Revision: 1.9 $
34 =========================================================================*/
35
36 /**
37  * \brief Short description in one line
38  * 
39  * Long description which 
40  * can span multiple lines
41  */
42 /**
43  * \file 
44  * \brief Pattern for the definition of a new type of Node (header)
45  */
46 /**
47  * \class bbtk::NodePatern 
48  * \brief Pattern for the definition of a new type of Node 
49  */
50
51
52 #ifdef _USE_WXWIDGETS_
53
54 // Prevents multiple inclusions : use symbols of the form
55 // __FILENAME_INCLUDED__ 
56 // where FILENAME must be replaced by the actual file name
57 #ifndef __bbWxRadioButton_h__
58 #define __bbWxRadioButton_h__
59
60 #include "bbtkWxBlackBox.h"
61 #include "bbwx_EXPORT.h"
62
63
64 // Namespace of the package "wx" is "bbwx" 
65 // Namespace associated to packages should be of the form :
66 // bbPACKAGENAME
67 namespace bbwx
68 {
69   
70   
71   class bbwx_EXPORT RadioButton : public bbtk::WxBlackBox
72   {
73
74     BBTK_BLACK_BOX_INTERFACE(RadioButton,bbtk::WxBlackBox);
75     BBTK_DECLARE_INPUT(In,int);
76     BBTK_DECLARE_INPUT(In0,std::string);
77     BBTK_DECLARE_INPUT(In1,std::string);
78     BBTK_DECLARE_INPUT(In2,std::string);
79     BBTK_DECLARE_INPUT(In3,std::string);
80     BBTK_DECLARE_INPUT(In4,std::string);
81     BBTK_DECLARE_INPUT(In5,std::string);
82     BBTK_DECLARE_INPUT(In6,std::string);
83     BBTK_DECLARE_INPUT(In7,std::string);
84     BBTK_DECLARE_INPUT(In8,std::string);
85     BBTK_DECLARE_INPUT(In9,std::string);
86     BBTK_DECLARE_INPUT(Title,std::string);
87     BBTK_DECLARE_OUTPUT(Out,int);
88     BBTK_CREATE_WIDGET(CreateWidget);
89     BBTK_PROCESS(Process);
90     void Process();
91     void CreateWidget(wxWindow*);
92
93   protected:
94
95   };
96  
97   //=================================================================
98   // UserBlackBox description
99   BBTK_BEGIN_DESCRIBE_BLACK_BOX(RadioButton,bbtk::WxBlackBox);
100   BBTK_NAME("RadioButton");
101   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
102   BBTK_DESCRIPTION("RadioButton group widget 0-9 entries");
103   BBTK_INPUT(RadioButton,In,"(default 0) Set initial item",int,"");
104
105   BBTK_INPUT(RadioButton,In0,"option 0",std::string,"");
106   BBTK_INPUT(RadioButton,In1,"option 1",std::string,"");
107   BBTK_INPUT(RadioButton,In2,"option 2",std::string,"");
108   BBTK_INPUT(RadioButton,In3,"option 3",std::string,"");
109   BBTK_INPUT(RadioButton,In4,"option 4",std::string,"");
110   BBTK_INPUT(RadioButton,In5,"option 5",std::string,"");
111   BBTK_INPUT(RadioButton,In6,"option 6",std::string,"");
112   BBTK_INPUT(RadioButton,In7,"option 7",std::string,"");
113   BBTK_INPUT(RadioButton,In8,"option 8",std::string,"");
114   BBTK_INPUT(RadioButton,In9,"option 9",std::string,"");
115
116   BBTK_INPUT(RadioButton,Title,"Title of the widget (default '') ",
117              std::string,"");
118
119   BBTK_OUTPUT(RadioButton,Out,"Item selected",int,"");
120   BBTK_END_DESCRIBE_BLACK_BOX(RadioButton);
121   //=================================================================
122
123 }
124
125 //namespace bbtk
126 #endif  //__bbWxRadioButton_h__
127
128 #endif //_USE_WXWIDGETS_