]> git.saurik.com Git - wxWidgets.git/commitdiff
added wxDCTextColourChanger ctor that allows using the class in the same way other...
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 26 Oct 2006 15:30:43 +0000 (15:30 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 26 Oct 2006 15:30:43 +0000 (15:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/dc.h

index 440c908c3bcbdffe7227e188cba242aa16c051d5..d6bfafdc61978cb9086ae1fc0292119105119614 100644 (file)
@@ -870,6 +870,11 @@ class WXDLLEXPORT wxDCTextColourChanger
 public:
     wxDCTextColourChanger(wxDC& dc) : m_dc(dc), m_colFgOld() { }
 
+    wxDCTextColourChanger(wxDC& dc, const wxColour& col) : m_dc(dc)
+    {
+        Set(col);
+    }
+
     ~wxDCTextColourChanger()
     {
         if ( m_colFgOld.Ok() )