+
+void
+wxRendererMac::DrawCheckBox(wxWindow *win,
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ if (flags & wxCONTROL_CHECKED)
+ flags |= wxCONTROL_SELECTED;
+
+ DrawMacThemeButton(win, dc, rect, flags,
+ kThemeCheckBox, kThemeAdornmentNone);
+}
+
+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;
+ }
+
+ 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 ) ;
+}
+