// Constructors & Destructors
//------------------------------------------------------------------------------------------------------------
- wxConceptControl :: wxConceptControl(wxWindow *parent, bool orientation, int minV, int maxV, int actualV, std::string &aConceptName, std::string elementsDef )
+ wxConceptControl::wxConceptControl(wxWindow *parent, bool orientation, int minV, int maxV, int actualV, std::string &aConceptName, std::string elementsDef )
:wxPanel(parent, -1, wxDefaultPosition, parent->GetSize(), wxTAB_TRAVERSAL)
{
-
- minValue = minV;
- maxValue = maxV;
- _numCheckBox = 0;
-
- showLabels = true;
-
- wxFlexGridSizer* sizer = new wxFlexGridSizer (1, 3, 15, 15);
-
+printf("EED wxConceptControl::wxConceptControl Start\n");
+ minValue = minV;
+ maxValue = maxV;
+ _numCheckBox = 0;
+ showLabels = true;
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+ wxFlexGridSizer* sizer = new wxFlexGridSizer(1, 3, 15, 15);
+#else
+ wxFlexGridSizer* sizer = new wxFlexGridSizer(3);
+#endif
conceptName = new wxStaticText(this, -1, wxString(aConceptName.c_str(),wxConvUTF8), wxDefaultPosition, wxSize(90,20), wxALIGN_CENTRE );
+printf("EED wxConceptControl::wxConceptControl 1\n");
sizer->Add( conceptName, 0, wxALIGN_CENTRE |wxALIGN_CENTER_HORIZONTAL);
-
+printf("EED wxConceptControl::wxConceptControl 2\n");
if(orientation)
{
sizer->AddGrowableCol(1);
conceptSlider = new wxSlider(this, -1, actualV, minV, maxV, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL| wxSL_AUTOTICKS | wxSL_LABELS, wxDefaultValidator, wxString(aConceptName.c_str(),wxConvUTF8));
- }
- else
- {
- sizer->AddGrowableRow(1);
+ } else {
+// sizer->AddGrowableRow(1);
conceptSlider = new wxSlider(this, -1, actualV, minV, maxV, wxDefaultPosition, wxDefaultSize, wxSL_LEFT| wxSL_AUTOTICKS | wxSL_LABELS, wxDefaultValidator, wxString(aConceptName.c_str(),wxConvUTF8) );
}
+printf("EED wxConceptControl::wxConceptControl 3\n");
sizer->Add(conceptSlider, 0, wxGROW |wxALL );
+printf("EED wxConceptControl::wxConceptControl 4\n");
createElements( sizer, elementsDef );
SetSizer( sizer );
-
Connect( conceptSlider->GetId(), wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(wxConceptControl::onSliderTrack));//(wxObjectEventFunction) &wxConceptControl :: onSliderRelease );
Connect( conceptSlider->GetId(), wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(wxConceptControl::onSliderRelease));//(wxObjectEventFunction) &wxConceptControl :: onSliderTrack );
-
this->SetAutoLayout( true );
+printf("EED wxConceptControl::wxConceptControl 5\n");
this->Layout();
+printf("EED wxConceptControl::wxConceptControl End\n");
}
wxConceptControl :: ~wxConceptControl()
//------------------------------------------------------------------------------------------------------------
// Creational and initialization methods
//------------------------------------------------------------------------------------------------------------
- void wxConceptControl :: createElements(wxSizer *sizer , std::string elementsDef )
+ void wxConceptControl::createElements(wxSizer *sizer , std::string elementsDef )
{
const char * elements = elementsDef.c_str();
int elementsNum = elementsDef.size();
- wxFlexGridSizer* checkSizer = new wxFlexGridSizer (1, elementsNum, 5, 5);
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+ wxFlexGridSizer* checkSizer = new wxFlexGridSizer(1, elementsNum, 5, 5);
+#else
+ wxFlexGridSizer* checkSizer = new wxFlexGridSizer(elementsNum);
+#endif
int i,ckecks = 0;
for( i = 0;*elements!= 0; elements++)
{
}*/
createCheckBoxAndAddToSizer( checkSizer, "X", -1, ckecks);
ckecks++;
- }
- else if ( a == 84 || a==116 )// Including T:84 or t t:116 as textCtrl (ASCII)
+ } else if ( a == 84 || a==116 )// Including T:84 or t t:116 as textCtrl (ASCII)
{
}