DECLARE_NO_COPY_CLASS(wxMacPortSaver)
public:
- wxMacPortSaver( GrafPtr port )
- {
- ::GetPort( &m_port ) ;
- ::SetPort( port ) ;
- }
- ~wxMacPortSaver()
- {
- ::SetPort( m_port ) ;
- }
+ wxMacPortSaver( GrafPtr port );
+ ~wxMacPortSaver();
private :
GrafPtr m_port ;
} ;
template<> inline EventParamType wxMacGetEventParamType<Point>() { return typeQDPoint ; }
template<> inline EventParamType wxMacGetEventParamType<Rect>() { return typeQDRectangle ; }
template<> inline EventParamType wxMacGetEventParamType<Boolean>() { return typeBoolean ; }
+template<> inline EventParamType wxMacGetEventParamType<SInt16>() { return typeSInt16 ; }
+template<> inline EventParamType wxMacGetEventParamType<SInt32>() { return typeSInt32 ; }
+template<> inline EventParamType wxMacGetEventParamType<UInt32>() { return typeUInt32 ; }
+template<> inline EventParamType wxMacGetEventParamType<RGBColor>() { return typeRGBColor ; }
#if TARGET_API_MAC_OSX
template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand ; }
template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint ; }
template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect ; }
template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr ; }
#endif
+template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef ; }
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
/*
{
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 ) ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ) ;
+#if WORDS_BIGENDIAN
+ inline Rect* wxMacGetPictureBounds( PicHandle pict , Rect* rect )
+ {
+ *rect = (**pict).picFrame ;
+ return rect ;
+ }
+#else
+ inline Rect* wxMacGetPictureBounds( PicHandle pict , Rect* rect )
+ {
+ return QDGetPictureBounds( pict , rect ) ;
+ }
+#endif
+
#endif // wxUSE_GUI
#define wxMAC_DEFINE_PROC_GETTER( UPP , x ) \