monodll_minifram.o \
monodll_pen.o \
monodll_popupwin.o \
+ monodll_private.o \
monodll_region.o \
monodll_renderer.o \
monodll_settings.o \
monodll_minifram.o \
monodll_pen.o \
monodll_popupwin.o \
+ monodll_private.o \
monodll_region.o \
monodll_renderer.o \
monodll_settings.o \
monolib_minifram.o \
monolib_pen.o \
monolib_popupwin.o \
+ monolib_private.o \
monolib_region.o \
monolib_renderer.o \
monolib_settings.o \
monolib_minifram.o \
monolib_pen.o \
monolib_popupwin.o \
+ monolib_private.o \
monolib_region.o \
monolib_renderer.o \
monolib_settings.o \
coredll_minifram.o \
coredll_pen.o \
coredll_popupwin.o \
+ coredll_private.o \
coredll_region.o \
coredll_renderer.o \
coredll_settings.o \
coredll_minifram.o \
coredll_pen.o \
coredll_popupwin.o \
+ coredll_private.o \
coredll_region.o \
coredll_renderer.o \
coredll_settings.o \
corelib_minifram.o \
corelib_pen.o \
corelib_popupwin.o \
+ corelib_private.o \
corelib_region.o \
corelib_renderer.o \
corelib_settings.o \
corelib_minifram.o \
corelib_pen.o \
corelib_popupwin.o \
+ corelib_private.o \
corelib_region.o \
corelib_renderer.o \
corelib_settings.o \
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monodll_popupwin.o: $(srcdir)/src/os2/popupwin.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/os2/popupwin.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@monodll_private.o: $(srcdir)/src/gtk/private.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/private.cpp
+
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@monodll_region.o: $(srcdir)/src/gtk/region.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/gtk/region.cpp
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monolib_popupwin.o: $(srcdir)/src/os2/popupwin.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/os2/popupwin.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@monolib_private.o: $(srcdir)/src/gtk/private.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/private.cpp
+
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@monolib_region.o: $(srcdir)/src/gtk/region.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/gtk/region.cpp
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@coredll_popupwin.o: $(srcdir)/src/os2/popupwin.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/os2/popupwin.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@coredll_private.o: $(srcdir)/src/gtk/private.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/private.cpp
+
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@coredll_region.o: $(srcdir)/src/gtk/region.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/gtk/region.cpp
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@corelib_popupwin.o: $(srcdir)/src/os2/popupwin.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/os2/popupwin.cpp
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@corelib_private.o: $(srcdir)/src/gtk/private.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/private.cpp
+
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@corelib_region.o: $(srcdir)/src/gtk/region.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_GTK_TOOLKIT_VERSION_2_USE_GUI_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/gtk/region.cpp
src/gtk/minifram.cpp
src/gtk/pen.cpp
src/gtk/popupwin.cpp
+ src/gtk/private.cpp
src/gtk/region.cpp
src/gtk/renderer.cpp
src/gtk/settings.cpp
} // extern "C"
+
+// ----------------------------------------------------------------------------
+// various private helper functions
+// ----------------------------------------------------------------------------
+
+namespace wxGTKPrivate
+{
+
+// these functions create the GTK widgets of the specified types which can then
+// used to retrieve their styles, pass them to drawing functions &c
+//
+// the returned widgets shouldn't be destroyed, this is done automatically on
+// shutdown
+GtkWidget *GetButtonWidget();
+GtkWidget *GetCheckButtonWidget();
+GtkWidget *GetEntryWidget();
+GtkWidget *GetHeaderButtonWidget();
+GtkWidget *GetSplitterWidget();
+GtkWidget *GetTreeWidget();
+
+} // wxGTKPrivate
+
#endif // _WX_GTK_PRIVATE_H_
class WXDLLIMPEXP_FWD_CORE wxDC;
class WXDLLIMPEXP_FWD_CORE wxWindow;
-#include "wx/gdicmn.h" // for wxPoint
+#include "wx/gdicmn.h" // for wxPoint, wxSize
#include "wx/colour.h"
#include "wx/font.h"
#include "wx/bitmap.h"
const wxRect& rect,
int flags = 0) = 0;
+ // Returns the default size of a check box.
+ virtual wxSize GetCheckBoxSize(wxWindow *win) = 0;
+
// draw blank button
//
// flags may use wxCONTROL_PRESSED, wxCONTROL_CURRENT and wxCONTROL_ISDEFAULT
int flags = 0 )
{ m_rendererNative.DrawCheckBox( win, dc, rect, flags ); }
+ virtual wxSize GetCheckBoxSize(wxWindow *win)
+ { return m_rendererNative.GetCheckBoxSize(win); }
+
virtual void DrawPushButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
virtual void DrawCheckBox(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0 );
+ virtual wxSize GetCheckBoxSize(wxWindow *win);
+
virtual void DrawPushButton(wxWindow *win, wxDC& dc,
const wxRect& rect, int flags = 0 );
~wxRendererNative();
/**
- Draw a check box (used by wxDataViewCtrl).
+ Draw a check box.
@a flags may have the @c wxCONTROL_CHECKED, @c wxCONTROL_CURRENT or
@c wxCONTROL_UNDETERMINED bit set, see @ref wxCONTROL_FLAGS.
*/
static wxRendererNative GetGeneric();
+ /**
+ Returns the size of a check box.
+ */
+ virtual wxSize GetCheckBoxSize(wxWindow *win);
+
/**
Returns the height of a header button, either a fixed platform height if
available, or a
const wxRect& rect,
int flags = 0);
+ virtual wxSize GetCheckBoxSize(wxWindow *win);
+
virtual void DrawPushButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
}
}
+wxSize wxRendererGeneric::GetCheckBoxSize(wxWindow *WXUNUSED(win))
+{
+ return wxSize(16, 16);
+}
+
void
wxRendererGeneric::DrawPushButton(wxWindow *win,
wxDC& dc,
--- /dev/null
+///////////////////////////////////////////////////////////////////////////////
+// Name: src/gtk/private.cpp
+// Purpose: implementation of wxGTK private functions
+// Author: Marcin Malich
+// Modified by:
+// Created: 28.06.2008
+// RCS-ID: $Id$
+// Copyright: (c) 2008 Marcin Malich <me@malcom.pl>
+// License: wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// for compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+ #pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+ #include "wx/module.h"
+#endif
+
+#include "wx/gtk/private.h"
+
+// ----------------------------------------------------------------------------
+// wxGTKPrivate functions implementation
+// ----------------------------------------------------------------------------
+
+namespace wxGTKPrivate
+{
+
+static GtkWidget *gs_container = NULL;
+
+static GtkContainer* GetContainer()
+{
+ if ( gs_container == NULL )
+ {
+ GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
+ gs_container = gtk_fixed_new();
+ gtk_container_add(GTK_CONTAINER(window), gs_container);
+ }
+ return GTK_CONTAINER(gs_container);
+}
+
+GtkWidget *GetButtonWidget()
+{
+ static GtkWidget *s_button = NULL;
+
+ if ( !s_button )
+ {
+ s_button = gtk_button_new();
+ gtk_container_add(GetContainer(), s_button);
+ gtk_widget_realize(s_button);
+ }
+
+ return s_button;
+}
+
+GtkWidget *GetCheckButtonWidget()
+{
+ static GtkWidget *s_button = NULL;
+
+ if ( !s_button )
+ {
+ s_button = gtk_check_button_new();
+ gtk_container_add(GetContainer(), s_button);
+ gtk_widget_realize(s_button);
+ }
+
+ return s_button;
+}
+
+GtkWidget *GetEntryWidget()
+{
+ static GtkWidget *s_entry = NULL;
+
+ if ( !s_entry )
+ {
+ s_entry = gtk_entry_new();
+ gtk_container_add(GetContainer(), s_entry);
+ gtk_widget_realize(s_entry);
+ }
+
+ return s_entry;
+}
+
+// This one just gets the button used by the column header. Although it's
+// still a gtk_button the themes will typically differentiate and draw them
+// differently if the button is in a treeview.
+GtkWidget *GetHeaderButtonWidget()
+{
+ static GtkWidget *s_button = NULL;
+
+ if ( !s_button )
+ {
+ // Get the dummy tree widget, give it a column, and then use the
+ // widget in the column header for the rendering code.
+ GtkWidget* treewidget = GetTreeWidget();
+ GtkTreeViewColumn *column = gtk_tree_view_column_new();
+ gtk_tree_view_append_column(GTK_TREE_VIEW(treewidget), column);
+ s_button = column->button;
+ }
+
+ return s_button;
+}
+
+GtkWidget* GetSplitterWidget()
+{
+ static GtkWidget* widget;
+
+ if (widget == NULL)
+ {
+ widget = gtk_vpaned_new();
+ gtk_container_add(GetContainer(), widget);
+ gtk_widget_realize(widget);
+ }
+
+ return widget;
+}
+
+GtkWidget *GetTreeWidget()
+{
+ static GtkWidget *s_tree = NULL;
+
+ if ( !s_tree )
+ {
+ s_tree = gtk_tree_view_new();
+ gtk_container_add(GetContainer(), s_tree);
+ gtk_widget_realize(s_tree);
+ }
+
+ return s_tree;
+}
+
+
+// Module for destroying created widgets
+class WidgetsCleanupModule : public wxModule
+{
+public:
+ virtual bool OnInit()
+ {
+ return true;
+ }
+
+ virtual void OnExit()
+ {
+ if ( gs_container )
+ {
+ GtkWidget* parent = gtk_widget_get_parent(gs_container);
+ gtk_widget_destroy(parent);
+ }
+ }
+
+ DECLARE_DYNAMIC_CLASS(WidgetsCleanupModule)
+};
+
+IMPLEMENT_DYNAMIC_CLASS(WidgetsCleanupModule, wxModule)
+
+static WidgetsCleanupModule gs_widgetsCleanupModule;
+
+} // wxGTKPrivate namespace
#endif
#include "wx/gtk/dc.h"
+#include "wx/gtk/private.h"
#include <gtk/gtk.h>
virtual void DrawFocusRect(wxWindow* win, wxDC& dc, const wxRect& rect, int flags = 0);
- virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
-
- class Module;
- friend class Module;
-
-private:
- // used by DrawPushButton and DrawDropArrow
- static GtkWidget *GetButtonWidget();
-
- // used by DrawTreeItemButton()
- static GtkWidget *GetTreeWidget();
-
- // used by DrawCheckBox()
- static GtkWidget *GetCheckButtonWidget();
-
- // Used by DrawHeaderButton
- static GtkWidget *GetHeaderButtonWidget();
-
- static GtkWidget* GetSplitterWidget();
-
- // container for created widgets
- static GtkContainer* GetContainer();
- static GtkWidget* ms_container;
-};
+ virtual wxSize GetCheckBoxSize(wxWindow *win);
-// Module for destroying created widgets
-class wxRendererGTK::Module: public wxModule
-{
-public:
- virtual bool OnInit()
- {
- return true;
- }
- virtual void OnExit()
- {
- if (wxRendererGTK::ms_container)
- {
- GtkWidget* parent =
- gtk_widget_get_parent(wxRendererGTK::ms_container);
- gtk_widget_destroy(parent);
- }
- }
- DECLARE_DYNAMIC_CLASS(wxRendererGTK::Module)
+ virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win);
};
-IMPLEMENT_DYNAMIC_CLASS(wxRendererGTK::Module, wxModule)
// ============================================================================
// implementation
// ============================================================================
-GtkWidget* wxRendererGTK::ms_container;
-
/* static */
wxRendererNative& wxRendererNative::GetDefault()
{
return s_rendererGTK;
}
-// ----------------------------------------------------------------------------
-// helper functions
-// ----------------------------------------------------------------------------
-
-GtkContainer* wxRendererGTK::GetContainer()
-{
- if (ms_container == NULL)
- {
- GtkWidget* window = gtk_window_new(GTK_WINDOW_POPUP);
- ms_container = gtk_fixed_new();
- gtk_container_add(GTK_CONTAINER(window), ms_container);
- }
- return GTK_CONTAINER(ms_container);
-}
-
-GtkWidget *
-wxRendererGTK::GetButtonWidget()
-{
- static GtkWidget *s_button = NULL;
-
- if ( !s_button )
- {
- s_button = gtk_button_new();
- gtk_container_add(GetContainer(), s_button);
- gtk_widget_realize( s_button );
- }
-
- return s_button;
-}
-
-GtkWidget *
-wxRendererGTK::GetCheckButtonWidget()
-{
- static GtkWidget *s_button = NULL;
-
- if ( !s_button )
- {
- s_button = gtk_check_button_new();
- gtk_container_add(GetContainer(), s_button);
- gtk_widget_realize( s_button );
- }
-
- return s_button;
-}
-
-GtkWidget *
-wxRendererGTK::GetTreeWidget()
-{
- static GtkWidget *s_tree = NULL;
-
- if ( !s_tree )
- {
- s_tree = gtk_tree_view_new();
- gtk_container_add(GetContainer(), s_tree);
- gtk_widget_realize( s_tree );
- }
-
- return s_tree;
-}
-
-// used elsewhere
-GtkWidget *GetEntryWidget()
-{
- static GtkWidget *s_entry = NULL;
- static GtkWidget *s_window = NULL;
-
- if ( !s_entry )
- {
- s_window = gtk_window_new( GTK_WINDOW_POPUP );
- gtk_widget_realize( s_window );
- s_entry = gtk_entry_new();
- gtk_container_add( GTK_CONTAINER(s_window), s_entry );
- gtk_widget_realize( s_entry );
- }
-
- return s_entry;
-}
-
-// This one just gets the button used by the column header. Although it's
-// still a gtk_button the themes will typically differentiate and draw them
-// differently if the button is in a treeview.
-GtkWidget *
-wxRendererGTK::GetHeaderButtonWidget()
-{
- static GtkWidget *s_button = NULL;
-
- if ( !s_button )
- {
- // Get the dummy tree widget, give it a column, and then use the
- // widget in the column header for the rendering code.
- GtkWidget* treewidget = GetTreeWidget();
- GtkTreeViewColumn* column = gtk_tree_view_column_new();
- gtk_tree_view_append_column(GTK_TREE_VIEW(treewidget), column);
- s_button = column->button;
- }
-
- return s_button;
-}
-
-GtkWidget* wxRendererGTK::GetSplitterWidget()
-{
- static GtkWidget* widget;
- if (widget == NULL)
- {
- widget = gtk_vpaned_new();
- gtk_container_add(GetContainer(), widget);
- gtk_widget_realize(widget);
- }
- return widget;
-}
-
// ----------------------------------------------------------------------------
// list/tree controls drawing
// ----------------------------------------------------------------------------
wxHeaderButtonParams* params)
{
- GtkWidget *button = GetHeaderButtonWidget();
+ GtkWidget *button = wxGTKPrivate::GetHeaderButtonWidget();
GdkWindow* gdk_window = NULL;
#if wxUSE_NEW_DC
wxRendererGTK::DrawTreeItemButton(wxWindow* win,
wxDC& dc, const wxRect& rect, int flags)
{
- GtkWidget *tree = GetTreeWidget();
+ GtkWidget *tree = wxGTKPrivate::GetTreeWidget();
GdkWindow* gdk_window = NULL;
#if wxUSE_NEW_DC
// we don't draw any border, hence 0 for the second field
return wxSplitterRenderParams
(
- GetGtkSplitterFullSize(GetSplitterWidget()),
+ GetGtkSplitterFullSize(wxGTKPrivate::GetSplitterWidget()),
0,
true // hot sensitive
);
wxASSERT_MSG( gdk_window,
wxT("cannot use wxRendererNative on wxDC of this type") );
- wxCoord full_size = GetGtkSplitterFullSize(GetSplitterWidget());
+ wxCoord full_size = GetGtkSplitterFullSize(wxGTKPrivate::GetSplitterWidget());
// are we drawing vertical or horizontal splitter?
const bool isVert = orient == wxVERTICAL;
const wxRect& rect,
int flags)
{
- GtkWidget *button = GetButtonWidget();
+ GtkWidget *button = wxGTKPrivate::GetButtonWidget();
// If we give GTK_PIZZA(win->m_wxwindow)->bin_window as
// a window for gtk_paint_xxx function, then it won't
DrawDropArrow(win,dc,rect);
}
+wxSize
+wxRendererGTK::GetCheckBoxSize(wxWindow *WXUNUSED(win))
+{
+ gint indicator_size, indicator_spacing;
+ gtk_widget_style_get(wxGTKPrivate::GetCheckButtonWidget(),
+ "indicator_size", &indicator_size,
+ "indicator_spacing", &indicator_spacing,
+ NULL);
+
+ int size = indicator_size + indicator_spacing * 2;
+ return wxSize(size, size);
+}
+
void
wxRendererGTK::DrawCheckBox(wxWindow *WXUNUSED(win),
wxDC& dc,
const wxRect& rect,
int flags )
{
- GtkWidget *button = GetCheckButtonWidget();
+ GtkWidget *button = wxGTKPrivate::GetCheckButtonWidget();
GdkWindow* gdk_window = NULL;
#if wxUSE_NEW_DC
wxASSERT_MSG( gdk_window,
wxT("cannot use wxRendererNative on wxDC of this type") );
+ gint indicator_size, indicator_spacing;
+ gtk_widget_style_get(button,
+ "indicator_size", &indicator_size,
+ "indicator_spacing", &indicator_spacing,
+ NULL);
+
GtkStateType state;
if ( flags & wxCONTROL_PRESSED )
NULL,
button,
"cellcheck",
- dc.LogicalToDeviceX(rect.x)+2,
- dc.LogicalToDeviceY(rect.y)+3,
- 13, 13
+ dc.LogicalToDeviceX(rect.x) + indicator_spacing,
+ dc.LogicalToDeviceY(rect.y) + indicator_spacing,
+ indicator_size, indicator_size
);
}
const wxRect& rect,
int flags)
{
- GtkWidget *button = GetButtonWidget();
+ GtkWidget *button = wxGTKPrivate::GetButtonWidget();
GdkWindow* gdk_window = NULL;
#if wxUSE_NEW_DC
///////////////////////////////////////////////////////////////////////////////
#include "wx/defs.h"
+#include "wx/gtk/private.h"
#include "wx/gtk/private/win_gtk.h"
/*
}
}
-extern GtkWidget *GetEntryWidget();
-
void wxPizza::get_border_widths(int& x, int& y)
{
x = y = 0;
x = y = 1;
else if (m_border_style)
{
- GtkWidget *entry_widget = GetEntryWidget();
+ GtkWidget *entry_widget = wxGTKPrivate::GetEntryWidget();
if (entry_widget->style)
{
x = entry_widget->style->xthickness;
#ifndef __WXUNIVERSAL__
-GtkWidget* GetEntryWidget();
-
extern "C" {
static gboolean
expose_event_border(GtkWidget* widget, GdkEventExpose* gdk_event, wxWindow* win)
// for scrollable ones
detail = "viewport";
- GtkWidget* styleWidget = GetEntryWidget();
+ GtkWidget* styleWidget = wxGTKPrivate::GetEntryWidget();
gtk_paint_shadow(
styleWidget->style, gdk_event->window, GTK_STATE_NORMAL,
shadow, NULL, styleWidget, detail, x, y, w, h);
const wxRect& rect,
int flags = 0);
+ virtual wxSize GetCheckBoxSize(wxWindow *win);
+
virtual int GetHeaderButtonHeight(wxWindow *win);
private:
::DrawFocusRect(GetHdcOf(*((wxMSWDCImpl*)dc.GetImpl())), &rc);
}
+wxSize wxRendererMSW::GetCheckBoxSize(wxWindow * WXUNUSED(win))
+{
+ return wxSize(::GetSystemMetrics(SM_CXMENUCHECK),
+ ::GetSystemMetrics(SM_CYMENUCHECK));
+}
+
int wxRendererMSW::GetHeaderButtonHeight(wxWindow * WXUNUSED(win))
{
// some "reasonable" value returned in case of error, it doesn't really
dc.SetBrush(brush);
dc.SetPen(*wxTRANSPARENT_PEN);
dc.DrawRectangle( rect );
-
+
if ((flags & wxCONTROL_FOCUSED) && (flags & wxCONTROL_CURRENT))
DrawFocusRect( win, dc, rect, flags );
}
const wxRect& rect,
int flags = 0);
+ virtual wxSize GetCheckBoxSize(wxWindow* win);
+
virtual void DrawComboBoxDropButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
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 ) ;
}
-