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
+#if TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED > MAC_OS_X_VERSION_10_2 )
+template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef ; }
+#endif
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection ; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef ; }
/*
~wxMacCFRefHolder()
{
- CFRelease( m_ref ) ;
+ Release() ;
}
void Release()
{
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 ) ;
virtual void GetFeatures( UInt32 *features ) ;
virtual OSStatus GetRegion( ControlPartCode partCode , RgnHandle region ) ;
virtual OSStatus SetZOrder( bool above , wxMacControl* other ) ;
- // to be moved into a databrowser subclass
-
- virtual OSStatus SetSelectionFlags( DataBrowserSelectionFlags ) ;
- virtual OSStatus AddListViewColumn( DataBrowserListViewColumnDesc *columnDesc,
- DataBrowserTableViewColumnIndex position ) ;
- virtual OSStatus AutoSizeListViewColumns() ;
- virtual OSStatus SetHasScrollBars( bool horiz , bool vert ) ;
- virtual OSStatus SetTableViewHiliteStyle( DataBrowserTableViewHiliteStyle hiliteStyle ) ;
- virtual OSStatus SetListViewHeaderBtnHeight(UInt16 height) ;
- virtual OSStatus SetCallbacks(const DataBrowserCallbacks * callbacks) ;
- virtual OSStatus UpdateItems( DataBrowserItemID container, UInt32 numItems,
- const DataBrowserItemID* items,
- DataBrowserPropertyID preSortProperty,
- DataBrowserPropertyID propertyID ) ;
- virtual OSStatus AddItems( DataBrowserItemID container, UInt32 numItems,
- const DataBrowserItemID* items,
- DataBrowserPropertyID preSortProperty ) ;
- virtual OSStatus RemoveItems( DataBrowserItemID container, UInt32 numItems,
- const DataBrowserItemID* items,
- DataBrowserPropertyID preSortProperty ) ;
- virtual OSStatus RevealItem( DataBrowserItemID item,
- DataBrowserPropertyID propertyID,
- DataBrowserRevealOptions options ) ;
- virtual OSStatus GetSelectionAnchor( DataBrowserItemID * first, DataBrowserItemID * last ) ;
- virtual bool IsItemSelected( DataBrowserItemID item ) ;
- virtual OSStatus SetSelectedItems(UInt32 numItems,
- const DataBrowserItemID * items,
- DataBrowserSetOption operation ) ;
-
- // to be moved into a tab control class
-
- virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
+
bool IsCompositing() { return m_isCompositing ; }
bool IsRootControl() { return m_isRootControl ; }
+
+ // to be moved into a tab control class
+
+ virtual OSStatus SetTabEnabled( SInt16 tabNo , bool enable ) ;
protected :
ControlRef m_controlRef ;
wxFont m_font ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ) ;
+#ifdef 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 ) \