1 #ifndef __wxConceptControl_h_INCLUDED_H__
2 #define __wxConceptControl_h_INCLUDED_H__
5 // -----------------------------------------------------------------------------------------------------------
6 // WX headers inclusion.
7 // For compilers that support precompilation, includes <wx/wx.h>.
8 // -----------------------------------------------------------------------------------------------------------
10 #include <wx/wxprec.h>
19 //------------------------------------------------------------------------------------------------------------
21 //------------------------------------------------------------------------------------------------------------
25 //------------------------------------------------------------------------------------------------------------
27 //------------------------------------------------------------------------------------------------------------
28 BEGIN_DECLARE_EVENT_TYPES()
29 DECLARE_EVENT_TYPE( wxEVT_CONCEPT_RELEASE, -1 )
30 END_DECLARE_EVENT_TYPES()
32 /** file wxConceptControl.h */
34 //------------------------------------------------------------------------------------------------------------
36 //------------------------------------------------------------------------------------------------------------
38 class wxConceptControl : public wxPanel {
42 //------------------------------------------------------------------------------------------------------------
43 // Constructors & Destructors
44 //------------------------------------------------------------------------------------------------------------
46 wxConceptControl(wxWindow *parent, bool orientation, int minV, int maxV, int actualV, std::string &aConceptName, std::string elementsDef = "");
50 //------------------------------------------------------------------------------------------------------------
51 // Methods for capturing events
52 //------------------------------------------------------------------------------------------------------------
54 void onUpdateUICheckBox(wxCommandEvent& event);
56 void OnCheckOrRadioBox(wxCommandEvent& event);
58 void onSliderTrack(wxScrollEvent& event);
60 void onSliderRelease(wxScrollEvent& event);
62 //------------------------------------------------------------------------------------------------------------
63 // Methods for sending events
64 //------------------------------------------------------------------------------------------------------------
65 void sendEnvent( WXTYPE theEventType );
66 //------------------------------------------------------------------------------------------------------------
67 // Attributes getters and setters
68 //------------------------------------------------------------------------------------------------------------
70 std::string getName();
72 int getMinShowedValue();
74 int getMaxShowedValue();
76 void setMinValue(int theMin);
80 void setMaxValue(int theMax);
84 void setActualValue(int theActual);
88 void setShowLables(bool ifShowCondition);
90 //------------------------------------------------------------------------------------------------------------
91 // Other functional methods
92 //------------------------------------------------------------------------------------------------------------
94 void clearCheckAt( int position );
96 bool getIfChecked( int position );
98 void setRange(int minShow, int maxShow);
103 //------------------------------------------------------------------------------------------------------------
105 //------------------------------------------------------------------------------------------------------------
107 //------------------------------------------------------------------------------------------------------------
108 // Creational and initialization methods
109 //------------------------------------------------------------------------------------------------------------
111 void createElements( wxSizer *sizer, std::string elementsDef );
113 wxCheckBox * createCheckBoxAndAddToSizer(wxSizer *sizer, std::string label, wxWindowID id, int groupID);
116 //------------------------------------------------------------------------------------------------------------
118 //------------------------------------------------------------------------------------------------------------
120 wxSlider * conceptSlider;
122 //std::string conceptName;
124 wxStaticText * conceptName;
126 std::vector<wxTextCtrl *> textBoxes;
128 std::vector<wxCheckBox *> checkBoxes;
130 wxCheckBox * lastUpdate;
139 //DECLARE_CLASS(wxConceptControl)
142 // any class wishing to process wxWindows events must use this macro
143 // DECLARE_EVENT_TABLE()
146 #endif // __wxConceptControl__