]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/colour.cpp
Better fix
[wxWidgets.git] / src / gtk1 / colour.cpp
index d4ba21bc35ca4745b58241c0af7a0a849578e9e5..60d6b17e668f5c2082a347a9c2110dc55597853a 100644 (file)
 
 #include "wx/colour.h"
 
-#include "wx/gdicmn.h"
+#ifndef WX_PRECOMP
+    #include "wx/gdicmn.h"
+#endif
+
 #include "wx/gtk1/private.h"
 
 #include <gdk/gdk.h>
@@ -23,7 +26,7 @@
 // wxColour
 //-----------------------------------------------------------------------------
 
-class wxColourRefData: public wxObjectRefData
+class wxColourRefData : public wxGDIRefData
 {
 public:
     wxColourRefData()
@@ -37,14 +40,13 @@ public:
     }
 
     wxColourRefData(const wxColourRefData& data)
-        : wxObjectRefData()
     {
         m_color = data.m_color;
         m_colormap = data.m_colormap;
         m_hasPixel = data.m_hasPixel;
     }
 
-    ~wxColourRefData()
+    virtual ~wxColourRefData()
     {
         FreeColour();
     }
@@ -156,17 +158,18 @@ bool wxColour::operator == ( const wxColour& col ) const
                      own->green == other->green;
 }
 
-wxObjectRefData *wxColour::CreateRefData() const
+wxGDIRefData *wxColour::CreateGDIRefData() const
 {
     return new wxColourRefData;
 }
 
-wxObjectRefData *wxColour::CloneRefData(const wxObjectRefData *data) const
+wxGDIRefData *wxColour::CloneGDIRefData(const wxGDIRefData *data) const
 {
     return new wxColourRefData(*(wxColourRefData *)data);
 }
 
-void wxColour::InitWith( unsigned char red, unsigned char green, unsigned char blue )
+void wxColour::InitRGBA(unsigned char red, unsigned char green, unsigned char blue,
+                        unsigned char WXUNUSED(alpha))
 {
     AllocExclusive();
 
@@ -221,10 +224,10 @@ GdkColor *wxColour::GetColor() const
     return &M_COLDATA->m_color;
 }
 
-bool wxColour::FromString(const wxChar *str)
+bool wxColour::FromString(const wxString& str)
 {
     GdkColor colGDK;
-    if ( gdk_color_parse( wxGTK_CONV_SYS( str ), &colGDK ) )
+    if ( gdk_color_parse( wxGTK_CONV(str), &colGDK ) )
     {
         UnRef();