]> Creatis software - bbtk.git/blob - packages/wx/src/bbwxSlider.h
Feature #1774
[bbtk.git] / packages / wx / src / bbwxSlider.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: bbwxSlider.h,v $
31   Language:  C++
32   Date:      $Date: 2012/11/16 08:52:14 $
33   Version:   $Revision: 1.19 $
34 =========================================================================*/
35
36 /**
37  * \file 
38  * \brief Short description in one line
39  * 
40  * Long description which 
41  * can span multiple lines
42 */
43
44 /**
45  * \class bbwx::Slider
46  * \brief 
47
48  * \class bbwx::SliderWidget
49  * \brief 
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 __bbwxSlider_h_INCLUDED__
58 #define __bbwxSlider_h_INCLUDED__
59
60 // Include wxBlackBox definition
61 #include "bbtkWxBlackBox.h"
62
63 #include "bbwx_EXPORT.h"
64
65
66 // Namespace of the package "wx" is "bbwx" 
67 // Namespace associated to packages should be of the form :
68 // bbPACKAGENAME
69 namespace bbwx
70 {
71
72   //------------------------------------------------------------------------
73   // The black box
74   class bbwx_EXPORT Slider : public bbtk::WxBlackBox
75   {    
76     BBTK_BLACK_BOX_INTERFACE(Slider,bbtk::WxBlackBox);
77     BBTK_DECLARE_INPUT(In,int);
78     BBTK_DECLARE_INPUT(Min,int);
79     BBTK_DECLARE_INPUT(Max,int);
80     BBTK_DECLARE_INPUT(Label,bool);
81     BBTK_DECLARE_INPUT(Title,std::string);
82     BBTK_DECLARE_INPUT(Orientation,std::string);
83     BBTK_DECLARE_INPUT(ChangeResolution,bool);
84     BBTK_DECLARE_INPUT(ReactiveOnTrack,bool);    
85     BBTK_DECLARE_OUTPUT(Out,int);
86     BBTK_PROCESS(Process);
87     BBTK_CREATE_WIDGET(CreateWidget);
88     void Process();
89     void CreateWidget(wxWindow*);
90
91   protected:
92
93   };
94   //=================================================================
95  
96   //=================================================================
97   // the black box description
98   BBTK_BEGIN_DESCRIBE_BLACK_BOX(Slider,bbtk::WxBlackBox);
99   BBTK_NAME("Slider");
100   BBTK_AUTHOR("eduardo.davila@creatis.insa-lyon.fr");
101   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
102   BBTK_DESCRIPTION("Slider widget (wxSlider)");
103   BBTK_INPUT(Slider,In,               "Initial position of the slider (default 0)",                          int,         "");
104   BBTK_INPUT(Slider,Min,              "Minimum value of the slider (default 0)",                             int,         "");
105   BBTK_INPUT(Slider,Max,              "Maximum value of the slider (default 500)",                           int,         "");
106   BBTK_INPUT(Slider,Label,            "Show slider labels ? (default FALSE) ",                               bool,        "");
107   BBTK_INPUT(Slider,Title,            "Title shown above the slider (default '') ",                          std::string, "");
108   BBTK_INPUT(Slider,Orientation,      "Orientation : (default H)  0=H=HORIZONTAL, 1=V=VERTICAL ",            std::string, "");
109   BBTK_INPUT(Slider,ChangeResolution, "Can the user change the resolution of the slider ? (default FALSE) ", bool,        "");
110   BBTK_INPUT(Slider,ReactiveOnTrack,  "Slider sends info when track moves (default : FALSE)",                bool,        "");
111     
112   BBTK_OUTPUT(Slider,Out,"Current position of the slider",int,"");
113   BBTK_END_DESCRIBE_BLACK_BOX(Slider);
114   //=================================================================
115
116 } //namespace bbwx
117
118 #endif  //__bbtkwxSlider_h_INCLUDED__
119
120 #endif //_USE_WXWIDGETS_