]> git.saurik.com Git - wxWidgets.git/blob - src/os2/colour.cpp
remove incorrect cast of wxString to char* (unnecessary and breaks wxUSE_STL build)
[wxWidgets.git] / src / os2 / colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/os2/colour.cpp
3 // Purpose: wxColour class
4 // Author: David Webster
5 // Modified by:
6 // Created: 10/13/99
7 // RCS-ID: $Id$
8 // Copyright: (c) David Webster
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #include "wx/colour.h"
16
17 #ifndef WX_PRECOMP
18 #include "wx/gdicmn.h"
19 #endif
20
21 #define INCL_GPI
22 #define INCL_PM
23 #include<os2.h>
24
25 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
26
27 // Colour
28
29 void wxColour::Init()
30 {
31 m_bIsInit = false;
32 m_vPixel = 0;
33 m_cRed = m_cBlue = m_cGreen = 0;
34 } // end of wxColour::Init
35
36 wxColour::wxColour( const wxColour& rCol )
37 {
38 *this = rCol;
39 } // end of wxColour::wxColour
40
41 wxColour& wxColour::operator= (const wxColour& rCol)
42 {
43 m_cRed = rCol.m_cRed;
44 m_cGreen = rCol.m_cGreen;
45 m_cBlue = rCol.m_cBlue;
46 m_bIsInit = rCol.m_bIsInit;
47 m_vPixel = rCol.m_vPixel;
48 return *this;
49 } // end of wxColour& wxColour::operator =
50
51 wxColour::~wxColour()
52 {
53 } // end of wxColour::~wxColour
54
55 void wxColour::InitRGBA( unsigned char cRed,
56 unsigned char cGreen,
57 unsigned char cBlue,
58 unsigned char WXUNUSED(calpha) )
59 {
60 m_cRed = cRed;
61 m_cGreen = cGreen;
62 m_cBlue = cBlue;
63 m_bIsInit = true;
64 m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue);
65 } // end of wxColour::Set