X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/355b4d3de54b76db87439fa2142c7334a6e48f85..6184558583df419ff7830abaf16e7ec40ac00b32:/src/motif/scrolbar.cpp diff --git a/src/motif/scrolbar.cpp b/src/motif/scrolbar.cpp index 789220c16f..d54a1f1d80 100644 --- a/src/motif/scrolbar.cpp +++ b/src/motif/scrolbar.cpp @@ -12,7 +12,6 @@ // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" -#include "wx/defs.h" #include "wx/scrolbar.h" #ifdef __VMS__ @@ -41,6 +40,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 ); @@ -54,9 +54,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; } @@ -126,6 +126,8 @@ static void wxScrollBarCallback(Widget widget, XtPointer clientData, XmScaleCallbackStruct *cbs) { wxScrollBar *scrollBar = (wxScrollBar*)wxGetWindowFromTable(widget); + wxCHECK_RET( scrollBar, _T("invalid widget in scrollbar callback") ); + wxOrientation orientation = (wxOrientation)wxPtrToUInt(clientData); wxEventType eventType = wxEVT_NULL; @@ -182,5 +184,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); }