]> Creatis software - creaMaracasVisu.git/blob - bbtk/src/bbmaracasvisuSliderMinMax.h
14c98357f3c29fc606baa3ed9bec355e85f4b0d6
[creaMaracasVisu.git] / bbtk / src / bbmaracasvisuSliderMinMax.h
1 #ifdef _USE_WXWIDGETS_
2 #ifndef __bbmaracasvisuSliderMinMax_h_INCLUDED__
3 #define __bbmaracasvisuSliderMinMax_h_INCLUDED__
4 #include "bbtkWxBlackBox.h"
5
6 #include "mBarRange.h"
7
8 namespace bbmaracasvisu
9 {
10
11
12 //--------------------------------------------------------------------------------------------------------------------------------
13 //--------------------------------------------------------------------------------------------------------------------------------
14 //--------------------------------------------------------------------------------------------------------------------------------
15
16   class SliderMinMax;
17   //------------------------------------------------------------------------------------------------------------------------------------
18   // Event handling auxiliar class
19   //------------------------------------------------------------------------------------------------------------------------------------
20   class wxWidgetSliderMinMax : wxEvtHandler
21   {
22   public:
23           //--------------------------------------------------------------------------------------------------------------------------------
24           // Constructors ans destructors
25           //--------------------------------------------------------------------------------------------------------------------------------
26                 wxWidgetSliderMinMax(SliderMinMax *bbParent,mBarRange * modelBarRange);
27                 ~wxWidgetSliderMinMax();                
28
29           //--------------------------------------------------------------------------------------------------------------------------------
30           // Min-Max Barrange received events
31           //--------------------------------------------------------------------------------------------------------------------------------
32                 void onBarrange(wxCommandEvent& event);
33                 void onActualChange_Bar(wxCommandEvent& event);
34                 void onStartChange_Bar(wxCommandEvent& event);
35                 void onEndChange_Bar(wxCommandEvent& event);
36                 void onSelectionEnd(wxCommandEvent& event);
37                 void onMovedBar(wxCommandEvent& event);
38
39   private:
40           //--------------------------------------------------------------------------------------------------------------------------------
41           // Attributes
42           //--------------------------------------------------------------------------------------------------------------------------------
43           SliderMinMax * mbbtkSliderMinMax;
44           mBarRange * modBarRange;
45   };
46
47
48
49 //--------------------------------------------------------------------------------------------------------------------------------
50 //--------------------------------------------------------------------------------------------------------------------------------
51 //--------------------------------------------------------------------------------------------------------------------------------
52
53
54
55 class /*BBTK_EXPORT*/ SliderMinMax
56  : 
57    public bbtk::WxBlackBox
58 {
59   BBTK_BLACK_BOX_INTERFACE(SliderMinMax,bbtk::WxBlackBox);
60 //==================================================================
61 /// User callback called in the box contructor
62 virtual void bbUserConstructor();
63 /// User callback called in the box copy constructor
64 virtual void bbUserCopyConstructor();
65 /// User callback called in the box destructor
66 virtual void bbUserDestructor();
67 //==================================================================
68         BBTK_DECLARE_INPUT(Orientation, int);
69         BBTK_DECLARE_INPUT(InW, int);
70         BBTK_DECLARE_INPUT(InH, int);
71         BBTK_DECLARE_INPUT(InMax, int );
72         BBTK_DECLARE_INPUT(InMin, int );
73         BBTK_DECLARE_INPUT(InMaxShow, int );
74         BBTK_DECLARE_INPUT(InMinShow, int );
75         BBTK_DECLARE_INPUT(ShowLabels, int );
76         BBTK_DECLARE_INPUT(ShowActual, bool );
77     BBTK_DECLARE_OUTPUT(OutStart,int);
78         BBTK_DECLARE_OUTPUT(OutEnd,int);
79         BBTK_DECLARE_OUTPUT(OutActual,int);
80   BBTK_PROCESS(Process);
81   void Process();
82   BBTK_CREATE_WIDGET(CreateWidget);
83   void CreateWidget();
84
85   private:
86         mBarRange* mwxwidget;
87 };
88
89 BBTK_BEGIN_DESCRIBE_BLACK_BOX(SliderMinMax,bbtk::WxBlackBox);
90 BBTK_NAME("SliderMinMax");
91 BBTK_AUTHOR("eduardo.davila [at] creatis.insa-lyon.fr");
92 BBTK_DESCRIPTION("Slider min max");
93 //BBTK_CATEGORY("__CategoryBlackBox__");
94   BBTK_INPUT(SliderMinMax,Orientation,"Orientation ", int,"");
95   BBTK_INPUT(SliderMinMax,InW,"Width ", int,"");
96   BBTK_INPUT(SliderMinMax,InH,"Height ", int,"");
97   BBTK_INPUT(SliderMinMax,InMax,"Max value ", int,"");
98   BBTK_INPUT(SliderMinMax,InMin, "Min value ",int ,"");
99   BBTK_INPUT(SliderMinMax,InMaxShow,"Max showed value ", int ,"");
100   BBTK_INPUT(SliderMinMax,InMinShow, "Min showed value ",int ,"");
101   BBTK_INPUT(SliderMinMax,ShowLabels, "Show labels ",int ,"");
102   BBTK_INPUT(SliderMinMax,ShowActual, "Show actual (default true)",bool ,"");
103   BBTK_OUTPUT(SliderMinMax,OutStart,"Min value output",int,"");
104   BBTK_OUTPUT(SliderMinMax,OutEnd,"Max value output",int,"");
105   BBTK_OUTPUT(SliderMinMax,OutActual,"Actual value output",int,"");
106 BBTK_END_DESCRIBE_BLACK_BOX(SliderMinMax);
107 }
108 // EO namespace bbmaracasvisu
109
110 #endif // __bbmaracasvisuSliderMinMax_h_INCLUDED__
111 #endif // _USE_WXWIDGETS_
112