]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/colour.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __GTKCOLOURH__
13 #define __GTKCOLOURH__
20 #include "wx/object.h"
21 #include "wx/string.h"
22 #include "wx/gdiobj.h"
23 #include "wx/palette.h"
25 //-----------------------------------------------------------------------------
27 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 //-----------------------------------------------------------------------------
40 class wxColour
: public wxGDIObject
47 wxColour( char red
, char green
, char blue
);
48 // implicit conversion from the colour name
49 wxColour( const wxString
&colourName
) { InitFromName(colourName
); }
50 wxColour( const char *colourName
) { InitFromName(colourName
); }
52 // copy ctors and assignment operators
53 wxColour( const wxColour
& col
);
54 wxColour( const wxColour
* col
);
55 wxColour
& operator = ( const wxColour
& col
);
61 bool operator == ( const wxColour
& col
);
62 bool operator != ( const wxColour
& col
);
65 void Set( unsigned char red
, unsigned char green
, unsigned char blue
);
66 unsigned char Red() const;
67 unsigned char Green() const;
68 unsigned char Blue() const;
72 void CalcPixel( GdkColormap
*cmap
);
74 GdkColor
*GetColor() const;
78 void InitFromName(const wxString
& colourName
);
81 DECLARE_DYNAMIC_CLASS(wxColour
)
84 #endif // __GTKCOLOURH__