// check if we're currently in a paint event
inline bool wxInPaintEvent(wxWindow* win, wxDC& dc)
{
+ wxUnusedVar(dc);
return ( win->MacGetCGContextRef() != NULL );
}
virtual void DrawTextCtrl(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
- virtual void DrawRadioButton(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
+ virtual void DrawRadioBitmap(wxWindow* win, wxDC& dc, const wxRect& rect, int flags=0);
private:
void DrawMacThemeButton(wxWindow *win,
drawInfo.adornment = adornment;
if (flags & wxCONTROL_FOCUSED)
drawInfo.adornment |= kThemeAdornmentFocus;
-
+
HIThemeDrawButton( &headerRect, &drawInfo, cgContext, kHIThemeOrientationNormal, &labelRect );
}
}
flags |= wxCONTROL_SELECTED;
int kind;
-
+
if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL ||
(win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
kind = kThemeCheckBoxSmall;
const wxRect& rect, int flags)
{
int kind;
-
+
if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL ||
(win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
kind = kThemePopupButtonSmall;
const wxRect& rect, int flags)
{
int kind;
-
+
if (win->GetWindowVariant() == wxWINDOW_VARIANT_SMALL ||
(win->GetParent() && win->GetParent()->GetWindowVariant() == wxWINDOW_VARIANT_SMALL))
kind = kThemeComboBoxSmall;
DrawMacThemeButton(win, dc, rect, flags, kind, kThemeAdornmentNone);
}
-void wxRendererMac::DrawRadioButton(wxWindow* win, wxDC& dc,
+void wxRendererMac::DrawRadioBitmap(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 = kThemeRadioButtonSmall;
dc.SetBrush( *wxWHITE_BRUSH );
dc.SetPen( *wxTRANSPARENT_PEN );
dc.DrawRectangle(rect);
-
+
dc.SetBrush( *wxTRANSPARENT_BRUSH );
HIRect hiRect = CGRectMake( x, y, w, h );
if ( !wxInPaintEvent(win, dc) )
{
- Rect r =
- {
- (short) hiRect.origin.y, (short) hiRect.origin.x,
- (short) (hiRect.origin.y + hiRect.size.height),
- (short) (hiRect.origin.x + hiRect.size.width)
- };
-
- RgnHandle updateRgn = NewRgn();
- RectRgn( updateRgn, &r );
- HIViewSetNeedsDisplayInRegion( (HIViewRef) win->GetHandle(), updateRgn, true );
- DisposeRgn( updateRgn );
+ win->Refresh( &rect );
}
else
{