/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/generic/colour.h
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/include/wx/generic/colour.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 10 months ago) by william
File MIME type: text/plain
File size: 1903 byte(s)
branching from upstream revision (http://pcsx2.googlecode.com/svn/trunk
): r3113 to
https://svn.netsolutions.dnsalias.com/websvn/ps2/pcsx2/pcsx2_0.9.7/branch/r3113_0.9.7_beta
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/colour.h
3 // Purpose: wxColour class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id: colour.h 41751 2006-10-08 21:56:55Z VZ $
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef _WX_GENERIC_COLOUR_H_
13 #define _WX_GENERIC_COLOUR_H_
14
15 #include "wx/object.h"
16
17 // Colour
18 class WXDLLEXPORT wxColour: public wxColourBase
19 {
20 public:
21 // constructors
22 // ------------
23
24 // default
25 wxColour();
26 DEFINE_STD_WXCOLOUR_CONSTRUCTORS
27
28 // copy ctors and assignment operators
29 wxColour(const wxColour& col);
30 wxColour& operator=(const wxColour& col);
31
32 // dtor
33 virtual ~wxColour();
34
35 // accessors
36 bool Ok() const { return IsOk(); }
37 bool IsOk() const { return m_isInit; }
38
39 unsigned char Red() const { return m_red; }
40 unsigned char Green() const { return m_green; }
41 unsigned char Blue() const { return m_blue; }
42 unsigned char Alpha() const { return m_alpha; }
43
44 // comparison
45 bool operator==(const wxColour& colour) const
46 {
47 return (m_red == colour.m_red &&
48 m_green == colour.m_green &&
49 m_blue == colour.m_blue &&
50 m_alpha == colour.m_alpha &&
51 m_isInit == colour.m_isInit);
52 }
53
54 bool operator!=(const wxColour& colour) const { return !(*this == colour); }
55
56 protected:
57
58 // Helper function
59 void Init();
60
61 virtual void
62 InitRGBA(unsigned char r, unsigned char g, unsigned char b, unsigned char a);
63
64 private:
65 bool m_isInit;
66 unsigned char m_red;
67 unsigned char m_blue;
68 unsigned char m_green;
69 unsigned char m_alpha;
70
71 private:
72 DECLARE_DYNAMIC_CLASS(wxColour)
73 };
74
75 #endif // _WX_GENERIC_COLOUR_H_

  ViewVC Help
Powered by ViewVC 1.1.22