From: Stefan Csomor Date: Sat, 3 Jul 2004 15:51:18 +0000 (+0000) Subject: going on with wxMacControl functionality X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/0fc3bc3b26b299a314ca97a2ba607d8d4062caf0 going on with wxMacControl functionality git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index ba81c9ecfc..a274d0218f 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -333,7 +333,9 @@ public : { m_controlRef = (ControlRef) control ; } - + virtual ~wxMacControl() + { + } bool Ok() const { return m_controlRef != NULL ; } void operator= (ControlRef c) { m_controlRef = c ; } @@ -343,27 +345,27 @@ public : // accessing data and values virtual OSStatus SetData( ControlPartCode inPartCode , ResType inTag , Size inSize , const void * inData ) ; - virtual OSStatus GetData( ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) ; - virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) ; + virtual OSStatus GetData( ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) const ; + virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) const ; virtual OSStatus SendEvent( EventRef ref , OptionBits inOptions = 0 ) ; virtual OSStatus SendHICommand( HICommand &command , OptionBits inOptions = 0 ) ; - OSStatus SendHICommand( UInt32 commandID , OptionBits inOptions = 0 ) ; + virtual OSStatus SendHICommand( UInt32 commandID , OptionBits inOptions = 0 ) ; - SInt32 GetValue() const ; - SInt32 GetMaximum() const ; - SInt32 GetMinimum() const ; + virtual SInt32 GetValue() const ; + virtual SInt32 GetMaximum() const ; + virtual SInt32 GetMinimum() const ; - void SetValue( SInt32 v ) ; - void SetMinimum( SInt32 v ) ; - void SetMaximum( SInt32 v ) ; + virtual void SetValue( SInt32 v ) ; + virtual void SetMinimum( SInt32 v ) ; + virtual void SetMaximum( SInt32 v ) ; - void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ) ; - void SetRange( SInt32 minimum , SInt32 maximum ) ; + virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ) ; + virtual void SetRange( SInt32 minimum , SInt32 maximum ) ; // templated helpers - Size GetDataSize( ControlPartCode inPartCode , ResType inTag ) + Size GetDataSize( ControlPartCode inPartCode , ResType inTag ) const { Size sz ; verify_noerr( GetDataSize( inPartCode , inTag , &sz ) ) ; @@ -377,12 +379,12 @@ public : { return SetData( inPartCode , inTag , sizeof( T ) , &data ) ; } - template OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) + template OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const { Size dummy ; return GetData( inPartCode , inTag , sizeof( T ) , data , &dummy ) ; } - template T GetData( ControlPartCode inPartCode , ResType inTag ) + template T GetData( ControlPartCode inPartCode , ResType inTag ) const { T value ; verify_noerr( GetData( inPartCode , inTag , &value ) ) ; @@ -390,11 +392,14 @@ public : } // Flash the control for the specified amount of time - void Flash( ControlPartCode part , UInt32 ticks = 8 ) ; - + virtual void Flash( ControlPartCode part , UInt32 ticks = 8 ) ; + virtual void VisibilityChanged( bool shown ) ; + virtual void SetFont( const wxFont & font , const wxColour& foreground , long windowStyle ) ; protected : - ControlRef m_controlRef ; + ControlRef m_controlRef ; + wxFont m_font ; + long m_windowStyle ; } ; #endif // wxUSE_GUI