From: Vadim Zeitlin Date: Mon, 12 Oct 2009 13:59:06 +0000 (+0000) Subject: Document wxDCTextColourChanger "do nothing" constructor. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/489cc69b396e927bdd62da9970cfe64951071f92?ds=inline Document wxDCTextColourChanger "do nothing" constructor. 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 --- diff --git a/interface/wx/dc.h b/interface/wx/dc.h index 1e4e08bc1a..704e5b06a4 100644 --- a/interface/wx/dc.h +++ b/interface/wx/dc.h @@ -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. */