]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_timectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_timectrl.cpp
3 // Purpose: XML resource handler for wxTimePickerCtrl
4 // Author: Vadim Zeitlin
7 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_TIMEPICKCTRL
20 #include "wx/xrc/xh_timectrl.h"
21 #include "wx/timectrl.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxTimeCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxTimeCtrlXmlHandler::wxTimeCtrlXmlHandler()
27 XRC_ADD_STYLE(wxTP_DEFAULT
);
31 wxObject
*wxTimeCtrlXmlHandler::DoCreateResource()
33 XRC_MAKE_INSTANCE(picker
, wxTimePickerCtrl
)
35 picker
->Create(m_parentAsWindow
,
38 GetPosition(), GetSize(),
39 GetStyle(wxT("style"), wxTP_DEFAULT
),
48 bool wxTimeCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
50 return IsOfClass(node
, wxS("wxTimePickerCtrl"));
53 #endif // wxUSE_XRC && wxUSE_TIMEPICKCTRL