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:
Stefan Csomor 2004-05-31 15:54:59 +00:00
parent 3a9dc0619f
commit 64be92e214
2 changed files with 23 additions and 1 deletions

View File

@ -64,6 +64,7 @@ public:
// implementation
virtual void MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool mouseStillDown ) ;
virtual wxInt32 MacControlHit( WXEVENTHANDLERREF handler , WXEVENTREF event ) ;
protected:

View File

@ -30,6 +30,8 @@
IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxScrollEvent)
#endif
extern ControlActionUPP wxMacLiveScrollbarActionUPP ;
wxSpinButton::wxSpinButton()
: 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 ,
(ControlRef*) &m_macControl ) ) ;
SetControlAction( (ControlRef) m_macControl , wxMacLiveScrollbarActionUPP ) ;
MacPostControlCreate(pos,size) ;
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 )
{
/*
// these have been handled by the live action proc already
int nScrollInc = 0;
wxMacCarbonEvent cEvent( (EventRef) event ) ;
@ -163,6 +183,7 @@ wxInt32 wxSpinButton::MacControlHit(WXEVENTHANDLERREF WXUNUSED(handler) , WXEVEN
break ;
}
MacHandleValueChanged( nScrollInc ) ;
*/
return noErr ;
}