return;
wxArrowButton* btn = (wxArrowButton*)clientData;
- delete btn->m_timer;
- btn->m_timer = 0;
+ wxDELETE(btn->m_timer);
}
bool wxArrowButton::Create( wxSpinButton* parent,
ArrowDirection d,
const wxPoint& pos, const wxSize& size )
{
+ wxCHECK_MSG( parent, false, wxT("must have a valid parent") );
+
int arrow_dir = XmARROW_UP;
switch( d )
break;
}
- if( parent ) parent->AddChild( this );
+ parent->AddChild( this );
+ PreCreation();
Widget parentWidget = (Widget) parent->GetClientWidget();
m_mainWidget = (WXWidget) XtVaCreateManagedWidget( "XmArrowButton",
XmNactivateCallback, (XtCallbackProc) StopTimerCallback,
(XtPointer) this );
+ PostCreation();
AttachWidget( parent, m_mainWidget, (WXWidget) NULL,
pos.x, pos.y, size.x, size.y );
- SetForegroundColour( parent->GetBackgroundColour() );
-
return true;
}
// wxSpinButton
// ----------------------------------------------------------------------------
-IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
-IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent)
-
static void CalcSizes( const wxPoint& pt, const wxSize& sz,
wxPoint& pt1, wxSize& sz1,
wxPoint& pt2, wxSize& sz2,
event.SetPosition( npos );
event.SetEventObject( this );
- GetEventHandler()->ProcessEvent( event );
+ HandleWindowEvent( event );
if( event.IsAllowed() )
{
event.SetEventType( wxEVT_SCROLL_THUMBTRACK );
event.SetPosition( m_pos );
- GetEventHandler()->ProcessEvent( event );
+ HandleWindowEvent( event );
}
}