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