/[pcsx2_0.9.7]/branch/r3113_0.9.7_beta/3rdparty/wxWidgets/src/msw/colour.cpp
ViewVC logotype

Contents of /branch/r3113_0.9.7_beta/3rdparty/wxWidgets/src/msw/colour.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 32 - (show annotations) (download)
Tue Sep 7 03:29:01 2010 UTC (9 years, 11 months ago) by william
File size: 2328 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: src/msw/colour.cpp
3 // Purpose: wxColour class
4 // Author: Julian Smart
5 // Modified by:
6 // Created: 01/02/97
7 // RCS-ID: $Id: colour.cpp 41526 2006-09-30 13:29:45Z SC $
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 #include "wx/colour.h"
20
21 #ifndef WX_PRECOMP
22 #include "wx/gdicmn.h"
23 #endif
24
25 #include "wx/msw/private.h"
26
27 #include <string.h>
28
29 #if wxUSE_EXTENDED_RTTI
30
31 template<> void wxStringReadValue(const wxString &s , wxColour &data )
32 {
33 if ( !data.Set(s) )
34 {
35 wxLogError(_("String To Colour : Incorrect colour specification : %s"),
36 s.c_str() );
37 data = wxNullColour;
38 }
39 }
40
41 template<> void wxStringWriteValue(wxString &s , const wxColour &data )
42 {
43 s = data.GetAsString(wxC2S_HTML_SYNTAX);
44 }
45
46 wxTO_STRING_IMP( wxColour )
47 wxFROM_STRING_IMP( wxColour )
48
49 IMPLEMENT_DYNAMIC_CLASS_WITH_COPY_AND_STREAMERS_XTI( wxColour , wxObject , "wx/colour.h" , &wxTO_STRING( wxColour ) , &wxFROM_STRING( wxColour ))
50
51 wxBEGIN_PROPERTIES_TABLE(wxColour)
52 wxREADONLY_PROPERTY( Red, unsigned char, Red, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
53 wxREADONLY_PROPERTY( Green, unsigned char, Green, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
54 wxREADONLY_PROPERTY( Blue, unsigned char, Blue, EMPTY_MACROVALUE , 0 /*flags*/, wxT("Helpstring"), wxT("group"))
55 wxEND_PROPERTIES_TABLE()
56
57 wxDIRECT_CONSTRUCTOR_3( wxColour, unsigned char, Red, unsigned char, Green, unsigned char, Blue )
58
59 wxBEGIN_HANDLERS_TABLE(wxColour)
60 wxEND_HANDLERS_TABLE()
61 #else
62 IMPLEMENT_DYNAMIC_CLASS(wxColour, wxObject)
63 #endif
64
65 // Colour
66
67 void wxColour::Init()
68 {
69 m_isInit = false;
70 m_pixel = 0;
71 m_alpha =
72 m_red =
73 m_blue =
74 m_green = 0;
75 }
76
77 wxColour::~wxColour()
78 {
79 }
80
81 void wxColour::InitRGBA(unsigned char r, unsigned char g, unsigned char b,
82 unsigned char a)
83 {
84 m_red = r;
85 m_green = g;
86 m_blue = b;
87 m_alpha = a;
88 m_isInit = true;
89 m_pixel = PALETTERGB(m_red, m_green, m_blue);
90 }

  ViewVC Help
Powered by ViewVC 1.1.22