going on with wxMacControl functionality
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28157 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -333,7 +333,9 @@ public :
|
|||||||
{
|
{
|
||||||
m_controlRef = (ControlRef) control ;
|
m_controlRef = (ControlRef) control ;
|
||||||
}
|
}
|
||||||
|
virtual ~wxMacControl()
|
||||||
|
{
|
||||||
|
}
|
||||||
bool Ok() const { return m_controlRef != NULL ; }
|
bool Ok() const { return m_controlRef != NULL ; }
|
||||||
|
|
||||||
void operator= (ControlRef c) { m_controlRef = c ; }
|
void operator= (ControlRef c) { m_controlRef = c ; }
|
||||||
@@ -343,27 +345,27 @@ public :
|
|||||||
// accessing data and values
|
// accessing data and values
|
||||||
|
|
||||||
virtual OSStatus SetData( ControlPartCode inPartCode , ResType inTag , Size inSize , const void * inData ) ;
|
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 GetData( ControlPartCode inPartCode , ResType inTag , Size inBufferSize , void * inOutBuffer , Size * outActualSize ) const ;
|
||||||
virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) ;
|
virtual OSStatus GetDataSize( ControlPartCode inPartCode , ResType inTag , Size * outActualSize ) const ;
|
||||||
virtual OSStatus SendEvent( EventRef ref , OptionBits inOptions = 0 ) ;
|
virtual OSStatus SendEvent( EventRef ref , OptionBits inOptions = 0 ) ;
|
||||||
virtual OSStatus SendHICommand( HICommand &command , 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 ;
|
virtual SInt32 GetValue() const ;
|
||||||
SInt32 GetMaximum() const ;
|
virtual SInt32 GetMaximum() const ;
|
||||||
SInt32 GetMinimum() const ;
|
virtual SInt32 GetMinimum() const ;
|
||||||
|
|
||||||
void SetValue( SInt32 v ) ;
|
virtual void SetValue( SInt32 v ) ;
|
||||||
void SetMinimum( SInt32 v ) ;
|
virtual void SetMinimum( SInt32 v ) ;
|
||||||
void SetMaximum( SInt32 v ) ;
|
virtual void SetMaximum( SInt32 v ) ;
|
||||||
|
|
||||||
void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ) ;
|
virtual void SetValueAndRange( SInt32 value , SInt32 minimum , SInt32 maximum ) ;
|
||||||
void SetRange( SInt32 minimum , SInt32 maximum ) ;
|
virtual void SetRange( SInt32 minimum , SInt32 maximum ) ;
|
||||||
|
|
||||||
// templated helpers
|
// templated helpers
|
||||||
|
|
||||||
Size GetDataSize( ControlPartCode inPartCode , ResType inTag )
|
Size GetDataSize( ControlPartCode inPartCode , ResType inTag ) const
|
||||||
{
|
{
|
||||||
Size sz ;
|
Size sz ;
|
||||||
verify_noerr( GetDataSize( inPartCode , inTag , &sz ) ) ;
|
verify_noerr( GetDataSize( inPartCode , inTag , &sz ) ) ;
|
||||||
@@ -377,12 +379,12 @@ public :
|
|||||||
{
|
{
|
||||||
return SetData( inPartCode , inTag , sizeof( T ) , &data ) ;
|
return SetData( inPartCode , inTag , sizeof( T ) , &data ) ;
|
||||||
}
|
}
|
||||||
template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data )
|
template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const
|
||||||
{
|
{
|
||||||
Size dummy ;
|
Size dummy ;
|
||||||
return GetData( inPartCode , inTag , sizeof( T ) , data , &dummy ) ;
|
return GetData( inPartCode , inTag , sizeof( T ) , data , &dummy ) ;
|
||||||
}
|
}
|
||||||
template <typename T> T GetData( ControlPartCode inPartCode , ResType inTag )
|
template <typename T> T GetData( ControlPartCode inPartCode , ResType inTag ) const
|
||||||
{
|
{
|
||||||
T value ;
|
T value ;
|
||||||
verify_noerr( GetData<T>( inPartCode , inTag , &value ) ) ;
|
verify_noerr( GetData<T>( inPartCode , inTag , &value ) ) ;
|
||||||
@@ -390,11 +392,14 @@ public :
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Flash the control for the specified amount of time
|
// 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 :
|
protected :
|
||||||
ControlRef m_controlRef ;
|
ControlRef m_controlRef ;
|
||||||
|
wxFont m_font ;
|
||||||
|
long m_windowStyle ;
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
#endif // wxUSE_GUI
|
#endif // wxUSE_GUI
|
||||||
|
Reference in New Issue
Block a user