From: Robin Dunn Date: Sat, 21 Oct 2006 01:12:57 +0000 (+0000) Subject: Forward SetFont, SetBackgroundColour and SetForegroundCOlour to the X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/54eb75b5fb74cea418d25703407dd146908ad267?ds=inline Forward SetFont, SetBackgroundColour and SetForegroundCOlour to the generic listctrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/listctrl.h b/include/wx/mac/carbon/listctrl.h index 6330ba6be8..fa7fae4247 100644 --- a/include/wx/mac/carbon/listctrl.h +++ b/include/wx/mac/carbon/listctrl.h @@ -309,11 +309,17 @@ class WXDLLEXPORT wxListCtrl: public wxControl wxListCtrlCompare GetCompareFunc() { return m_compareFunc; }; long GetCompareFuncData() { return m_compareFuncData; }; + + // public overrides needed for pimpl approach + virtual bool SetFont(const wxFont& font); + virtual bool SetForegroundColour(const wxColour& colour); + virtual bool SetBackgroundColour(const wxColour& colour); + protected: - // overrides needed for pimpl approach + // protected overrides needed for pimpl approach virtual void DoSetSize(int x, int y, - int width, int height, - int sizeFlags = wxSIZE_AUTO); + int width, int height, + int sizeFlags = wxSIZE_AUTO); // common part of all ctors void Init(); diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index 5a3d06a173..d6361c8dfd 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -404,6 +404,33 @@ void wxListCtrl::DoSetSize( int x, int y, int width, int height, int sizeFlags ) m_genericImpl->SetSize(x, y, width, height, sizeFlags); } +bool wxListCtrl::SetFont(const wxFont& font) +{ + bool rv; + rv = wxControl::SetFont(font); + if (m_genericImpl) + rv = m_genericImpl->SetFont(font); + return rv; +} + +bool wxListCtrl::SetForegroundColour(const wxColour& colour) +{ + bool rv; + rv = wxControl::SetForegroundColour(colour); + if (m_genericImpl) + rv = m_genericImpl->SetForegroundColour(colour); + return rv; +} + +bool wxListCtrl::SetBackgroundColour(const wxColour& colour) +{ + bool rv; + rv = wxControl::SetBackgroundColour(colour); + if (m_genericImpl) + rv = m_genericImpl->SetBackgroundColour(colour); + return rv; +} + // ---------------------------------------------------------------------------- // accessors // ----------------------------------------------------------------------------