]> git.saurik.com Git - wxWidgets.git/commitdiff
changed last DrawButton() parameter from bool to int to allow for future extensions...
authorVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Nov 2006 23:34:11 +0000 (23:34 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sun, 12 Nov 2006 23:34:11 +0000 (23:34 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43383 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/combo.h
src/common/combocmn.cpp
src/generic/combog.cpp
src/msw/combo.cpp

index a504c1543e49fc969a2fff247483d022b48b1ecb..886ea13a659a6fe867747d1123fc43d987eaa75c 100644 (file)
@@ -419,8 +419,14 @@ protected:
     // Installs standard input handler to combo (and optionally to the textctrl)
     void InstallInputHandlers();
 
+    // flags for DrawButton()
+    enum
+    {
+        Draw_PaintBg = 1
+    };
+
     // Draws dropbutton. Using wxRenderer or bitmaps, as appropriate.
-    void DrawButton( wxDC& dc, const wxRect& rect, bool paintBg = true );
+    void DrawButton( wxDC& dc, const wxRect& rect, int flags = Draw_PaintBg );
 
     // Call if cursor is on button area or mouse is captured for the button.
     //bool HandleButtonMouseEvent( wxMouseEvent& event, bool isInside );
index 9160f1b710beeb33fe99aa74f1ec3ab8c62209ef..a633163d30719a911163b9f504190a44e03edbdd 100644 (file)
@@ -1238,7 +1238,7 @@ void wxComboCtrlBase::PrepareBackground( wxDC&, const wxRect&, int ) const
 }
 #endif
 
-void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, bool paintBg )
+void wxComboCtrlBase::DrawButton( wxDC& dc, const wxRect& rect, int paintBg )
 {
     int drawState = m_btnState;
 
index 082612d098856480d0f69a5dcaebdcc48fd4fff0..ad7874f22c8a1e99ff423ad4b2b9281d89cec6e7 100644 (file)
@@ -276,8 +276,10 @@ void wxGenericComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
     dc.DrawRectangle(rect);
 
     if ( !m_btn )
+    {
         // Standard button rendering
-        DrawButton(dc,rectb,true);
+        DrawButton(dc,rectb);
+    }
 
     // paint required portion on the control
     if ( (!m_text || m_widthCustomPaint) )
index 367f609c50038b717db6f5aa0a705cb4fb422a86..7c69f60c861b2c2b838f3b1d277752a62858fe1d 100644 (file)
@@ -456,7 +456,7 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
     dc.DrawRectangle(rect);
 
     // Button background with theme?
-    bool drawButBg = true;
+    int drawButFlags = Draw_PaintBg;
     if ( hTheme && m_blankButtonBg )
     {
         RECT r;
@@ -468,11 +468,11 @@ void wxComboCtrl::OnPaintEvent( wxPaintEvent& WXUNUSED(event) )
                                          GetHdcOf(dc),
                                          &r);
 
-        drawButBg = false;
+        drawButFlags = 0;
     }
 
     // Standard button rendering
-    DrawButton(dc,rectb,drawButBg);
+    DrawButton(dc,rectb,drawButFlags);
 
     // paint required portion on the control
     if ( (!m_text || m_widthCustomPaint) )