X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/29014baaa5124aa136d59de8f9f0a61f42c47dac..404b319a85dadd7decf7a5a5331020520031a41c:/src/motif/scrolbar.cpp?ds=sidebyside diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index 6cbdf29c23..3b53a731df 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -16,7 +16,6 @@ #ifdef __VMS__ #pragma message disable nosimpint -#define XtDisplay XTDISPLAY #endif #include #include @@ -29,8 +28,6 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData, XmScaleCallbackStruct *cbs); -IMPLEMENT_DYNAMIC_CLASS(wxScrollBar, wxControl) - // Scrollbar bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, @@ -40,6 +37,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, { if( !CreateControl( parent, id, pos, size, style, validator, name ) ) return false; + PreCreation(); wxSize newSize = ( style & wxHORIZONTAL ) ? wxSize( 140, 16 ) : wxSize( 16, 140 ); @@ -53,9 +51,9 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, (wxOrientation)(style & (wxHORIZONTAL|wxVERTICAL)), (void (*)())wxScrollBarCallback ); + PostCreation(); AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, newSize.x, newSize.y); - ChangeBackgroundColour(); return true; } @@ -125,7 +123,7 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData, XmScaleCallbackStruct *cbs) { wxScrollBar *scrollBar = (wxScrollBar*)wxGetWindowFromTable(widget); - wxCHECK_RET( scrollBar, _T("invalid widget in scrollbar callback") ); + wxCHECK_RET( scrollBar, wxT("invalid widget in scrollbar callback") ); wxOrientation orientation = (wxOrientation)wxPtrToUInt(clientData); wxEventType eventType = wxEVT_NULL; @@ -183,5 +181,5 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData, wxScrollEvent event(eventType, scrollBar->GetId(), cbs->value, orientation); event.SetEventObject(scrollBar); - scrollBar->GetEventHandler()->ProcessEvent(event); + scrollBar->HandleWindowEvent(event); }