]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxCheckBox.h
2498 BBTK Feature New Normal wt-version kernel
[bbtk.git] / packages / wx / src / bbwxCheckBox.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: bbwxCheckBox.h,v $
31   Language:  C++
32   Date:      $Date: 2012/11/16 08:52:14 $
33   Version:   $Revision: 1.4 $
34 =========================================================================*/
35
36 /* ---------------------------------------------------------------------
37
38 * Copyright (c) CREATIS-LRMN (Centre de Recherche en Imagerie Medicale)
39 * Authors : Eduardo Davila, Laurent Guigues, Jean-Pierre Roux
40 *
41 *  This software is governed by the CeCILL-B license under French law and 
42 *  abiding by the rules of distribution of free software. You can  use, 
43 *  modify and/ or redistribute the software under the terms of the CeCILL-B 
44 *  license as circulated by CEA, CNRS and INRIA at the following URL 
45 *  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
46 *  or in the file LICENSE.txt.
47 *
48 *  As a counterpart to the access to the source code and  rights to copy,
49 *  modify and redistribute granted by the license, users are provided only
50 *  with a limited warranty  and the software's author,  the holder of the
51 *  economic rights,  and the successive licensors  have only  limited
52 *  liability. 
53 *
54 *  The fact that you are presently reading this means that you have had
55 *  knowledge of the CeCILL-B license and that you accept its terms.
56 * ------------------------------------------------------------------------ */                                                                         
57
58 /**
59  * \file 
60  * \brief Short description in one line
61  * 
62  * Long description which 
63  * can span multiple lines
64 */
65
66 /**
67  * \class bbwx::CheckBox
68  * \brief 
69
70  * \class bbwx::CheckBoxWidget
71  * \brief 
72  */
73
74 #ifdef _USE_WXWIDGETS_
75
76 // Prevents multiple inclusions : use symbols of the form
77 // __FILENAME_INCLUDED__ 
78 // where FILENAME must be replaced by the actual file name
79 #ifndef __bbwxCheckBox_h_INCLUDED__
80 #define __bbwxCheckBox_h_INCLUDED__
81
82 // Include wxBlackBox definition
83 #include "bbtkWxBlackBox.h"
84
85 #include "bbwx_EXPORT.h"
86
87
88 // Namespace of the package "wx" is "bbwx" 
89 // Namespace associated to packages should be of the form :
90 // bbPACKAGENAME
91 namespace bbwx
92 {
93   
94   //------------------------------------------------------------------------
95   // The black box
96   class bbwx_EXPORT CheckBox : public bbtk::WxBlackBox
97   {
98     
99     BBTK_BLACK_BOX_INTERFACE(CheckBox,bbtk::WxBlackBox);
100     BBTK_DECLARE_INPUT(In,bool);
101     BBTK_DECLARE_INPUT(Title,std::string);
102     BBTK_DECLARE_INPUT(ReactiveOnKeystroke,int);
103     BBTK_DECLARE_OUTPUT(Out,bool);
104     BBTK_PROCESS(Process);
105     BBTK_CREATE_WIDGET(CreateWidget);
106     void Process();
107     void CreateWidget(wxWindow*);
108
109   protected:
110
111   };
112   //=================================================================
113  
114   //=================================================================
115   // the black box description
116   BBTK_BEGIN_DESCRIBE_BLACK_BOX(CheckBox,bbtk::WxBlackBox);
117   BBTK_NAME("CheckBox");
118   BBTK_AUTHOR("jpr@creatis.insa-lyon.fr");
119   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
120   BBTK_DESCRIPTION("CheckBox widget (wxCheckBox)");
121   BBTK_INPUT(CheckBox, In,   "Initial value of the CheckBox (default false)",bool,       "");
122   BBTK_INPUT(CheckBox, Title,"Title shown above the CheckBox (default '') ", std::string,"");
123   BBTK_OUTPUT(CheckBox,Out,  "Current value of the CheckBox",                bool,       "");
124   BBTK_INPUT(CheckBox,ReactiveOnKeystroke,"0: no event generated when the checkbox is clicked on, 1: event generated when the checkbox is clicked on (default 1) ", int,"");
125   BBTK_END_DESCRIBE_BLACK_BOX(CheckBox);
126   //=================================================================
127   
128
129
130 } //namespace bbwx
131
132 #endif  //__bbtkwxCheckBox_h_INCLUDED__
133
134 #endif //_USE_WXWIDGETS_