public:
MyCanvas() {}
MyCanvas( wxWindow *parent, wxWindowID, const wxPoint &pos, const wxSize &size );
- ~MyCanvas();
+ ~MyCanvas(){};
void OnPaint( wxPaintEvent &event );
void OnQueryPosition( wxCommandEvent &event );
void OnAddButton( wxCommandEvent &event );
m_button = new wxButton( this, ID_QUERYPOS, "Query position", wxPoint(10,110) );
- (void) new wxTextCtrl( this, wxID_ANY, "wxTextCtrl", wxPoint(10,150), wxSize(80,wxDefaultSize.y) );
+ (void) new wxTextCtrl( this, wxID_ANY, "wxTextCtrl", wxPoint(10,150), wxSize(80,wxDefaultCoord) );
(void) new wxRadioButton( this, wxID_ANY, "Disable", wxPoint(10,190) );
SetCursor( wxCursor( wxCURSOR_IBEAM ) );
}
-MyCanvas::~MyCanvas()
-{
-}
-
void MyCanvas::OnMouseDown( wxMouseEvent &event )
{
if (event.LeftDown())
wxWindow *win = FindWindow( event.GetId() );
wxPoint pt( win->GetPosition() );
wxLogMessage( wxT("-> Position before move is %d %d"), pt.x, pt.y );
- win->Move( wxDefaultPosition.x, pt.y + 10 );
+ win->Move( wxDefaultCoord, pt.y + 10 );
pt = win->GetPosition();
wxLogMessage( wxT("-> Position after move is %d %d"), pt.x, pt.y );
}