]> git.saurik.com Git - wxWidgets.git/blame - include/wx/os2/colour.h
api uniformity between tabart and dockart
[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
0e320a79 7// RCS-ID: $Id$
37f214d5 8// Copyright: (c) David Webster
65571936 9// Licence: wxWindows licence
0e320a79
DW
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COLOUR_H_
13#define _WX_COLOUR_H_
14
0e320a79 15#include "wx/object.h"
0e320a79
DW
16
17// Colour
40989e46 18class WXDLLEXPORT wxColour: public wxColourBase
0e320a79
DW
19{
20public:
edc536d3
WS
21 // constructors
22 // ------------
a0606634 23
edc536d3 24 // default
6b5d2431 25 wxColour();
40989e46 26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
a0606634 27
a0606634 28 // Copy ctors and assignment operators
a0606634
DW
29 wxColour(const wxColour& rCol);
30 wxColour(const wxColour* pCol);
31 wxColour&operator = (const wxColour& rCol);
32
a0606634 33 // Dtor
d3c7fc99 34 virtual ~wxColour();
a0606634 35
a0606634 36 // Accessors
b7cacb43
VZ
37 bool Ok() const { return IsOk(); }
38 bool IsOk(void) const {return m_bIsInit; }
a0606634 39
a0606634
DW
40 unsigned char Red(void) const { return m_cRed; }
41 unsigned char Green(void) const { return m_cGreen; }
42 unsigned char Blue(void) const { return m_cBlue; }
0e320a79 43
a0606634 44 // Comparison
a0606634
DW
45 bool operator == (const wxColour& rColour) const
46 {
edb8604f 47 return (m_bIsInit == rColour.m_bIsInit
aad6765c
JS
48 && m_cRed == rColour.m_cRed
49 && m_cGreen == rColour.m_cGreen
50 && m_cBlue == rColour.m_cBlue
a0606634
DW
51 );
52 }
aad6765c 53
a0606634 54 bool operator != (const wxColour& rColour) const { return !(*this == rColour); }
0e320a79 55
a0606634 56 WXCOLORREF GetPixel(void) const { return m_vPixel; };
0e320a79 57
aad6765c 58
0e320a79 59private:
aad6765c
JS
60
61 // Helper function
62 void Init();
63
40989e46
WS
64 bool m_bIsInit;
65 unsigned char m_cRed;
66 unsigned char m_cBlue;
67 unsigned char m_cGreen;
68
aea95b1c
VZ
69 virtual void
70 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
0e320a79
DW
71
72public:
a0606634 73 WXCOLORREF m_vPixel ;
0e320a79 74private:
edc536d3 75 DECLARE_DYNAMIC_CLASS(wxColour)
a0606634 76}; // end of class wxColour
0e320a79
DW
77
78#endif
79 // _WX_COLOUR_H_