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);
102 int getNumCheckBox();
105 //------------------------------------------------------------------------------------------------------------
107 //------------------------------------------------------------------------------------------------------------
109 //------------------------------------------------------------------------------------------------------------
110 // Creational and initialization methods
111 //------------------------------------------------------------------------------------------------------------
113 void createElements( wxSizer *sizer, std::string elementsDef );
115 wxCheckBox * createCheckBoxAndAddToSizer(wxSizer *sizer, std::string label, wxWindowID id, int groupID);
118 //------------------------------------------------------------------------------------------------------------
120 //------------------------------------------------------------------------------------------------------------
122 wxSlider * conceptSlider;
124 //std::string conceptName;
126 wxStaticText * conceptName;
128 std::vector<wxTextCtrl *> textBoxes;
130 std::vector<wxCheckBox *> checkBoxes;
132 wxCheckBox * lastUpdate;
143 //DECLARE_CLASS(wxConceptControl)
146 // any class wishing to process wxWindows events must use this macro
147 // DECLARE_EVENT_TABLE()
150 #endif // __wxConceptControl__