///////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/renderer.cpp
+// Name: src/osx/carbon/renderer.cpp
// Purpose: implementation of wxRendererNative for Mac
// Author: Vadim Zeitlin
// Modified by:
#include "wx/renderer.h"
#include "wx/graphics.h"
-#include "wx/osx/uma.h"
+#include "wx/dcgraph.h"
+#include "wx/osx/private.h"
+#if wxOSX_USE_COCOA
+// bring in the theme headers
+#include <Carbon/Carbon.h>
+#endif
class WXDLLEXPORT wxRendererMac : public wxDelegateRendererNative
{
const wxRect& rect,
int flags = 0);
+ virtual wxSize GetCheckBoxSize(wxWindow* win);
+
virtual void DrawComboBoxDropButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
wxOrientation orient,
int WXUNUSED(flags) )
{
- bool hasMetal = win->MacGetTopLevelWindow()->MacGetMetalAppearance();
+ bool hasMetal = win->MacGetTopLevelWindow()->GetExtraStyle() & wxFRAME_EX_METAL;
SInt32 height;
GetThemeMetric( kThemeMetricSmallPaneSplitterHeight, &height );
HIRect splitterRect;
kThemeCheckBox, kThemeAdornmentNone);
}
+wxSize wxRendererMac::GetCheckBoxSize(wxWindow* WXUNUSED(win))
+{
+ wxSize size;
+ SInt32 width, height;
+ OSStatus errStatus;
+
+ errStatus = GetThemeMetric(kThemeMetricCheckBoxWidth, &width);
+ if (errStatus == noErr)
+ {
+ size.SetWidth(width);
+ }
+
+ errStatus = GetThemeMetric(kThemeMetricCheckBoxHeight, &height);
+ if (errStatus == noErr)
+ {
+ size.SetHeight(height);
+ }
+
+ return size;
+}
+
void
wxRendererMac::DrawComboBoxDropButton(wxWindow *win,
wxDC& dc,
HIThemeDrawFocusRect( &cgrect , true , cgContext , kHIThemeOrientationNormal ) ;
}
-