]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuSliderMinMax.h
#2490 creaMaracasVisu Feature New High - Histogram Interaction
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuSliderMinMax.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
8 #
9 #  This software is governed by the CeCILL-B license under French law and
10 #  abiding by the rules of distribution of free software. You can  use,
11 #  modify and/ or redistribute the software under the terms of the CeCILL-B
12 #  license as circulated by CEA, CNRS and INRIA at the following URL
13 #  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 #  or in the file LICENSE.txt.
15 #
16 #  As a counterpart to the access to the source code and  rights to copy,
17 #  modify and redistribute granted by the license, users are provided only
18 #  with a limited warranty  and the software's author,  the holder of the
19 #  economic rights,  and the successive licensors  have only  limited
20 #  liability.
21 #
22 #  The fact that you are presently reading this means that you have had
23 #  knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
25
26 #ifdef _USE_WXWIDGETS_
27 #ifndef __bbcreaMaracasVisuSliderMinMax_h_INCLUDED__
28 #define __bbcreaMaracasVisuSliderMinMax_h_INCLUDED__
29 #include "bbtkWxBlackBox.h"
30
31 #include "mBarRange.h"
32
33 namespace bbcreaMaracasVisu
34 {
35
36
37 //--------------------------------------------------------------------------------------------------------------------------------
38 //--------------------------------------------------------------------------------------------------------------------------------
39 //--------------------------------------------------------------------------------------------------------------------------------
40
41   class SliderMinMax;
42   //------------------------------------------------------------------------------------------------------------------------------------
43   // Event handling auxiliar class
44   //------------------------------------------------------------------------------------------------------------------------------------
45   class wxWidgetSliderMinMax : wxEvtHandler
46   {
47   public:
48           //--------------------------------------------------------------------------------------------------------------------------------
49           // Constructors ans destructors
50           //--------------------------------------------------------------------------------------------------------------------------------
51                 wxWidgetSliderMinMax(SliderMinMax *bbParent,mBarRange * modelBarRange);
52                 ~wxWidgetSliderMinMax();                
53
54           //--------------------------------------------------------------------------------------------------------------------------------
55           // Min-Max Barrange received events
56           //--------------------------------------------------------------------------------------------------------------------------------
57                 void onBarrange(wxCommandEvent& event);
58                 void onActualChange_Bar(wxCommandEvent& event);
59                 void onStartChange_Bar(wxCommandEvent& event);
60                 void onEndChange_Bar(wxCommandEvent& event);
61                 void onSelectionEnd(wxCommandEvent& event);
62                 void onMovedBar(wxCommandEvent& event);
63            void PushEventHandler();
64
65
66   private:
67           //--------------------------------------------------------------------------------------------------------------------------------
68           // Attributes
69           //--------------------------------------------------------------------------------------------------------------------------------
70           SliderMinMax  *mbbtkSliderMinMax;
71           mBarRange             *modBarRange;
72   };
73
74
75
76 //--------------------------------------------------------------------------------------------------------------------------------
77 //--------------------------------------------------------------------------------------------------------------------------------
78 //--------------------------------------------------------------------------------------------------------------------------------
79
80
81
82 class /*BBTK_EXPORT*/ SliderMinMax
83  : 
84    public bbtk::WxBlackBox
85 {
86   BBTK_BLACK_BOX_INTERFACE(SliderMinMax,bbtk::WxBlackBox);
87         BBTK_DECLARE_INPUT(Orientation, int);
88         BBTK_DECLARE_INPUT(InW, int);
89         BBTK_DECLARE_INPUT(InH, int);
90         BBTK_DECLARE_INPUT(InMax, int );
91         BBTK_DECLARE_INPUT(InMin, int );
92         BBTK_DECLARE_INPUT(InMaxShow, int );
93         BBTK_DECLARE_INPUT(InMinShow, int );
94         BBTK_DECLARE_INPUT(ShowLabels, int );
95         BBTK_DECLARE_INPUT(ShowActual, bool );
96     BBTK_DECLARE_OUTPUT(OutStart,int);
97         BBTK_DECLARE_OUTPUT(OutEnd,int);
98         BBTK_DECLARE_OUTPUT(OutActual,int);
99   BBTK_PROCESS(Process);
100   void Process();
101   BBTK_CREATE_WIDGET(CreateWidget);
102   void CreateWidget(wxWindow*);
103
104   private:
105         bool                    firsttime;
106         mBarRange               *mwxwidget;
107 };
108
109 BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliderMinMax,bbtk::WxBlackBox);
110 BBTK_NAME("SliderMinMax");
111 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
112 BBTK_DESCRIPTION("Slider min max");
113 //BBTK_CATEGORY("__CategoryBlackBox__");
114   BBTK_INPUT(SliderMinMax,Orientation,"Orientation ", int,"");
115   BBTK_INPUT(SliderMinMax,InW,"Width ", int,"");
116   BBTK_INPUT(SliderMinMax,InH,"Height ", int,"");
117   BBTK_INPUT(SliderMinMax,InMax,"Max value ", int,"");
118   BBTK_INPUT(SliderMinMax,InMin, "Min value ",int ,"");
119   BBTK_INPUT(SliderMinMax,InMaxShow,"Max showed value ", int ,"");
120   BBTK_INPUT(SliderMinMax,InMinShow, "Min showed value ",int ,"");
121   BBTK_INPUT(SliderMinMax,ShowLabels, "Show labels ",int ,"");
122   BBTK_INPUT(SliderMinMax,ShowActual, "Show actual (default true)",bool ,"");
123   BBTK_OUTPUT(SliderMinMax,OutStart,"Min value output",int,"");
124   BBTK_OUTPUT(SliderMinMax,OutEnd,"Max value output",int,"");
125   BBTK_OUTPUT(SliderMinMax,OutActual,"Actual value output",int,"");
126 BBTK_END_DESCRIBE_BLACK_BOX(SliderMinMax);
127 }
128 // EO namespace bbcreaMaracasVisu
129
130 #endif // __bbcreaMaracasVisuSliderMinMax_h_INCLUDED__
131 #endif // _USE_WXWIDGETS_
132