removed USE_SHARED_LIBRARY(IES)
[wxWidgets.git] / src / stubs / colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: colour.cpp
3 // Purpose: wxColour class
4 // Author: AUTHOR
5 // Modified by:
6 // Created: ??/??/98
7 // RCS-ID: $Id$
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifdef __GNUG__
13 #pragma implementation "colour.h"
14 #endif
15
16 #include "wx/gdicmn.h"
17 #include "wx/colour.h"
18
19 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
20
21 // Colour
22
23 wxColour::wxColour ()
24 {
25 m_isInit = FALSE;
26 m_red = m_blue = m_green = 0;
27 /* TODO
28 m_pixel = 0;
29 */
30 }
31
32 wxColour::wxColour (unsigned char r, unsigned char g, unsigned char b)
33 {
34 m_red = r;
35 m_green = g;
36 m_blue = b;
37 m_isInit = TRUE;
38 /* TODO
39 m_pixel = PALETTERGB (m_red, m_green, m_blue);
40 */
41 }
42
43 wxColour::wxColour (const wxColour& col)
44 {
45 m_red = col.m_red;
46 m_green = col.m_green;
47 m_blue = col.m_blue;
48 m_isInit = col.m_isInit;
49 /* TODO
50 m_pixel = col.m_pixel;
51 */
52 }
53
54 wxColour& wxColour::operator =(const wxColour& col)
55 {
56 m_red = col.m_red;
57 m_green = col.m_green;
58 m_blue = col.m_blue;
59 m_isInit = col.m_isInit;
60 /* TODO
61 m_pixel = col.m_pixel;
62 */
63 return *this;
64 }
65
66 void wxColour::InitFromName(const wxString& col)
67 {
68 wxColour *the_colour = wxTheColourDatabase->FindColour (col);
69 if (the_colour)
70 {
71 m_red = the_colour->Red ();
72 m_green = the_colour->Green ();
73 m_blue = the_colour->Blue ();
74 m_isInit = TRUE;
75 }
76 else
77 {
78 m_red = 0;
79 m_green = 0;
80 m_blue = 0;
81 m_isInit = FALSE;
82 }
83 /* TODO
84 m_pixel = PALETTERGB (m_red, m_green, m_blue);
85 */
86 }
87
88 wxColour::~wxColour ()
89 {
90 }
91
92 void wxColour::Set (unsigned char r, unsigned char g, unsigned char b)
93 {
94 m_red = r;
95 m_green = g;
96 m_blue = b;
97 m_isInit = TRUE;
98 /* TODO
99 m_pixel = PALETTERGB (m_red, m_green, m_blue);
100 */
101 }