// wxColour
//-----------------------------------------------------------------------------
-class wxColourRefData: public wxObjectRefData
+class wxColourRefData : public wxGDIRefData
{
public:
wxColourRefData()
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;
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();
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;
}
GdkColor *wxColour::GetColor() const
{
- wxCHECK_MSG( Ok(), (GdkColor *) NULL, wxT("invalid colour") );
+ wxCHECK_MSG( Ok(), NULL, wxT("invalid colour") );
return &M_COLDATA->m_color;
}
-bool wxColour::FromString(const wxChar *str)
+bool wxColour::FromString(const wxString& str)
{
GdkColor colGDK;
- if ( gdk_color_parse( str, &colGDK ) )
+ if ( gdk_color_parse( wxGTK_CONV(str), &colGDK ) )
{
UnRef();