1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_clrpicker.cpp
3 // Purpose: XML resource handler for wxColourPickerCtrl
4 // Author: Francesco Montorsi
7 // Copyright: (c) 2006 Francesco Montorsi
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_COLOURPICKERCTRL
20 #include "wx/xrc/xh_clrpicker.h"
21 #include "wx/clrpicker.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxColourPickerCtrlXmlHandler::wxColourPickerCtrlXmlHandler() : wxXmlResourceHandler()
27 XRC_ADD_STYLE(wxCLRP_USE_TEXTCTRL
);
28 XRC_ADD_STYLE(wxCLRP_SHOW_LABEL
);
29 XRC_ADD_STYLE(wxCLRP_DEFAULT_STYLE
);
33 wxObject
*wxColourPickerCtrlXmlHandler::DoCreateResource()
35 XRC_MAKE_INSTANCE(picker
, wxColourPickerCtrl
)
37 picker
->Create(m_parentAsWindow
,
39 GetColour(wxT("colour")),
40 GetPosition(), GetSize(),
41 GetStyle(_T("style"), wxCLRP_DEFAULT_STYLE
),
50 bool wxColourPickerCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
52 return IsOfClass(node
, wxT("wxColourPickerCtrl"));
55 #endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL