]>
Commit | Line | Data |
---|---|---|
83df96d6 | 1 | ///////////////////////////////////////////////////////////////////////////// |
edc536d3 | 2 | // Name: wx/x11/colour.h |
83df96d6 | 3 | // Purpose: wxColour class |
3cd0b8c5 | 4 | // Author: Julian Smart, Robert Roebling |
83df96d6 JS |
5 | // Modified by: |
6 | // Created: 17/09/98 | |
3cd0b8c5 | 7 | // Copyright: (c) Julian Smart, Robert Roebling |
edc536d3 | 8 | // Licence: wxWindows licence |
83df96d6 JS |
9 | ///////////////////////////////////////////////////////////////////////////// |
10 | ||
11 | #ifndef _WX_COLOUR_H_ | |
12 | #define _WX_COLOUR_H_ | |
13 | ||
3cd0b8c5 | 14 | #include "wx/defs.h" |
83df96d6 JS |
15 | #include "wx/object.h" |
16 | #include "wx/string.h" | |
3cd0b8c5 RR |
17 | #include "wx/gdiobj.h" |
18 | #include "wx/palette.h" | |
83df96d6 | 19 | |
3cd0b8c5 RR |
20 | //----------------------------------------------------------------------------- |
21 | // classes | |
22 | //----------------------------------------------------------------------------- | |
23 | ||
b5dbe15d VS |
24 | class WXDLLIMPEXP_FWD_CORE wxDC; |
25 | class WXDLLIMPEXP_FWD_CORE wxPaintDC; | |
26 | class WXDLLIMPEXP_FWD_CORE wxBitmap; | |
27 | class WXDLLIMPEXP_FWD_CORE wxWindow; | |
3cd0b8c5 | 28 | |
b5dbe15d | 29 | class WXDLLIMPEXP_FWD_CORE wxColour; |
3cd0b8c5 RR |
30 | |
31 | //----------------------------------------------------------------------------- | |
32 | // wxColour | |
33 | //----------------------------------------------------------------------------- | |
34 | ||
53a2db12 | 35 | class WXDLLIMPEXP_CORE wxColour : public wxColourBase |
83df96d6 | 36 | { |
83df96d6 | 37 | public: |
edc536d3 WS |
38 | // constructors |
39 | // ------------ | |
40989e46 | 40 | DEFINE_STD_WXCOLOUR_CONSTRUCTORS |
564a150b | 41 | |
d3c7fc99 | 42 | virtual ~wxColour(); |
3cd0b8c5 | 43 | |
8f884a0d VZ |
44 | bool operator==(const wxColour& col) const; |
45 | bool operator!=(const wxColour& col) const { return !(*this == col); } | |
3cd0b8c5 | 46 | |
3cd0b8c5 RR |
47 | unsigned char Red() const; |
48 | unsigned char Green() const; | |
49 | unsigned char Blue() const; | |
50 | ||
51 | // Implementation part | |
aad6765c | 52 | |
3cd0b8c5 RR |
53 | void CalcPixel( WXColormap cmap ); |
54 | unsigned long GetPixel() const; | |
55 | WXColor *GetColor() const; | |
56 | ||
57 | protected: | |
8f884a0d VZ |
58 | virtual wxGDIRefData *CreateGDIRefData() const; |
59 | virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; | |
aad6765c | 60 | |
aea95b1c VZ |
61 | virtual void |
62 | InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a); | |
63 | ||
e86d4e59 | 64 | virtual bool FromString(const wxString& str); |
3cd0b8c5 | 65 | |
83df96d6 | 66 | private: |
3cd0b8c5 | 67 | DECLARE_DYNAMIC_CLASS(wxColour) |
83df96d6 JS |
68 | }; |
69 | ||
8f884a0d | 70 | #endif // _WX_COLOUR_H_ |