]> git.saurik.com Git - wxWidgets.git/commitdiff
Document wxDCTextColourChanger "do nothing" constructor.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 2009 13:59:06 +0000 (13:59 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Oct 2009 13:59:06 +0000 (13:59 +0000)
Only wxDCTextColourChanger(wxDC, wxColour) one was documented, also document
wxDCTextColourChanger(wxDC) and its Set() method now.

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

interface/wx/dc.h

index 1e4e08bc1a9aced71883fe56ce82c6e078ba7a15..704e5b06a4c1521bb4de88ea0efa8e1b53b31174 100644 (file)
@@ -1437,6 +1437,16 @@ public:
 class wxDCTextColourChanger
 {
 public:
+    /**
+        Trivial constructor not changing anything.
+
+        This constructor is useful if you don't know beforehand if the colour
+        needs to be changed or not. It simply creates the object which won't do
+        anything in its destructor unless Set() is called -- in which case it
+        would reset the previous colour.
+     */
+    wxDCTextColourChanger(wxDC& dc);
+
     /**
         Sets @a col on the given @a dc, storing the old one.
 
@@ -1447,6 +1457,17 @@ public:
     */
     wxDCTextColourChanger(wxDC& dc, const wxColour& col);
 
+    /**
+        Set the colour to use.
+
+        This method is meant to be called once only and only on the objects
+        created with the constructor overload not taking wxColour argument and
+        has the same effect as the other constructor, i.e. sets the colour to
+        the given @a col and ensures that the old value is restored when this
+        object is destroyed.
+     */
+    void Set(const wxColour& col);
+
     /**
         Restores the colour originally selected in the DC passed to the ctor.
     */