continued spinning committed
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27535 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -64,6 +64,7 @@ public:
|
|||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
|
||||||
|
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
|
||||||
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
@@ -30,6 +30,8 @@
|
|||||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
|
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
extern ControlActionUPP wxMacLiveScrollbarActionUPP ;
|
||||||
|
|
||||||
wxSpinButton::wxSpinButton()
|
wxSpinButton::wxSpinButton()
|
||||||
: wxSpinButtonBase()
|
: wxSpinButtonBase()
|
||||||
{
|
{
|
||||||
@@ -54,7 +56,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
|
|
||||||
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 ) ) ;
|
(ControlRef*) &m_macControl ) ) ;
|
||||||
|
SetControlAction( (ControlRef) m_macControl , wxMacLiveScrollbarActionUPP ) ;
|
||||||
MacPostControlCreate(pos,size) ;
|
MacPostControlCreate(pos,size) ;
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -148,8 +150,26 @@ void wxSpinButton::MacHandleValueChanged( int inc )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxSpinButton::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown )
|
||||||
|
{
|
||||||
|
int nScrollInc = 0;
|
||||||
|
|
||||||
|
switch( controlpart )
|
||||||
|
{
|
||||||
|
case kControlUpButtonPart :
|
||||||
|
nScrollInc = 1;
|
||||||
|
break ;
|
||||||
|
case kControlDownButtonPart :
|
||||||
|
nScrollInc = -1;
|
||||||
|
break ;
|
||||||
|
}
|
||||||
|
MacHandleValueChanged( nScrollInc ) ;
|
||||||
|
}
|
||||||
|
|
||||||
wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event )
|
wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVENTREF event )
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
// these have been handled by the live action proc already
|
||||||
int nScrollInc = 0;
|
int nScrollInc = 0;
|
||||||
wxMacCarbonEvent cEvent( (EventRef) event ) ;
|
wxMacCarbonEvent cEvent( (EventRef) event ) ;
|
||||||
|
|
||||||
@@ -163,6 +183,7 @@ wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVEN
|
|||||||
break ;
|
break ;
|
||||||
}
|
}
|
||||||
MacHandleValueChanged( nScrollInc ) ;
|
MacHandleValueChanged( nScrollInc ) ;
|
||||||
|
*/
|
||||||
return noErr ;
|
return noErr ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user