]> git.saurik.com Git - wxWidgets.git/blobdiff - src/x11/colour.cpp
the same event handler class, not object, can be used with multiple windows (patch...
[wxWidgets.git] / src / x11 / colour.cpp
index 32d69c30a0725f27eb135b118df6cab8f06f109d..26dfeded955864d434a1c0af8d95db4d3b44b02a 100644 (file)
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
 
 #ifndef WX_PRECOMP
     #include "wx/app.h"
+    #include "wx/gdicmn.h"
 #endif
 
 #endif
 
-#include "wx/gdicmn.h"
-
 #include "wx/x11/private.h"
 
 //-----------------------------------------------------------------------------
 #include "wx/x11/private.h"
 
 //-----------------------------------------------------------------------------
@@ -46,7 +45,7 @@ public:
         m_hasPixel = data.m_hasPixel;
     }
 
         m_hasPixel = data.m_hasPixel;
     }
 
-    ~wxColourRefData()
+    virtual ~wxColourRefData()
     {
         FreeColour();
     }
     {
         FreeColour();
     }
@@ -173,7 +172,8 @@ wxObjectRefData *wxColour::CloneRefData(const wxObjectRefData *data) const
     return new wxColourRefData(*(wxColourRefData *)data);
 }
 
     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();
 
 {
     AllocExclusive();
 
@@ -245,12 +245,12 @@ WXColor *wxColour::GetColor() const
     return (WXColor*) &M_COLDATA->m_color;
 }
 
     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;
 {
     Display *dpy = wxGlobalDisplay();
     WXColormap colormap = wxTheApp->GetMainColormap( dpy );
     XColor xcol;
-    if ( XParseColor( dpy, (Colormap)colormap, name , &xcol ) )
+    if ( XParseColor( dpy, (Colormap)colormap, name.mbc_str(), &xcol ) )
     {
         UnRef();
 
     {
         UnRef();