From 8a46124968f1f9d2e707214fc4501cfc27abd0aa Mon Sep 17 00:00:00 2001
From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 16 Apr 2007 01:22:46 +0000
Subject: [PATCH] added new wxCONTROL_FLAT bit (see discussion of patch
 1691478)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45493 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 docs/latex/wx/renderer.tex | 9 ++++++---
 include/wx/renderer.h      | 1 +
 src/msw/renderer.cpp       | 2 ++
 3 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/docs/latex/wx/renderer.tex b/docs/latex/wx/renderer.tex
index d0fa0b0ec9..ab71f3b2f2 100644
--- a/docs/latex/wx/renderer.tex
+++ b/docs/latex/wx/renderer.tex
@@ -67,9 +67,12 @@ enum
     wxCONTROL_DISABLED   = 0x00000001,  // control is disabled
     wxCONTROL_FOCUSED    = 0x00000002,  // currently has keyboard focus
     wxCONTROL_PRESSED    = 0x00000004,  // (button) is pressed
-    wxCONTROL_ISDEFAULT  = 0x00000008,  // only applies to the buttons
-    wxCONTROL_ISSUBMENU  = wxCONTROL_ISDEFAULT, // only for menu items
-    wxCONTROL_EXPANDED   = wxCONTROL_ISDEFAULT, // only for the tree items
+    wxCONTROL_SPECIAL    = 0x00000008,  // control-specific bit:
+    wxCONTROL_ISDEFAULT  = wxCONTROL_SPECIAL, // only for the buttons
+    wxCONTROL_ISSUBMENU  = wxCONTROL_SPECIAL, // only for the menu items
+    wxCONTROL_EXPANDED   = wxCONTROL_SPECIAL, // only for the tree items
+    wxCONTROL_SIZEGRIP   = wxCONTROL_SPECIAL, // only for the status bar panes
+    wxCONTROL_FLAT       = wxCONTROL_SPECIAL, // checkboxes only: flat border
     wxCONTROL_CURRENT    = 0x00000010,  // mouse is currently over the control
     wxCONTROL_SELECTED   = 0x00000020,  // selected item in e.g. listbox
     wxCONTROL_CHECKED    = 0x00000040,  // (check/radio button) is checked
diff --git a/include/wx/renderer.h b/include/wx/renderer.h
index a270f0848e..79e8a0c2a3 100644
--- a/include/wx/renderer.h
+++ b/include/wx/renderer.h
@@ -56,6 +56,7 @@ enum
     wxCONTROL_ISSUBMENU  = wxCONTROL_SPECIAL, // only for the menu items
     wxCONTROL_EXPANDED   = wxCONTROL_SPECIAL, // only for the tree items
     wxCONTROL_SIZEGRIP   = wxCONTROL_SPECIAL, // only for the status bar panes
+    wxCONTROL_FLAT       = wxCONTROL_SPECIAL, // checkboxes only: flat border
     wxCONTROL_CURRENT    = 0x00000010,  // mouse is currently over the control
     wxCONTROL_SELECTED   = 0x00000020,  // selected item in e.g. listbox
     wxCONTROL_CHECKED    = 0x00000040,  // (check/radio button) is checked
diff --git a/src/msw/renderer.cpp b/src/msw/renderer.cpp
index 2a63a4b0b5..e391d2e21d 100644
--- a/src/msw/renderer.cpp
+++ b/src/msw/renderer.cpp
@@ -235,6 +235,8 @@ wxRendererMSW::DrawCheckBox(wxWindow * WXUNUSED(win),
         style |= DFCS_CHECKED;
     if ( flags & wxCONTROL_DISABLED )
         style |= DFCS_INACTIVE;
+    if ( flags & wxCONTROL_FLAT )
+        style |= DFCS_MONO;
     if ( flags & wxCONTROL_PRESSED )
         style |= DFCS_PUSHED;
     if ( flags & wxCONTROL_CURRENT )
-- 
2.50.0

