]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/colour.h
wxDataFormat typedef added
[wxWidgets.git] / include / wx / gtk1 / colour.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: colour.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKCOLOURH__
13 #define __GTKCOLOURH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/defs.h"
20 #include "wx/object.h"
21 #include "wx/string.h"
22 #include "wx/gdiobj.h"
23
24 //-----------------------------------------------------------------------------
25 // classes
26 //-----------------------------------------------------------------------------
27
28 class wxDC;
29 class wxPaintDC;
30 class wxBitmap;
31 class wxWindow;
32
33 class wxColour;
34
35 //-----------------------------------------------------------------------------
36 // wxColour
37 //-----------------------------------------------------------------------------
38
39 class wxColour: public wxGDIObject
40 {
41 DECLARE_DYNAMIC_CLASS(wxColour)
42
43 public:
44
45 wxColour(void);
46 wxColour( char red, char green, char blue );
47 wxColour( const wxString &colourName );
48 wxColour( const wxColour& col );
49 wxColour( const wxColour* col );
50 ~wxColour(void);
51 wxColour& operator = ( const wxColour& col );
52 wxColour& operator = ( const wxString& colourName );
53 bool operator == ( const wxColour& col );
54 bool operator != ( const wxColour& col );
55 void Set( const unsigned char red, const unsigned char green, const unsigned char blue );
56 unsigned char Red(void) const;
57 unsigned char Green(void) const;
58 unsigned char Blue(void) const;
59 bool Ok(void) const;
60
61 private:
62 public:
63
64 friend wxDC;
65 friend wxPaintDC;
66 friend wxBitmap;
67 friend wxWindow;
68
69 void CalcPixel( GdkColormap *cmap );
70 int GetPixel(void);
71 GdkColor *GetColor(void);
72
73 // no data :-)
74 };
75
76 #endif // __GTKCOLOURH__