#endif
#include "wx/gdicmn.h"
+#include "wx/colour.h"
+#include "wx/gtk/private.h"
#include <gdk/gdk.h>
#include <gdk/gdkx.h>
}
wxColourRefData(const wxColourRefData& data)
+ : wxObjectRefData()
{
m_color = data.m_color;
m_colormap = data.m_colormap;
wxNode *node = (wxNode *) NULL;
if ( (wxTheColourDatabase) && (node = wxTheColourDatabase->Find(colourName)) )
{
- wxColour *col = (wxColour*)node->Data();
+ wxColour *col = (wxColour*)node->GetData();
UnRef();
if (col) Ref( *col );
}
{
m_refData = new wxColourRefData();
- if (!gdk_color_parse( colourName.mb_str(), &M_COLDATA->m_color ))
+ if (!gdk_color_parse( wxGTK_CONV( colourName ), &M_COLDATA->m_color ))
{
// VZ: asserts are good in general but this one is triggered by
// calling wxColourDatabase::FindColour() with an
{
AllocExclusive();
- m_refData = new wxColourRefData();
M_COLDATA->m_color.red = ((unsigned short)red) << SHIFT;
M_COLDATA->m_color.green = ((unsigned short)green) << SHIFT;
M_COLDATA->m_color.blue = ((unsigned short)blue) << SHIFT;
M_COLDATA->m_color.pixel = 0;
+
+ M_COLDATA->m_colormap = (GdkColormap*) NULL;
+ M_COLDATA->m_hasPixel = FALSE;
}
unsigned char wxColour::Red() const