commented out constructor causing ambiguity
[wxWidgets.git] / include / wx / gtk / 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 #include "wx/palette.h"
24
25 //-----------------------------------------------------------------------------
26 // classes
27 //-----------------------------------------------------------------------------
28
29 class wxDC;
30 class wxPaintDC;
31 class wxBitmap;
32 class wxWindow;
33
34 class wxColour;
35
36 //-----------------------------------------------------------------------------
37 // wxColour
38 //-----------------------------------------------------------------------------
39
40 class wxColour: public wxGDIObject
41 {
42 public:
43
44 wxColour();
45 wxColour( char red, char green, char blue );
46 wxColour( const wxString &colourName ) { InitFromName(colourName); }
47 // wxColour( const char *colourName ) { InitFromName(colourName); }
48 wxColour( const wxColour& col );
49 wxColour( const wxColour* col );
50 ~wxColour();
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() const;
57 unsigned char Green() const;
58 unsigned char Blue() const;
59 bool Ok() 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() const;
71 GdkColor *GetColor() const;
72
73 protected:
74 // helper functions
75 void InitFromName(const wxString& colourName);
76
77 private:
78 DECLARE_DYNAMIC_CLASS(wxColour)
79 };
80
81 #endif // __GTKCOLOURH__