maintaining 8.1 compat (defining 8.5 calls)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10121 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -584,7 +584,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
|
|||||||
|
|
||||||
// Create mask
|
// Create mask
|
||||||
if ( image.HasMask() ) {
|
if ( image.HasMask() ) {
|
||||||
SetMask(new wxMask( maskBitmap ));
|
// SetMask(new wxMask( maskBitmap ));
|
||||||
}
|
}
|
||||||
|
|
||||||
UnlockPixels( GetGWorldPixMap(GetHBITMAP()) );
|
UnlockPixels( GetGWorldPixMap(GetHBITMAP()) );
|
||||||
|
@@ -584,7 +584,7 @@ wxBitmap::wxBitmap(const wxImage& image, int depth)
|
|||||||
|
|
||||||
// Create mask
|
// Create mask
|
||||||
if ( image.HasMask() ) {
|
if ( image.HasMask() ) {
|
||||||
SetMask(new wxMask( maskBitmap ));
|
// SetMask(new wxMask( maskBitmap ));
|
||||||
}
|
}
|
||||||
|
|
||||||
UnlockPixels( GetGWorldPixMap(GetHBITMAP()) );
|
UnlockPixels( GetGWorldPixMap(GetHBITMAP()) );
|
||||||
|
@@ -105,7 +105,22 @@ void wxDC::MacSetupPort(AGAPortHelper* help) const
|
|||||||
{
|
{
|
||||||
// help->Setup( m_macPort ) ;
|
// help->Setup( m_macPort ) ;
|
||||||
::SetOrigin(-m_macLocalOrigin.h, -m_macLocalOrigin.v);
|
::SetOrigin(-m_macLocalOrigin.h, -m_macLocalOrigin.v);
|
||||||
::ClipRect(&m_macClipRect);
|
if ( m_clipping )
|
||||||
|
{
|
||||||
|
long x1 = XLOG2DEV(m_clipX1);
|
||||||
|
long y1 = YLOG2DEV(m_clipY1);
|
||||||
|
long x2 = XLOG2DEV(m_clipX2);
|
||||||
|
long y2 = YLOG2DEV(m_clipY2);
|
||||||
|
|
||||||
|
Rect clip = { y1 , x1 , y2 , x2 } ;
|
||||||
|
::SectRect( &clip , &m_macClipRect , &clip ) ;
|
||||||
|
::ClipRect( &clip ) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
::ClipRect(&m_macClipRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_macFontInstalled = false ;
|
m_macFontInstalled = false ;
|
||||||
m_macBrushInstalled = false ;
|
m_macBrushInstalled = false ;
|
||||||
@@ -206,7 +221,6 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
|
|||||||
|
|
||||||
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
||||||
{
|
{
|
||||||
wxMacPortSetter helper(this) ;
|
|
||||||
if( m_clipping )
|
if( m_clipping )
|
||||||
{
|
{
|
||||||
m_clipX1 = wxMax( m_clipX1 , x ) ;
|
m_clipX1 = wxMax( m_clipX1 , x ) ;
|
||||||
@@ -223,17 +237,7 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
|
|||||||
m_clipX2 = x + width;
|
m_clipX2 = x + width;
|
||||||
m_clipY2 = y + height;
|
m_clipY2 = y + height;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
long x1 = XLOG2DEV(m_clipX1);
|
|
||||||
long y1 = YLOG2DEV(m_clipY1);
|
|
||||||
long x2 = XLOG2DEV(m_clipX2);
|
|
||||||
long y2 = YLOG2DEV(m_clipY2);
|
|
||||||
|
|
||||||
Rect clip = { y1 , x1 , y2 , x2 } ;
|
|
||||||
|
|
||||||
::ClipRect( &clip ) ;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
||||||
{
|
{
|
||||||
@@ -255,8 +259,6 @@ void wxDC::DestroyClippingRegion(void)
|
|||||||
{
|
{
|
||||||
wxMacPortSetter helper(this) ;
|
wxMacPortSetter helper(this) ;
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
// Rect clip = { -32000 , -32000 , 32000 , 32000 } ;
|
|
||||||
::ClipRect(&m_macClipRect);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void wxDC::DoGetSize( int* width, int* height ) const
|
void wxDC::DoGetSize( int* width, int* height ) const
|
||||||
|
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
#define GetControlOwner( control ) (**control).contrlOwner
|
#define GetControlOwner( control ) (**control).contrlOwner
|
||||||
|
// since we always call this in the right context we don't have to set and reset the port
|
||||||
|
#define InvalWindowRgn( window , rgn ) InvalRgn( rgn )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool sUMAHasAppearance = false ;
|
static bool sUMAHasAppearance = false ;
|
||||||
@@ -459,7 +461,7 @@ void UMAActivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -479,7 +481,7 @@ void UMAActivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -490,7 +492,7 @@ void UMADrawControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -510,7 +512,7 @@ void UMADrawControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -521,7 +523,7 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -541,7 +543,7 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -552,7 +554,7 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -572,18 +574,19 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMADeactivateControl( ControlHandle inControl )
|
void UMADeactivateControl( ControlHandle inControl )
|
||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -603,7 +606,7 @@ void UMADeactivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -700,13 +703,12 @@ void UMADisposeControl (ControlHandle theControl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UMAHiliteControl (ControlHandle inControl,
|
void UMAHiliteControl (ControlHandle inControl,
|
||||||
ControlPartCode hiliteState)
|
ControlPartCode hiliteState)
|
||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -719,7 +721,7 @@ void UMAHiliteControl (ControlHandle inControl,
|
|||||||
{
|
{
|
||||||
::HiliteControl( inControl , hiliteState ) ;
|
::HiliteControl( inControl , hiliteState ) ;
|
||||||
}
|
}
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -730,7 +732,7 @@ void UMAShowControl (ControlHandle inControl)
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -743,7 +745,7 @@ void UMAShowControl (ControlHandle inControl)
|
|||||||
{
|
{
|
||||||
::ShowControl( inControl ) ;
|
::ShowControl( inControl ) ;
|
||||||
}
|
}
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -1001,7 +1003,7 @@ void UMAIdleControls (WindowPtr inWindow)
|
|||||||
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||||
{
|
{
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
||||||
@@ -1021,7 +1023,7 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( inWindow, updateRgn) ;
|
InvalWindowRgn( inWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
|
@@ -105,7 +105,22 @@ void wxDC::MacSetupPort(AGAPortHelper* help) const
|
|||||||
{
|
{
|
||||||
// help->Setup( m_macPort ) ;
|
// help->Setup( m_macPort ) ;
|
||||||
::SetOrigin(-m_macLocalOrigin.h, -m_macLocalOrigin.v);
|
::SetOrigin(-m_macLocalOrigin.h, -m_macLocalOrigin.v);
|
||||||
::ClipRect(&m_macClipRect);
|
if ( m_clipping )
|
||||||
|
{
|
||||||
|
long x1 = XLOG2DEV(m_clipX1);
|
||||||
|
long y1 = YLOG2DEV(m_clipY1);
|
||||||
|
long x2 = XLOG2DEV(m_clipX2);
|
||||||
|
long y2 = YLOG2DEV(m_clipY2);
|
||||||
|
|
||||||
|
Rect clip = { y1 , x1 , y2 , x2 } ;
|
||||||
|
::SectRect( &clip , &m_macClipRect , &clip ) ;
|
||||||
|
::ClipRect( &clip ) ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
::ClipRect(&m_macClipRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
m_macFontInstalled = false ;
|
m_macFontInstalled = false ;
|
||||||
m_macBrushInstalled = false ;
|
m_macBrushInstalled = false ;
|
||||||
@@ -206,7 +221,6 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
|
|||||||
|
|
||||||
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
|
||||||
{
|
{
|
||||||
wxMacPortSetter helper(this) ;
|
|
||||||
if( m_clipping )
|
if( m_clipping )
|
||||||
{
|
{
|
||||||
m_clipX1 = wxMax( m_clipX1 , x ) ;
|
m_clipX1 = wxMax( m_clipX1 , x ) ;
|
||||||
@@ -223,17 +237,7 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
|
|||||||
m_clipX2 = x + width;
|
m_clipX2 = x + width;
|
||||||
m_clipY2 = y + height;
|
m_clipY2 = y + height;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
long x1 = XLOG2DEV(m_clipX1);
|
|
||||||
long y1 = YLOG2DEV(m_clipY1);
|
|
||||||
long x2 = XLOG2DEV(m_clipX2);
|
|
||||||
long y2 = YLOG2DEV(m_clipY2);
|
|
||||||
|
|
||||||
Rect clip = { y1 , x1 , y2 , x2 } ;
|
|
||||||
|
|
||||||
::ClipRect( &clip ) ;
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
void wxDC::DoSetClippingRegionAsRegion( const wxRegion ®ion )
|
||||||
{
|
{
|
||||||
@@ -255,8 +259,6 @@ void wxDC::DestroyClippingRegion(void)
|
|||||||
{
|
{
|
||||||
wxMacPortSetter helper(this) ;
|
wxMacPortSetter helper(this) ;
|
||||||
m_clipping = FALSE;
|
m_clipping = FALSE;
|
||||||
// Rect clip = { -32000 , -32000 , 32000 , 32000 } ;
|
|
||||||
::ClipRect(&m_macClipRect);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void wxDC::DoGetSize( int* width, int* height ) const
|
void wxDC::DoGetSize( int* width, int* height ) const
|
||||||
|
@@ -13,6 +13,8 @@
|
|||||||
|
|
||||||
#if !TARGET_CARBON
|
#if !TARGET_CARBON
|
||||||
#define GetControlOwner( control ) (**control).contrlOwner
|
#define GetControlOwner( control ) (**control).contrlOwner
|
||||||
|
// since we always call this in the right context we don't have to set and reset the port
|
||||||
|
#define InvalWindowRgn( window , rgn ) InvalRgn( rgn )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static bool sUMAHasAppearance = false ;
|
static bool sUMAHasAppearance = false ;
|
||||||
@@ -459,7 +461,7 @@ void UMAActivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -479,7 +481,7 @@ void UMAActivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -490,7 +492,7 @@ void UMADrawControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -510,7 +512,7 @@ void UMADrawControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -521,7 +523,7 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -541,7 +543,7 @@ void UMAMoveControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -552,7 +554,7 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -572,18 +574,19 @@ void UMASizeControl( ControlHandle inControl , short x , short y )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UMADeactivateControl( ControlHandle inControl )
|
void UMADeactivateControl( ControlHandle inControl )
|
||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -603,7 +606,7 @@ void UMADeactivateControl( ControlHandle inControl )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -700,13 +703,12 @@ void UMADisposeControl (ControlHandle theControl)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void UMAHiliteControl (ControlHandle inControl,
|
void UMAHiliteControl (ControlHandle inControl,
|
||||||
ControlPartCode hiliteState)
|
ControlPartCode hiliteState)
|
||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -719,7 +721,7 @@ void UMAHiliteControl (ControlHandle inControl,
|
|||||||
{
|
{
|
||||||
::HiliteControl( inControl , hiliteState ) ;
|
::HiliteControl( inControl , hiliteState ) ;
|
||||||
}
|
}
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -730,7 +732,7 @@ void UMAShowControl (ControlHandle inControl)
|
|||||||
{
|
{
|
||||||
WindowRef theWindow = GetControlOwner(inControl) ;
|
WindowRef theWindow = GetControlOwner(inControl) ;
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( theWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
GetWindowUpdateRgn( theWindow , updateRgn ) ;
|
||||||
@@ -743,7 +745,7 @@ void UMAShowControl (ControlHandle inControl)
|
|||||||
{
|
{
|
||||||
::ShowControl( inControl ) ;
|
::ShowControl( inControl ) ;
|
||||||
}
|
}
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( theWindow, updateRgn) ;
|
InvalWindowRgn( theWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
@@ -1001,7 +1003,7 @@ void UMAIdleControls (WindowPtr inWindow)
|
|||||||
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
||||||
{
|
{
|
||||||
RgnHandle updateRgn = NewRgn() ;
|
RgnHandle updateRgn = NewRgn() ;
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
GetWindowRegion( inWindow , kWindowUpdateRgn, updateRgn ) ;
|
||||||
#else
|
#else
|
||||||
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
GetWindowUpdateRgn( inWindow , updateRgn ) ;
|
||||||
@@ -1021,7 +1023,7 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0340)
|
#if defined(UNIVERSAL_INTERFACES_VERSION) && (UNIVERSAL_INTERFACES_VERSION >= 0x0332)
|
||||||
InvalWindowRgn( inWindow, updateRgn) ;
|
InvalWindowRgn( inWindow, updateRgn) ;
|
||||||
#else
|
#else
|
||||||
InvalRgn( updateRgn ) ;
|
InvalRgn( updateRgn ) ;
|
||||||
|
Reference in New Issue
Block a user