]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/renderer.cpp
supporting more key equivalents for display, fixing setHidden: method warning
[wxWidgets.git] / src / osx / carbon / renderer.cpp
index cf8c734dc33dfdc6eebb9fdd91ac5a115dd4892c..9fc1a415bfb27914420bf0506760178b7b6b8d65 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     20.07.2003
 // RCS-ID:      $Id$
 // Copyright:   (c) 2003 Vadim Zeitlin <vadim@wxwindows.org>
-// License:     wxWindows licence
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 // for compilers that support precompilation, includes "wx.h".
@@ -24,6 +24,7 @@
     #include "wx/bitmap.h"
     #include "wx/settings.h"
     #include "wx/dcclient.h"
+    #include "wx/dcmemory.h"
     #include "wx/toplevel.h"
 #endif
 
     #include "wx/mstream.h"
 #endif // wxHAS_DRAW_TITLE_BAR_BITMAP
 
+
 // check if we're currently in a paint event
 inline bool wxInPaintEvent(wxWindow* win, wxDC& dc)
 {
-    wxUnusedVar(dc);
-    return ( win->MacGetCGContextRef() != NULL );
+    return win->MacGetCGContextRef() != NULL ||
+           // wxMemoryDC's also have a valid CGContext.
+           dc.IsKindOf( CLASSINFO(wxMemoryDC) );
 }
 
 
@@ -59,6 +62,8 @@ public:
 
     virtual int GetHeaderButtonHeight(wxWindow *win);
 
+    virtual int GetHeaderButtonMargin(wxWindow *win);
+
     // draw the expanded/collapsed icon for a tree control item
     virtual void DrawTreeItemButton( wxWindow *win,
         wxDC& dc,
@@ -222,6 +227,12 @@ int wxRendererMac::GetHeaderButtonHeight(wxWindow* WXUNUSED(win))
     return -1;
 }
 
+int wxRendererMac::GetHeaderButtonMargin(wxWindow *WXUNUSED(win))
+{
+    wxFAIL_MSG( "GetHeaderButtonMargin() not implemented" );
+    return -1;
+}
+
 void wxRendererMac::DrawTreeItemButton( wxWindow *win,
     wxDC& dc,
     const wxRect& rect,
@@ -301,12 +312,12 @@ void wxRendererMac::DrawSplitterSash( wxWindow *win,
 
         if ( hasMetal )
             HIThemeDrawBackground(&splitterRect, &bgdrawInfo, cgContext, kHIThemeOrientationNormal);
-        else 
+        else
         {
             CGContextSetFillColorWithColor(cgContext,win->GetBackgroundColour().GetCGColor());
             CGContextFillRect(cgContext,splitterRect);
         }
-        
+
         HIThemeSplitterDrawInfo drawInfo;
         drawInfo.version = 0;
         drawInfo.state = kThemeStateActive;
@@ -809,4 +820,4 @@ void wxRendererMac::DrawTitleBarBitmap(wxWindow *win,
 
 #endif // wxHAS_DRAW_TITLE_BAR_BITMAP
 
-#endif
\ No newline at end of file
+#endif