]>
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
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 // For compilers that support precompilation, includes "wx.h".
11 #include "wx/wxprec.h"
17 #if wxUSE_XRC && wxUSE_TIMEPICKCTRL
19 #include "wx/xrc/xh_timectrl.h"
20 #include "wx/timectrl.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxTimeCtrlXmlHandler
, wxXmlResourceHandler
)
24 wxTimeCtrlXmlHandler::wxTimeCtrlXmlHandler()
26 XRC_ADD_STYLE(wxTP_DEFAULT
);
30 wxObject
*wxTimeCtrlXmlHandler::DoCreateResource()
32 XRC_MAKE_INSTANCE(picker
, wxTimePickerCtrl
)
34 picker
->Create(m_parentAsWindow
,
37 GetPosition(), GetSize(),
38 GetStyle(wxT("style"), wxTP_DEFAULT
),
47 bool wxTimeCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
49 return IsOfClass(node
, wxS("wxTimePickerCtrl"));
52 #endif // wxUSE_XRC && wxUSE_TIMEPICKCTRL