minor reformat
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -265,7 +265,7 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
{
|
{
|
||||||
#if wxMAC_USE_CORE_GRAPHICS
|
#if wxMAC_USE_CORE_GRAPHICS
|
||||||
bool created = false ;
|
bool created = false ;
|
||||||
CGContextRef cgContext = 0 ;
|
CGContextRef cgContext = NULL ;
|
||||||
if ( cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) != noErr )
|
if ( cEvent.GetParameter<CGContextRef>(kEventParamCGContextRef, &cgContext) != noErr )
|
||||||
{
|
{
|
||||||
wxASSERT( thisWindow->GetPeer()->IsCompositing() == false ) ;
|
wxASSERT( thisWindow->GetPeer()->IsCompositing() == false ) ;
|
||||||
@@ -292,9 +292,10 @@ static pascal OSStatus wxMacWindowControlEventHandler( EventHandlerCallRef handl
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
CGContextSetRGBFillColor( cgContext , 1.0 , 1.0 , 1.0 , 1.0 ) ;
|
CGContextSetRGBFillColor( cgContext , 1.0 , 1.0 , 1.0 , 1.0 ) ;
|
||||||
CGContextFillRect(cgContext , CGRectMake( 0 , 0 ,
|
CGContextFillRect( cgContext ,
|
||||||
controlBounds.right - controlBounds.left ,
|
CGRectMake( 0 , 0 ,
|
||||||
controlBounds.bottom - controlBounds.top ) );
|
controlBounds.right - controlBounds.left ,
|
||||||
|
controlBounds.bottom - controlBounds.top ) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -594,7 +595,7 @@ void wxWindowMac::MacControlUserPaneDrawProc(wxInt16 part)
|
|||||||
int x = 0 , y = 0;
|
int x = 0 , y = 0;
|
||||||
RgnHandle rgn = NewRgn() ;
|
RgnHandle rgn = NewRgn() ;
|
||||||
GetClip( rgn ) ;
|
GetClip( rgn ) ;
|
||||||
MacWindowToRootWindow( &x,&y ) ;
|
MacWindowToRootWindow( &x, &y ) ;
|
||||||
OffsetRgn( rgn , -x , -y ) ;
|
OffsetRgn( rgn , -x , -y ) ;
|
||||||
wxMacWindowStateSaver sv( this ) ;
|
wxMacWindowStateSaver sv( this ) ;
|
||||||
SectRgn( rgn , (RgnHandle) MacGetVisibleRegion().GetWXHRGN() , rgn ) ;
|
SectRgn( rgn , (RgnHandle) MacGetVisibleRegion().GetWXHRGN() , rgn ) ;
|
||||||
@@ -1270,7 +1271,7 @@ void wxWindowMac::DoScreenToClient(int *x, int *y) const
|
|||||||
void wxWindowMac::DoClientToScreen(int *x, int *y) const
|
void wxWindowMac::DoClientToScreen(int *x, int *y) const
|
||||||
{
|
{
|
||||||
WindowRef window = (WindowRef) MacGetTopLevelWindowRef() ;
|
WindowRef window = (WindowRef) MacGetTopLevelWindowRef() ;
|
||||||
wxCHECK_RET( window , wxT("TopLevel Window Missing") ) ;
|
wxCHECK_RET( window , wxT("TopLevel window missing") ) ;
|
||||||
|
|
||||||
wxPoint origin = GetClientAreaOrigin() ;
|
wxPoint origin = GetClientAreaOrigin() ;
|
||||||
if (x)
|
if (x)
|
||||||
@@ -1281,7 +1282,7 @@ void wxWindowMac::DoClientToScreen(int *x, int *y) const
|
|||||||
MacWindowToRootWindow( x , y ) ;
|
MacWindowToRootWindow( x , y ) ;
|
||||||
|
|
||||||
{
|
{
|
||||||
Point localwhere = { 0,0 };
|
Point localwhere = { 0, 0 };
|
||||||
if (x)
|
if (x)
|
||||||
localwhere.h = * x ;
|
localwhere.h = * x ;
|
||||||
if (y)
|
if (y)
|
||||||
@@ -1442,7 +1443,7 @@ wxSize wxWindowMac::DoGetSizeFromClientSize( const wxSize & size ) const
|
|||||||
// structure is in parent coordinates, but we only need width and height, so it's ok
|
// structure is in parent coordinates, but we only need width and height, so it's ok
|
||||||
|
|
||||||
sizeTotal.x += (structure.right - structure.left) - (content.right - content.left) ;
|
sizeTotal.x += (structure.right - structure.left) - (content.right - content.left) ;
|
||||||
sizeTotal.y += (structure.bottom - structure.top) - (content.bottom - content.top ) ;
|
sizeTotal.y += (structure.bottom - structure.top) - (content.bottom - content.top) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
DisposeRgn( rgn ) ;
|
DisposeRgn( rgn ) ;
|
||||||
@@ -1561,7 +1562,7 @@ bool wxWindowMac::DoPopupMenu(wxMenu *menu, int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
menu->MacAfterDisplay( true ) ;
|
menu->MacAfterDisplay( true ) ;
|
||||||
menu->SetInvokingWindow(NULL);
|
menu->SetInvokingWindow( NULL );
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -1717,9 +1718,9 @@ void wxWindowMac::MacInvalidateBorders()
|
|||||||
UnionRgn( updateOuter , updateTotal , updateTotal ) ;
|
UnionRgn( updateOuter , updateTotal , updateTotal ) ;
|
||||||
|
|
||||||
GetParent()->m_peer->SetNeedsDisplay( updateTotal ) ;
|
GetParent()->m_peer->SetNeedsDisplay( updateTotal ) ;
|
||||||
DisposeRgn(updateOuter) ;
|
DisposeRgn( updateOuter ) ;
|
||||||
DisposeRgn(updateInner) ;
|
DisposeRgn( updateInner ) ;
|
||||||
DisposeRgn(updateTotal) ;
|
DisposeRgn( updateTotal ) ;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user