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