]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/gtk1/colour.h
Use InheritAttributes for wxGTK widgets so they will check
[wxWidgets.git] / include / wx / gtk1 / colour.h
index bce0560ddb8a69f9adeded965f92655f32a375cf..87b7e7a3b0636bf1ee9a76669c87332020205404 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef __GTKCOLOURH__
 #define __GTKCOLOURH__
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma interface
 #endif
 
@@ -47,9 +47,15 @@ public:
 
     // Implicit conversion from the colour name
     wxColour( const wxString &colourName ) { InitFromName(colourName); }
-    wxColour( const char *colourName ) { InitFromName(colourName); }
+    wxColour( const char *colourName ) { InitFromName( wxString::FromAscii(colourName) ); }
+#if wxUSE_UNICODE
+    wxColour( const wxChar *colourName ) { InitFromName( wxString(colourName) ); }
+#endif
+
 
-    wxColour( const wxColour& col ) { Ref(col); }
+    wxColour( const wxColour& col )
+        : wxGDIObject()
+        { Ref(col); }
     wxColour& operator = ( const wxColour& col ) { Ref(col); return *this; }
 
     ~wxColour();
@@ -74,6 +80,9 @@ public:
     unsigned char Blue() const;
 
 
+    // Get colour from name or wxNullColour
+    static wxColour CreateByName(const wxString& name);
+
     // Implementation part
     void CalcPixel( GdkColormap *cmap );
     int GetPixel() const;