]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_clrpicker.cpp
Fix wxGrid compilation with MSVC7.
[wxWidgets.git] / src / xrc / xh_clrpicker.cpp
CommitLineData
ec376c8f 1/////////////////////////////////////////////////////////////////////////////
4ce7b1e4 2// Name: src/xrc/xh_clrpicker.cpp
ec376c8f
VZ
3// Purpose: XML resource handler for wxColourPickerCtrl
4// Author: Francesco Montorsi
5// Created: 2006-04-17
6// RCS-ID: $Id$
7// Copyright: (c) 2006 Francesco Montorsi
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11// For compilers that support precompilation, includes "wx.h".
12#include "wx/wxprec.h"
13
14#ifdef __BORLANDC__
15 #pragma hdrstop
16#endif
17
18#if wxUSE_XRC && wxUSE_COLOURPICKERCTRL
19
20#include "wx/xrc/xh_clrpicker.h"
21#include "wx/clrpicker.h"
22
23IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler, wxXmlResourceHandler)
24
25wxColourPickerCtrlXmlHandler::wxColourPickerCtrlXmlHandler() : wxXmlResourceHandler()
26{
27 XRC_ADD_STYLE(wxCLRP_USE_TEXTCTRL);
28 XRC_ADD_STYLE(wxCLRP_SHOW_LABEL);
29 XRC_ADD_STYLE(wxCLRP_DEFAULT_STYLE);
30 AddWindowStyles();
31}
32
33wxObject *wxColourPickerCtrlXmlHandler::DoCreateResource()
34{
35 XRC_MAKE_INSTANCE(picker, wxColourPickerCtrl)
36
37 picker->Create(m_parentAsWindow,
38 GetID(),
e96ff06f 39 GetColour(wxT("value"), *wxBLACK),
ec376c8f 40 GetPosition(), GetSize(),
9a83f860 41 GetStyle(wxT("style"), wxCLRP_DEFAULT_STYLE),
ec376c8f
VZ
42 wxDefaultValidator,
43 GetName());
44
45 SetupWindow(picker);
46
47 return picker;
48}
49
50bool wxColourPickerCtrlXmlHandler::CanHandle(wxXmlNode *node)
51{
52 return IsOfClass(node, wxT("wxColourPickerCtrl"));
53}
54
55#endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL