+void wxRendererMac::DrawSplitterSash( wxWindow *win,
+ wxDC& dc,
+ const wxSize& size,
+ wxCoord position,
+ wxOrientation orient,
+ int WXUNUSED(flags) )
+{
+ bool hasMetal = win->MacGetTopLevelWindow()->MacGetMetalAppearance();
+ SInt32 height;
+ GetThemeMetric( kThemeMetricSmallPaneSplitterHeight, &height );
+ HIRect splitterRect;
+ if (orient == wxVERTICAL)
+ splitterRect = CGRectMake( position, 0, height, size.y );
+ else
+ splitterRect = CGRectMake( 0, position, size.x, height );
+
+ // under compositing we should only draw when called by the OS, otherwise just issue a redraw command
+ // strange redraw errors occur if we don't do this
+
+ if ( !dc.IsKindOf( CLASSINFO( wxPaintDC ) ) )
+ {
+ wxRect rect( (int) splitterRect.origin.x, (int) splitterRect.origin.y, (int) splitterRect.size.width,
+ (int) splitterRect.size.height );
+ win->Refresh( &rect );
+ }
+ else
+ {
+ CGContextRef cgContext;
+ wxGCDCImpl *impl = (wxGCDCImpl*) dc.GetImpl();
+ cgContext = (CGContextRef) impl->GetGraphicsContext()->GetNativeContext();
+
+ HIThemeSplitterDrawInfo drawInfo;
+ drawInfo.version = 0;
+ drawInfo.state = kThemeStateActive;
+ drawInfo.adornment = hasMetal ? kHIThemeSplitterAdornmentMetal : kHIThemeSplitterAdornmentNone;
+ HIThemeDrawPaneSplitter( &splitterRect, &drawInfo, cgContext, kHIThemeOrientationNormal );
+ }
+}
+
+void
+wxRendererMac::DrawItemSelectionRect(wxWindow * WXUNUSED(win),
+ wxDC& dc,
+ const wxRect& rect,
+ int flags)
+{
+ if ( !(flags & wxCONTROL_SELECTED) )
+ return;
+
+ wxColour col( wxMacCreateCGColorFromHITheme( (flags & wxCONTROL_FOCUSED) ?
+ kThemeBrushAlternatePrimaryHighlightColor
+ : kThemeBrushSecondaryHighlightColor ) );
+ wxBrush selBrush( col );
+
+ dc.SetPen( *wxTRANSPARENT_PEN );
+ dc.SetBrush( selBrush );
+ dc.DrawRectangle( rect );
+}
+
+