]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/colour.h
Fix wxOSX warnings about int-to-void* casts.
[wxWidgets.git] / include / wx / os2 / colour.h
CommitLineData
0e320a79 1/////////////////////////////////////////////////////////////////////////////
edc536d3 2// Name: wx/os2/colour.h
0e320a79 3// Purpose: wxColour class
37f214d5 4// Author: David Webster
0e320a79 5// Modified by:
37f214d5 6// Created: 10/13/99
37f214d5 7// Copyright: (c) David Webster
65571936 8// Licence: wxWindows licence
0e320a79
DW
9/////////////////////////////////////////////////////////////////////////////
10
11#ifndef _WX_COLOUR_H_
12#define _WX_COLOUR_H_
13
0e320a79 14#include "wx/object.h"
0e320a79
DW
15
16// Colour
53a2db12 17class WXDLLIMPEXP_CORE wxColour: public wxColourBase
0e320a79
DW
18{
19public:
edc536d3
WS
20 // constructors
21 // ------------
40989e46 22 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
a0606634 23
a0606634 24 // Copy ctors and assignment operators
a0606634
DW
25 wxColour(const wxColour& rCol);
26 wxColour(const wxColour* pCol);
27 wxColour&operator = (const wxColour& rCol);
28
a0606634 29 // Dtor
d3c7fc99 30 virtual ~wxColour();
a0606634 31
a0606634 32 // Accessors
8f884a0d 33 virtual bool IsOk(void) const { return m_bIsInit; }
a0606634 34
a0606634
DW
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; }
0e320a79 38
a0606634 39 // Comparison
a0606634
DW
40 bool operator == (const wxColour& rColour) const
41 {
edb8604f 42 return (m_bIsInit == rColour.m_bIsInit
aad6765c
JS
43 && m_cRed == rColour.m_cRed
44 && m_cGreen == rColour.m_cGreen
45 && m_cBlue == rColour.m_cBlue
a0606634
DW
46 );
47 }
aad6765c 48
a0606634 49 bool operator != (const wxColour& rColour) const { return !(*this == rColour); }
0e320a79 50
6dd0883d 51 WXCOLORREF GetPixel(void) const { return m_vPixel; }
0e320a79 52
aad6765c 53
0e320a79 54private:
aad6765c
JS
55
56 // Helper function
57 void Init();
58
40989e46
WS
59 bool m_bIsInit;
60 unsigned char m_cRed;
61 unsigned char m_cBlue;
62 unsigned char m_cGreen;
63
aea95b1c
VZ
64 virtual void
65 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
0e320a79
DW
66
67public:
a0606634 68 WXCOLORREF m_vPixel ;
0e320a79 69private:
edc536d3 70 DECLARE_DYNAMIC_CLASS(wxColour)
a0606634 71}; // end of class wxColour
0e320a79
DW
72
73#endif
74 // _WX_COLOUR_H_