X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5921f83f7382082cd66936f2a678827317c55b1e..f816930c05be30305b20b96fe6f704e496db4f15:/include/wx/mac/private.h diff --git a/include/wx/mac/private.h b/include/wx/mac/private.h index b2ad16aff3..af3ab308ec 100644 --- a/include/wx/mac/private.h +++ b/include/wx/mac/private.h @@ -37,53 +37,59 @@ class wxMacPortStateHelper { -public : - wxMacPortStateHelper( GrafPtr newport) ; - wxMacPortStateHelper() ; - ~wxMacPortStateHelper() ; + DECLARE_NO_COPY_CLASS(wxMacPortStateHelper) + +public: + wxMacPortStateHelper( GrafPtr newport) ; + wxMacPortStateHelper() ; + ~wxMacPortStateHelper() ; - void Setup( GrafPtr newport ) ; - void Clear() ; - bool IsCleared() { return m_clip == NULL ; } - GrafPtr GetCurrentPort() { return m_currentPort ; } + void Setup( GrafPtr newport ) ; + void Clear() ; + bool IsCleared() { return m_clip == NULL ; } + GrafPtr GetCurrentPort() { return m_currentPort ; } -private : - GrafPtr m_currentPort ; - GrafPtr m_oldPort ; - RgnHandle m_clip ; - ThemeDrawingState m_drawingState ; - short m_textFont ; - short m_textSize ; - short m_textStyle ; - short m_textMode ; +private: + GrafPtr m_currentPort ; + GrafPtr m_oldPort ; + RgnHandle m_clip ; + ThemeDrawingState m_drawingState ; + short m_textFont ; + short m_textSize ; + short m_textStyle ; + short m_textMode ; } ; class WXDLLEXPORT wxMacPortSetter { -public : - wxMacPortSetter( const wxDC* dc ) ; - ~wxMacPortSetter() ; -private : - wxMacPortStateHelper m_ph ; - wxDC* m_dc ; + DECLARE_NO_COPY_CLASS(wxMacPortSetter) + +public: + wxMacPortSetter( const wxDC* dc ) ; + ~wxMacPortSetter() ; +private: + wxMacPortStateHelper m_ph ; + const wxDC* m_dc ; } ; class wxMacDrawingHelper { -public : - wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ; - ~wxMacDrawingHelper() ; - bool Ok() { return m_ok ; } - void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; } - void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; } - void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; } - const Point& GetOrigin() { return m_origin ; } -private : - Point m_origin ; - GrafPtr m_formerPort ; - GrafPtr m_currentPort ; - PenState m_savedPenState ; - bool m_ok ; + DECLARE_NO_COPY_CLASS(wxMacDrawingHelper) + +public: + wxMacDrawingHelper( wxWindowMac * theWindow , bool clientArea = false ) ; + ~wxMacDrawingHelper() ; + bool Ok() { return m_ok ; } + void LocalToWindow( Rect *rect) { OffsetRect( rect , m_origin.h , m_origin.v ) ; } + void LocalToWindow( Point *pt ) { AddPt( m_origin , pt ) ; } + void LocalToWindow( RgnHandle rgn ) { OffsetRgn( rgn , m_origin.h , m_origin.v ) ; } + const Point& GetOrigin() { return m_origin ; } +private: + Point m_origin ; + GrafPtr m_formerPort ; + GrafPtr m_currentPort ; + PenState m_savedPenState ; + bool m_ok ; } ; @@ -109,6 +115,7 @@ PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ; CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ; void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; CTabHandle wxMacCreateColorTable( int numColors ) ; +void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap ) ; #define MAC_WXCOLORREF(a) (*((RGBColor*)&(a))) #define MAC_WXHBITMAP(a) (GWorldPtr(a))