]>
git.saurik.com Git - wxWidgets.git/blob - src/palmos/colour.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/palmos/colour.cpp
3 // Purpose: wxColour class
4 // Author: William Osborne - minimal working wxPalmOS port
8 // Copyright: (c) William Osborne
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
19 #include "wx/colour.h"
22 #include "wx/gdicmn.h"
27 #if wxUSE_EXTENDED_RTTI
29 template<> void wxStringReadValue(const wxString
&s
, wxColour
&data
)
33 wxLogError(_("String To Colour : Incorrect colour specification : %s"),
39 template<> void wxStringWriteValue(wxString
&s
, const wxColour
&data
)
41 s
= data
.GetAsString(wxC2S_HTML_SYNTAX
);
44 wxTO_STRING_IMP( wxColour
)
45 wxFROM_STRING_IMP( wxColour
)
47 IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour
, wxObject
, "wx/colour.h" , &wxTO_STRING( wxColour
) , &wxFROM_STRING( wxColour
))
49 wxBEGIN_PROPERTIES_TABLE(wxColour
)
50 wxREADONLY_PROPERTY( Red
, unsigned char, Red
, EMPTY_MACROVALUE
, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
51 wxREADONLY_PROPERTY( Green
, unsigned char, Green
, EMPTY_MACROVALUE
, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
52 wxREADONLY_PROPERTY( Blue
, unsigned char, Blue
, EMPTY_MACROVALUE
, 0 /*flags*/, wxT("Helpstring"), wxT("group"))
53 wxEND_PROPERTIES_TABLE()
55 wxCONSTRUCTOR_3( wxColour
, unsigned char, Red
, unsigned char, Green
, unsigned char, Blue
)
57 wxBEGIN_HANDLERS_TABLE(wxColour
)
58 wxEND_HANDLERS_TABLE()
60 IMPLEMENT_DYNAMIC_CLASS(wxColour
, wxObject
)
74 wxColour::wxColour(const wxColour
& col
)
79 wxColour
& wxColour::operator=(const wxColour
& col
)
82 m_green
= col
.m_green
;
84 m_isInit
= col
.m_isInit
;
85 m_pixel
= col
.m_pixel
;
93 void wxColour::InitWith(unsigned char r
, unsigned char g
, unsigned char b
)