{
return SetData( inPartCode , inTag , sizeof( T ) , &data ) ;
}
+ template <typename T> OSStatus SetData( ResType inTag , const T *data )
+ {
+ return SetData( kControlEntireControl , inTag , sizeof( T ) , data ) ;
+ }
+ template <typename T> OSStatus SetData( ResType inTag , const T& data )
+ {
+ return SetData( kControlEntireControl , inTag , sizeof( T ) , &data ) ;
+ }
template <typename T> OSStatus GetData( ControlPartCode inPartCode , ResType inTag , T *data ) const
{
Size dummy ;
verify_noerr( GetData<T>( inPartCode , inTag , &value ) ) ;
return value ;
}
-
+ template <typename T> OSStatus GetData( ResType inTag , T *data ) const
+ {
+ Size dummy ;
+ return GetData( kControlEntireControl , inTag , sizeof( T ) , data , &dummy ) ;
+ }
+ template <typename T> T GetData( ResType inTag ) const
+ {
+ T value ;
+ verify_noerr( GetData<T>( kControlEntireControl , inTag , &value ) ) ;
+ return value ;
+ }
+
// Flash the control for the specified amount of time
virtual void Flash( ControlPartCode part , UInt32 ticks = 8 ) ;