X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d78998725b53eea209c0fa845b5a25fe5b512d2..c39058f631b3a53682f00807a60bfff6c5aa2b7c:/include/wx/renderer.h diff --git a/include/wx/renderer.h b/include/wx/renderer.h index 2097782e73..94119d8994 100644 --- a/include/wx/renderer.h +++ b/include/wx/renderer.h @@ -28,14 +28,14 @@ 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" #include "wx/string.h" // some platforms have their own renderers, others use the generic one -#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK__) +#if defined(__WXMSW__) || ( defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON ) || defined(__WXGTK__) #define wxHAS_NATIVE_RENDERER #else #undef wxHAS_NATIVE_RENDERER @@ -75,7 +75,7 @@ enum // ---------------------------------------------------------------------------- // wxSplitterWindow parameters -struct WXDLLEXPORT wxSplitterRenderParams +struct WXDLLIMPEXP_CORE wxSplitterRenderParams { // the only way to initialize this struct is by using this ctor wxSplitterRenderParams(wxCoord widthSash_, wxCoord border_, bool isSens_) @@ -95,7 +95,7 @@ struct WXDLLEXPORT wxSplitterRenderParams // extra optional parameters for DrawHeaderButton -struct WXDLLEXPORT wxHeaderButtonParams +struct WXDLLIMPEXP_CORE wxHeaderButtonParams { wxHeaderButtonParams() : m_labelAlignment(wxALIGN_LEFT) @@ -118,7 +118,7 @@ enum wxHeaderSortIconType { // wxRendererNative interface version -struct WXDLLEXPORT wxRendererVersion +struct WXDLLIMPEXP_CORE wxRendererVersion { wxRendererVersion(int version_, int age_) : version(version_), age(age_) { } @@ -152,7 +152,7 @@ struct WXDLLEXPORT wxRendererVersion // wxRendererNative: abstracts drawing methods needed by the native controls // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxRendererNative +class WXDLLIMPEXP_CORE wxRendererNative { public: // drawing functions @@ -227,6 +227,9 @@ public: 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 @@ -305,7 +308,7 @@ public: // wxDelegateRendererNative: allows reuse of renderers code // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxDelegateRendererNative : public wxRendererNative +class WXDLLIMPEXP_CORE wxDelegateRendererNative : public wxRendererNative { public: wxDelegateRendererNative() @@ -373,6 +376,9 @@ public: 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,