]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/dc.h
Remove wxDataViewTextRendererAttr by merging it with wxDataViewTextRenderer.
[wxWidgets.git] / interface / wx / dc.h
index 1e4e08bc1a9aced71883fe56ce82c6e078ba7a15..4e75b0ee3eadebd5296a4d198e68de0036bb4f74 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.
     */
@@ -1472,6 +1493,18 @@ public:
 class wxDCFontChanger
 {
 public:
+    /**
+        Trivial constructor not changing anything.
+
+        This constructor is useful if you don't know beforehand if the font
+        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 font.
+
+        @since 2.9.1
+     */
+    wxDCFontChanger(wxDC& dc);
+
     /**
         Sets @a font on the given @a dc, storing the old one.
 
@@ -1483,7 +1516,18 @@ public:
     wxDCFontChanger(wxDC& dc, const wxFont& font);
 
     /**
-        Restores the colour originally selected in the DC passed to the ctor.
+        Set the font 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 font to
+        the given @a font and ensures that the old value is restored when this
+        object is destroyed.
+     */
+    void Set(const wxFont& font);
+
+    /**
+        Restores the font originally selected in the DC passed to the ctor.
     */
     ~wxDCFontChanger();
 };