]> git.saurik.com Git - wxWidgets.git/commitdiff
Final touch for wxColour <-> wxString and wxColourBase by Francesco Montorsi.
authorWłodzimierz Skiba <abx@abx.art.pl>
Fri, 28 Apr 2006 17:59:28 +0000 (17:59 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Fri, 28 Apr 2006 17:59:28 +0000 (17:59 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/colour.h
src/common/colourcmn.cpp

index 4de29da610b8e687eaa2396915df441b118ff105..15833968a46d03d6d1698c33223f408d91618e8a 100644 (file)
@@ -16,7 +16,7 @@
 #include "wx/gdiobj.h"
 
 
-// the standard wxColour constructor.
+// the standard wxColour constructors;
 // this macro avoids to repeat these lines across all colour.h files, since
 // Set() is a virtual function and thus cannot be called by wxColourBase
 // constructors
@@ -28,7 +28,7 @@
     wxColour(const wxChar *colourName) { Set(colourName); }
 
 
-// for wxString <-> wxColour
+// flags for wxColour -> wxString conversion (see wxColour::GetAsString)
 #define wxC2S_NAME              1   // return colour name, when possible
 #define wxC2S_CSS_SYNTAX        2   // return colour in rgb(r,g,b) syntax
 #define wxC2S_HTML_SYNTAX       4   // return colour in #rrggbb syntax
@@ -95,9 +95,10 @@ public:
     // old, deprecated
     // ---------------
 
-    static wxColour CreateByName(const wxString& name);
-    void InitFromName(const wxString& col)
-        { Set(col); }
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( static wxColour CreateByName(const wxString& name) );
+    wxDEPRECATED( void InitFromName(const wxString& col) );
+#endif
 };
 
 
index 4c7d7c088f5669113e43cbb544844f678b39e4df..114dd597a6b989b0014e56bc313fc9cc91e8dee5 100644 (file)
@@ -101,7 +101,17 @@ wxString wxColourBase::GetAsString(long flags) const
     return colName;
 }
 
+#if WXWIN_COMPATIBILITY_2_6
+
+// static
 wxColour wxColourBase::CreateByName(const wxString& name)
 {
     return wxColour(name);
 }
+
+void wxColourBase::InitFromName(const wxString& col)
+{
+    Set(col);
+}
+
+#endif // WXWIN_COMPATIBILITY_2_6