initializeVOIWidget();
}
}
- void wxWidgetVOI::initializeVOIWidget(){
+
+ void wxWidgetVOI::initializeVOIWidget()
+ {
wxSizer* sizer = this->GetSizer();
/// \TODO fix deprecated warning: virtual bool wxSizer::Remove(wxWindow*) is deprecated (declared at /usr/include/wx-2.8/wx/sizer.h:513)
- if(mcontourvoiwidget!=NULL){
- sizer->Remove( mcontourvoiwidget );
+ if(mcontourvoiwidget!=NULL)
+ {
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
+ sizer->Remove( mcontourvoiwidget );
+#else
+ sizer->Detach( mcontourvoiwidget );
+#endif
mcontourvoiwidget->Destroy();
}
this->Refresh();
}
- void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview){
+ void wxWidgetVOI::setBaseView(wxVtkBaseView * wxvtkbaseview)
+ {
this->wxvtkbaseview = wxvtkbaseview;
}
- void wxWidgetVOI::setImageData(vtkImageData * imagedata){
+
+ void wxWidgetVOI::setImageData(vtkImageData * imagedata)
+ {
this->imagedata = imagedata;
}
this->_gConfigSizer->Add( _mBarSlices, 1, wxGROW );
//GrayLevel Slider
this->_gConfigSizer->Add( _txtGrayLevel );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+ wxFlexGridSizer *sizerGrayLevel = new wxFlexGridSizer( 2 );
+#endif
+
sizerGrayLevel->Add( _sldGrayLevel, 1, wxGROW );
sizerGrayLevel->Add( _graylevelCtrl, 1,
wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
new wxStaticText( this, -1, _T("Brush Settings") ) );
//BrushSize Slider
this->_brushSizer->Add( _txtBrushSize );
+
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2, wxHORIZONTAL );
+#else
+ wxFlexGridSizer *sizersdlBrushSize = new wxFlexGridSizer( 2 );
+#endif
+
sizersdlBrushSize->Add( _sldBrushSize, 1, wxGROW );
sizersdlBrushSize->Add( _BrushSizeCtrl, 1,
wxALIGN_BOTTOM | wxALIGN_LEFT | wxALL, 5 );
mpWindow::mpWindow( wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, int flag )
: wxScrolledWindow( parent, id, wxDefaultPosition, wxDefaultSize, flag, wxT("wxPlotter") )
{
- m_scaleX = m_scaleY = 1.0;
- m_posX = m_posY = 0;
- m_scrX = m_scrY = 64;
- m_minX = m_minY = 0;
- m_maxX = m_maxY = 0;
- maxScrX = maxScrY = 200;
- minScrX = minScrY = 0;
- m_clickedX = 0;
- m_clickedY = 5000;
- m_lockaspect = FALSE;
- offsetX = offsetY = 0;
- offsetPixelX = offsetPixelY= 0;
- _bitmap_functions=NULL;
-
- real_guideLine_X = -1;
- real_guideLine_Y = -1;
- drawGuides = true;
- type=1;
+ m_scaleX = m_scaleY = 1.0;
+ m_posX = m_posY = 0;
+ m_scrX = m_scrY = 64;
+ m_minX = m_minY = 0;
+ m_maxX = m_maxY = 0;
+ maxScrX = maxScrY = 200;
+ minScrX = minScrY = 0;
+ m_clickedX = 0;
+ m_clickedY = 5000;
+ m_lockaspect = FALSE;
+ offsetX = offsetY = 0;
+ offsetPixelX = offsetPixelY = 0;
+ _bitmap_functions = NULL;
+
+ real_guideLine_X = -1;
+ real_guideLine_Y = -1;
+ drawGuides = true;
+ type = 1;
m_popmenu.Append( mpID_CENTER, _("Center"), _("Center plot view to this position"));
m_popmenu.Append( mpID_FIT, _("Fit"), _("Set plot view to show all items"));
void mpWindow::LockAspect(bool enable)
{
m_lockaspect = enable;
-
m_popmenu.Check(mpID_LOCKASPECT, enable);
-
if (m_lockaspect)
{
double s = (m_scaleX + m_scaleY)/2;
m_scaleX = s;
m_scaleY = s;
}
-
UpdateAll();
}
int flags = 0);
~mpWindow();
+
/** Get reference to context menu of the plot canvas.
@return Pointer to menu. The menu can be modified.
*/
*/
int type;
+
private:
//bitmap of functions
wxBitmap *_bitmap_functions;
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
DECLARE_CLASS(mpWindow)
+#else
+ wxDECLARE_DYNAMIC_CLASS(mpWindow);
+#endif
+
DECLARE_EVENT_TABLE()
+
+
};
#endif // _MP_MATHPLOT_H_
text.Clear();
text = _T("minX=");
double realMin_X = actualFunction->getMinX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
text = text + realMin_X;
+#else
+ text = text + wxString::FromDouble( realMin_X );
+#endif
text = text + _T(" maxX=");
double realMax_X = actualFunction->getMaxX();
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
text = text + realMax_X;
+#else
+ text = text + wxString::FromDouble( realMax_X );
+#endif
int minShowed = actualFunction->getMinXShowed();
int maxShowed = actualFunction->getMaxXShowed();
barrange -> setRepresentedValues (realMin_X, realMax_X);
int i, s;
try
{
+ char tmp[500];
is.read( ( char* )_boolValues, e_bool_cont * sizeof( bool ) );
is.read( ( char* )_intValues, e_int_cont * sizeof( int ) );
is.read( ( char* )_doubleValues, e_double_cont * sizeof( double ) );
{
is.read( ( char* )&s, sizeof( int ) );
_stringValues[ i ].resize( s );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
is.read( ( char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
+#else
+ is.read( tmp , s * sizeof( char ) );
+ _stringValues[ i ]=wxString(tmp);
+#endif
} // rof
return( true );
}
for( i = 0; i < e_string_cont; i++, j += 2 ) {
ret.Add( wxString( StringParamNames[ i ], wxConvUTF8) );
+//EED 2017-09-16 Migration wxWidgets 2.8 to 3.0
+#if wxMAJOR_VERSION <= 2
ret.Add( wxString( _stringValues[ i ].c_str( ), wxConvUTF8 ) );
+#else
+ ret.Add( wxString( _stringValues[ i ] ) );
+#endif
} // rof