// wxColour
//-----------------------------------------------------------------------------
-class wxColourRefData: public wxObjectRefData
+class wxColourRefData : public wxGDIRefData
{
public:
wxColourRefData()
m_colormap = (WXColormap *) NULL;
m_hasPixel = false;
}
- wxColourRefData(const wxColourRefData& data):
- wxObjectRefData()
+
+ wxColourRefData(const wxColourRefData& data)
{
m_color = data.m_color;
m_colormap = data.m_colormap;
FreeColour();
}
- bool operator == (const wxColourRefData& data) const
+ bool operator==(const wxColourRefData& data) const
{
return (m_colormap == data.m_colormap &&
m_hasPixel == data.m_hasPixel &&
}
-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);
}
return (WXColor*) &M_COLDATA->m_color;
}
-bool wxColour::FromString(const wxChar *name)
+bool wxColour::FromString(const wxString& name)
{
Display *dpy = wxGlobalDisplay();
WXColormap colormap = wxTheApp->GetMainColormap( dpy );
XColor xcol;
- if ( XParseColor( dpy, (Colormap)colormap, wxConvertWX2MB(name), &xcol ) )
+ if ( XParseColor( dpy, (Colormap)colormap, name.mbc_str(), &xcol ) )
{
UnRef();