]> git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/colour.h
Use wxGetTranslation() instead of _() in the public headers.
[wxWidgets.git] / include / wx / os2 / colour.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/os2/colour.h
3 // Purpose: wxColour class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // Copyright: (c) David Webster
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11 #ifndef _WX_COLOUR_H_
12 #define _WX_COLOUR_H_
13
14 #include "wx/object.h"
15
16 // Colour
17 class WXDLLIMPEXP_CORE wxColour: public wxColourBase
18 {
19 public:
20 // constructors
21 // ------------
22 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
23
24 // Copy ctors and assignment operators
25 wxColour(const wxColour& rCol);
26 wxColour(const wxColour* pCol);
27 wxColour&operator = (const wxColour& rCol);
28
29 // Dtor
30 virtual ~wxColour();
31
32 // Accessors
33 virtual bool IsOk(void) const { return m_bIsInit; }
34
35 unsigned char Red(void) const { return m_cRed; }
36 unsigned char Green(void) const { return m_cGreen; }
37 unsigned char Blue(void) const { return m_cBlue; }
38
39 // Comparison
40 bool operator == (const wxColour& rColour) const
41 {
42 return (m_bIsInit == rColour.m_bIsInit
43 && m_cRed == rColour.m_cRed
44 && m_cGreen == rColour.m_cGreen
45 && m_cBlue == rColour.m_cBlue
46 );
47 }
48
49 bool operator != (const wxColour& rColour) const { return !(*this == rColour); }
50
51 WXCOLORREF GetPixel(void) const { return m_vPixel; }
52
53
54 private:
55
56 // Helper function
57 void Init();
58
59 bool m_bIsInit;
60 unsigned char m_cRed;
61 unsigned char m_cBlue;
62 unsigned char m_cGreen;
63
64 virtual void
65 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
66
67 public:
68 WXCOLORREF m_vPixel ;
69 private:
70 DECLARE_DYNAMIC_CLASS(wxColour)
71 }; // end of class wxColour
72
73 #endif
74 // _WX_COLOUR_H_