]>
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( const wxColour
* col
);
54 wxColour
& operator = ( const wxColour
& col
);
60 bool operator == ( const wxColour
& col
);
61 bool operator != ( const wxColour
& col
);
64 void Set( unsigned char red
, unsigned char green
, unsigned char blue
);
65 unsigned char Red() const;
66 unsigned char Green() const;
67 unsigned char Blue() const;
71 void CalcPixel( GdkColormap
*cmap
);
73 GdkColor
*GetColor() const;
77 void InitFromName(const wxString
& colourName
);
80 DECLARE_DYNAMIC_CLASS(wxColour
)
83 #endif // __GTKCOLOURH__