]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/colour.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKCOLOURH__
12 #define __GTKCOLOURH__
19 #include "wx/object.h"
20 #include "wx/string.h"
21 #include "wx/gdiobj.h"
22 #include "wx/palette.h"
24 //-----------------------------------------------------------------------------
26 //-----------------------------------------------------------------------------
35 //-----------------------------------------------------------------------------
37 //-----------------------------------------------------------------------------
39 class wxColour
: public wxGDIObject
46 wxColour( unsigned char red
, unsigned char green
, unsigned char blue
);
47 // implicit conversion from the colour name
48 wxColour( const wxString
&colourName
) { InitFromName(colourName
); }
49 wxColour( const char *colourName
) { InitFromName(colourName
); }
51 // copy ctors and assignment operators
52 wxColour( const wxColour
& col
);
53 wxColour
& operator = ( const wxColour
& col
);
59 bool operator == ( const wxColour
& col
);
60 bool operator != ( const wxColour
& col
);
63 void Set( unsigned char red
, unsigned char green
, unsigned char blue
);
64 unsigned char Red() const;
65 unsigned char Green() const;
66 unsigned char Blue() const;
70 void CalcPixel( GdkColormap
*cmap
);
72 GdkColor
*GetColor() const;
76 void InitFromName(const wxString
& colourName
);
79 DECLARE_DYNAMIC_CLASS(wxColour
)
82 #endif // __GTKCOLOURH__