// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name)
{
if ( !wxSpinButtonBase::Create(parent, id, pos, size,
style, wxDefaultValidator, name) )
return false;
m_min = 0;
m_max = 100;
if ( !wxSpinButtonBase::Create(parent, id, pos, size,
style, wxDefaultValidator, name) )
return false;
m_min = 0;
m_max = 100;
verify_noerr ( CreateLittleArrowsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 0 , m_min , m_max , 1 ,
verify_noerr ( CreateLittleArrowsControl( MAC_WXHWND(parent->MacGetTopLevelWindowRef()) , &bounds , 0 , m_min , m_max , 1 ,
- (ControlRef*) &m_macControl ) ) ;
- SetControlAction( (ControlRef) m_macControl , wxMacLiveScrollbarActionUPP ) ;
+ m_peer->GetControlRefAddr() ) );
+
+ m_peer->SetActionProc( GetwxMacLiveScrollbarActionProc() ) ;
- SetControl32BitMaximum( (ControlRef) m_macControl , maxVal ) ;
- SetControl32BitMinimum((ControlRef) m_macControl , minVal ) ;
+ m_peer->SetMaximum( maxVal ) ;
+ m_peer->SetMinimum( minVal ) ;
if ( m_value - oldValue == -1 )
scrollEvent = wxEVT_SCROLL_LINEDOWN ;
else if ( m_value - oldValue == 1 )
scrollEvent = wxEVT_SCROLL_LINEUP ;
else
scrollEvent = wxEVT_SCROLL_THUMBTRACK ;
if ( m_value - oldValue == -1 )
scrollEvent = wxEVT_SCROLL_LINEDOWN ;
else if ( m_value - oldValue == 1 )
scrollEvent = wxEVT_SCROLL_LINEUP ;
else
scrollEvent = wxEVT_SCROLL_THUMBTRACK ;
event.SetPosition(m_value);
event.SetEventObject( this );
if ((GetEventHandler()->ProcessEvent( event )) &&
event.SetPosition(m_value);
event.SetEventObject( this );
if ((GetEventHandler()->ProcessEvent( event )) &&
-void wxSpinButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown )
+void wxSpinButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown )
{
/*
// these have been handled by the live action proc already
int nScrollInc = 0;
wxMacCarbonEvent cEvent( (EventRef) event ) ;
{
/*
// these have been handled by the live action proc already
int nScrollInc = 0;
wxMacCarbonEvent cEvent( (EventRef) event ) ;
switch( cEvent.GetParameter<ControlPartCode>(kEventParamControlPart,typeControlPartCode) )
{
case kControlUpButtonPart :
switch( cEvent.GetParameter<ControlPartCode>(kEventParamControlPart,typeControlPartCode) )
{
case kControlUpButtonPart :