1 #ifndef __wxInstantChooserPanel_h_INCLUDED_H__
2 #define __wxInstantChooserPanel_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 #include "wxConceptControl.h"
27 #include "ConceptDataWrap.h"
29 //------------------------------------------------------------------------------------------------------------
31 //------------------------------------------------------------------------------------------------------------
33 BEGIN_DECLARE_EVENT_TYPES()
34 DECLARE_EVENT_TYPE(wxINSTANT_CHOOSER_CHANGE,400)
35 END_DECLARE_EVENT_TYPES()
38 /** file wxInstantChooserPanel.h */
41 //------------------------------------------------------------------------------------------------------------
43 //------------------------------------------------------------------------------------------------------------
45 class wxInstantChooserPanel : public wxPanel {
49 //------------------------------------------------------------------------------------------------------------
50 // Constructors & Destructors
51 //------------------------------------------------------------------------------------------------------------
53 wxInstantChooserPanel (wxWindow * parent, std::string title, bool theOrientation, bool resolutionALL = false, std::string configurationElem="", std::string groupConfig = "");
55 wxInstantChooserPanel (wxWindow * parent,wxWindowID id ,std::string title, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, bool theOrientation=true, std::string configurationElem="", std::string groupConfig = "");
57 ~wxInstantChooserPanel();
59 //------------------------------------------------------------------------------------------------------------
60 // Creational and initialization methods
61 //------------------------------------------------------------------------------------------------------------
64 * Adds a concept to the instant managment. PRE: The concept doesn't exists in the included _concepts.
70 void addConcept(std::string aConceptName, int minV, int maxV, int actualV);
72 void setWxEventHandler( wxEvtHandler * theEventHandler );
74 //------------------------------------------------------------------------------------------------------------
75 // Methods for capturing events
76 //------------------------------------------------------------------------------------------------------------
77 void onResolutionSlider( wxScrollEvent& event );
79 void onChechBoxClicked( wxCommandEvent& event );
81 void onConceptRelease( wxCommandEvent& event );
82 //------------------------------------------------------------------------------------------------------------
83 // Methods for sending events
84 //------------------------------------------------------------------------------------------------------------
86 //------------------------------------------------------------------------------------------------------------
87 // Attributes getters and setters
88 //------------------------------------------------------------------------------------------------------------
90 ConceptDataWrap * getLastConceptData();
92 //------------------------------------------------------------------------------------------------------------
93 // Other functional methods
94 //------------------------------------------------------------------------------------------------------------
96 void setInstant(std::vector<int> choiceInstant);
98 void setInstant(std::map<std::string,int>* _actualInstant );
100 void getInstant(std::vector<int> & choiceInstant);
102 void getInstantData(std::map<std::string,int> & choiceInstantData);
104 std::map<std::string,int>* getInstantData();
106 void setResolutionRangeWithLasUpdate();
108 void refreshConceptLabels();
110 void setConfiguration(std::string aConfiguration);
112 std::string getConfiguration();
114 void setResolutionOverAll( bool condition );
116 bool getIfResolutionOverAll();
118 void setConceptValue( std::string theConceptName, int theValue );
120 int getConceptValue( std::string theConceptName );
122 ConceptDataWrap * getConceptDataOf( std::string theConceptName );
124 bool getIfConceptCheckedAt( std::string theConceptName, int atChecksPosition );
127 //------------------------------------------------------------------------------------------------------------
129 //------------------------------------------------------------------------------------------------------------
130 void initializeResolutionSlider();
132 void changeResolutionAtConceptControl( wxConceptControl * theConceptToUpdate );
134 void setVerticalMaxSelectedNums( std::string groupMaxVertNums );
136 //------------------------------------------------------------------------------------------------------------
138 //------------------------------------------------------------------------------------------------------------
140 std::vector<wxConceptControl *> * _concepts;
142 wxConceptControl * _lastConceptUpdated;
144 wxSlider * _resolutionSlider;
146 wxFlexGridSizer * _outSizer;
150 bool _resolutionOverALL;
152 std::map<std::string,int>* _actualInstant;
154 std::vector<int> _verticalMaxSelected;
156 wxEvtHandler * _eventHandler;
158 std::string _configuration;
161 //DECLARE_CLASS(wxInstantChooserPanel)
162 // any class wishing to process wxWindows events must use this macro
163 //DECLARE_EVENT_TABLE()