1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_clrpicker.cpp
3 // Purpose: XML resource handler for wxColourPickerCtrl
4 // Author: Francesco Montorsi
6 // Copyright: (c) 2006 Francesco Montorsi
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_COLOURPICKERCTRL
19 #include "wx/xrc/xh_clrpicker.h"
20 #include "wx/clrpicker.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxColourPickerCtrlXmlHandler
, wxXmlResourceHandler
)
24 wxColourPickerCtrlXmlHandler::wxColourPickerCtrlXmlHandler() : wxXmlResourceHandler()
26 XRC_ADD_STYLE(wxCLRP_USE_TEXTCTRL
);
27 XRC_ADD_STYLE(wxCLRP_SHOW_LABEL
);
28 XRC_ADD_STYLE(wxCLRP_DEFAULT_STYLE
);
32 wxObject
*wxColourPickerCtrlXmlHandler::DoCreateResource()
34 XRC_MAKE_INSTANCE(picker
, wxColourPickerCtrl
)
36 picker
->Create(m_parentAsWindow
,
38 GetColour(wxT("value"), *wxBLACK
),
39 GetPosition(), GetSize(),
40 GetStyle(wxT("style"), wxCLRP_DEFAULT_STYLE
),
49 bool wxColourPickerCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
51 return IsOfClass(node
, wxT("wxColourPickerCtrl"));
54 #endif // wxUSE_XRC && wxUSE_COLOURPICKERCTRL