]> git.saurik.com Git - wxWidgets.git/blame - include/wx/palmos/colour.h
Applied patch to add n bitmaps at once to an image
[wxWidgets.git] / include / wx / palmos / colour.h
CommitLineData
ffecfa5a
JS
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/palmos/colour.h
3// Purpose: wxColour class
e1d63b79 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e1d63b79 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10/////////////////////////////////////////////////////////////////////////////
11
12#ifndef _WX_COLOUR_H_
13#define _WX_COLOUR_H_
14
ffecfa5a
JS
15#include "wx/object.h"
16
17// ----------------------------------------------------------------------------
40989e46 18// wxColour
ffecfa5a
JS
19// ----------------------------------------------------------------------------
20
40989e46 21class WXDLLEXPORT wxColour : public wxColourBase
ffecfa5a
JS
22{
23public:
24 // constructors
25 // ------------
26
ffecfa5a 27 wxColour() { Init(); }
40989e46 28 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
ffecfa5a
JS
29
30 // copy ctors and assignment operators
31 wxColour(const wxColour& col);
32 wxColour& operator=( const wxColour& col);
33
34 // dtor
35 ~wxColour();
36
37
ffecfa5a
JS
38
39 bool Ok() const { return m_isInit; }
40
41 unsigned char Red() const { return m_red; }
42 unsigned char Green() const { return m_green; }
43 unsigned char Blue() const { return m_blue; }
44
45 // comparison
46 bool operator==(const wxColour& colour) const
47 {
48 return m_isInit == colour.m_isInit
49 && m_red == colour.m_red
50 && m_green == colour.m_green
51 && m_blue == colour.m_blue;
52 }
53
54 bool operator != (const wxColour& colour) const { return !(*this == colour); }
55
56 WXCOLORREF GetPixel() const { return m_pixel; };
57
ffecfa5a
JS
58public:
59 WXCOLORREF m_pixel;
60
61protected:
62 // Helper function
63 void Init();
64
40989e46
WS
65 virtual void InitWith(unsigned char red, unsigned char green, unsigned char blue);
66
ffecfa5a
JS
67private:
68 bool m_isInit;
69 unsigned char m_red;
70 unsigned char m_blue;
71 unsigned char m_green;
72
73private:
74 DECLARE_DYNAMIC_CLASS(wxColour)
75};
76
77#endif
78 // _WX_COLOUR_H_