Create( parent, id, d, pos, size );
}
- ~wxArrowButton()
+ virtual ~wxArrowButton()
{ delete m_timer; }
bool Create( wxSpinButton* parent, wxWindowID id, ArrowDirection d,
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;
}
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 );
}
}