]> git.saurik.com Git - wxWidgets.git/commitdiff
Add public (but not documented) wxCheckBox::MSWMakeOwnerDrawn().
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Sep 2012 22:15:37 +0000 (22:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 20 Sep 2012 22:15:37 +0000 (22:15 +0000)
It can be useful to explicitly make a check box owner drawn, so make the
private MakeOwnerDrawn() public and add "MSW" prefix to it to allow doing this
from the user code.

Closes #14679.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72530 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/msw/checkbox.h
src/msw/checkbox.cpp

index 275fed537bbbe3bb4daad16e5747852aec82f2e5..f00fe9cfe32c8c7eee40470652389f6b4f48b3a2 100644 (file)
@@ -52,15 +52,15 @@ public:
     // returns true if the platform should explicitly apply a theme border
     virtual bool CanApplyThemeBorder() const { return false; }
 
+    // make the checkbox owner drawn or reset it to normal style
+    void MSWMakeOwnerDrawn(bool ownerDrawn);
+
 protected:
     virtual wxSize DoGetBestSize() const;
 
     virtual void DoSet3StateValue(wxCheckBoxState value);
     virtual wxCheckBoxState DoGet3StateValue() const;
 
-    // make the checkbox owner drawn or reset it to normal style
-    void MakeOwnerDrawn(bool ownerDrawn);
-
     // return true if this checkbox is owner drawn
     bool IsOwnerDrawn() const;
 
index fed760a4a5c7f93d9539439e7f3b5f639cf855b2..85a52a49cc61cdc4b6b0e69dfd2dcc3c5b54295a 100644 (file)
@@ -273,7 +273,7 @@ bool wxCheckBox::SetForegroundColour(const wxColour& colour)
     // the only way to change the checkbox foreground colour under Windows XP
     // is to owner draw it
     if ( wxUxThemeEngine::GetIfActive() )
-        MakeOwnerDrawn(colour.IsOk());
+        MSWMakeOwnerDrawn(colour.IsOk());
 
     return true;
 }
@@ -284,7 +284,7 @@ bool wxCheckBox::IsOwnerDrawn() const
         (::GetWindowLong(GetHwnd(), GWL_STYLE) & BS_OWNERDRAW) == BS_OWNERDRAW;
 }
 
-void wxCheckBox::MakeOwnerDrawn(bool ownerDrawn)
+void wxCheckBox::MSWMakeOwnerDrawn(bool ownerDrawn)
 {
     long style = ::GetWindowLong(GetHwnd(), GWL_STYLE);