X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e86d4e59c10a8110a5bcf714bca17a8eea65e8b8..9ef101cd5548aacc4d921683d185b687cb7a6d35:/src/gtk1/colour.cpp diff --git a/src/gtk1/colour.cpp b/src/gtk1/colour.cpp index e5234be3d4..eb133b79e1 100644 --- a/src/gtk1/colour.cpp +++ b/src/gtk1/colour.cpp @@ -26,7 +26,7 @@ // wxColour //----------------------------------------------------------------------------- -class wxColourRefData: public wxObjectRefData +class wxColourRefData : public wxGDIRefData { public: wxColourRefData() @@ -35,12 +35,11 @@ public: m_color.green = 0; m_color.blue = 0; m_color.pixel = 0; - m_colormap = (GdkColormap *) NULL; + m_colormap = NULL; m_hasPixel = false; } wxColourRefData(const wxColourRefData& data) - : wxObjectRefData() { m_color = data.m_color; m_colormap = data.m_colormap; @@ -138,8 +137,6 @@ void wxColourRefData::AllocColour( GdkColormap *cmap ) // GDK's values are in 0..65535 range, our are in 0..255 #define SHIFT 8 -IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject) - wxColour::~wxColour() { } @@ -159,12 +156,12 @@ 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); } @@ -179,7 +176,7 @@ void wxColour::InitRGBA(unsigned char red, unsigned char green, unsigned char bl M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT; M_COLDATA->m_color.pixel = 0; - M_COLDATA->m_colormap = (GdkColormap*) NULL; + M_COLDATA->m_colormap = NULL; M_COLDATA->m_hasPixel = false; } @@ -220,7 +217,7 @@ int wxColour::GetPixel() const GdkColor *wxColour::GetColor() const { - wxCHECK_MSG( Ok(), (GdkColor *) NULL, wxT("invalid colour") ); + wxCHECK_MSG( Ok(), NULL, wxT("invalid colour") ); return &M_COLDATA->m_color; }