]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/renderer.cpp
pen.h depends from brush.h in compat mode
[wxWidgets.git] / src / mac / carbon / renderer.cpp
index fb16dd723a4b6ce53764a3bd9db57938a1b11a37..abcc1d6aa2b655e960921e2b1af05663199ec120 100644 (file)
@@ -126,8 +126,9 @@ int wxRendererMac::DrawHeaderButton( wxWindow *win,
     else
     {
         CGContextRef cgContext;
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
 
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         {
             HIThemeButtonDrawInfo drawInfo;
@@ -209,7 +210,8 @@ void wxRendererMac::DrawTreeItemButton( wxWindow *win,
     {
         CGContextRef cgContext;
 
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;
@@ -248,15 +250,15 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win,
 
     if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
     {
-        wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width, 
+        wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width,
                      (int) splitterRect.size.height );
         win->Refresh( &rect );
    }
     else
     {
         CGContextRef cgContext;
-
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeSplitterDrawInfo drawInfo;
         drawInfo.version = 0;
@@ -267,19 +269,19 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win,
 }
 
 void
-wxRendererMac::DrawItemSelectionRect(wxWindow *win,
+wxRendererMac::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
                                      wxDC& dc,
                                      const wxRect& rect,
-                                     int flags )
+                                     int flags)
 {
     if ( !(flags & wxCONTROL_SELECTED) )
         return;
-    
-    wxColour col( wxMacCreateCGColorFromHITheme( (flags & wxCONTROL_FOCUSED) ? 
+
+    wxColour col( wxMacCreateCGColorFromHITheme( (flags & wxCONTROL_FOCUSED) ?
                                                  kThemeBrushAlternatePrimaryHighlightColor
                                                                              : kThemeBrushSecondaryHighlightColor ) );
     wxBrush selBrush( col );
-    
+
     dc.SetPen( *wxTRANSPARENT_PEN );
     dc.SetBrush( selBrush );
     dc.DrawRectangle( rect );
@@ -309,8 +311,9 @@ wxRendererMac::DrawMacThemeButton(wxWindow *win,
     }
     else
     {
+        wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
         CGContextRef cgContext;
-        cgContext = (CGContextRef) dc.GetGraphicsContext()->GetNativeContext();
+        cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
 
         HIThemeButtonDrawInfo drawInfo;
         HIRect labelRect;