+
+#if wxMAC_USE_CORE_GRAPHICS
+#else
+ QDEndCGContext( (CGrafPtr) dc.m_macPort, &cgContext );
+#endif
+ }
+}
+
+
+void
+wxRendererMac::DrawComboBoxDropButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ int kind;
+ if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
+ kind = kThemeArrowButtonSmall;
+ else if (win->GetWindowVariant() == wxWINDOW_VARIANT_MINI || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI))
+ kind = kThemeArrowButtonMini;
+ else
+ kind = kThemeArrowButton;
+
+ DrawMacThemeButton(win, dc, rect, flags,
+ kind, kThemeAdornmentArrowDownArrow);
+}
+
+void
+wxRendererMac::DrawPushButton(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ int kind;
+ if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
+ kind = kThemeBevelButtonSmall;
+ // There is no kThemeBevelButtonMini, but in this case, use Small
+ else if (win->GetWindowVariant() == wxWINDOW_VARIANT_MINI || (win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_MINI))
+ kind = kThemeBevelButtonSmall;
+ else
+ kind = kThemeBevelButton;
+
+ DrawMacThemeButton(win, dc, rect, flags,
+ kind, kThemeAdornmentNone);
+}
+
+void
+wxRendererMac::DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags)
+{
+ if (!win)
+ {
+ wxDelegateRendererNative::DrawFocusRect(win, dc, rect, flags);
+ return;
+ }
+
+#if wxMAC_USE_CORE_GRAPHICS
+ {
+ CGRect cgrect = CGRectMake( rect.x , rect.y , rect.width, rect.height ) ;
+
+ HIThemeFrameDrawInfo info ;
+ memset( &info, 0 , sizeof(info) ) ;
+
+ info.version = 0 ;
+ info.kind = 0 ;
+ info.state = kThemeStateActive;
+ info.isFocused = true ;
+
+ CGContextRef cgContext = (CGContextRef) win->MacGetCGContextRef() ;
+ wxASSERT( cgContext ) ;
+
+ HIThemeDrawFocusRect( &cgrect , true , cgContext , kHIThemeOrientationNormal ) ;
+ }
+#else
+ // FIXME: not yet working for !wxMAC_USE_CORE_GRAPHICS
+ {
+ Rect r;
+ r.left = rect.x; r.top = rect.y; r.right = rect.GetRight(); r.bottom = rect.GetBottom();
+ wxTopLevelWindowMac* top = win->MacGetTopLevelWindow();
+ if ( top )