]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_timectrl.cpp
wxGTK1 : wx/private/eventloopsourcesmanager.h was missing in evtloop.cpp
[wxWidgets.git] / src / xrc / xh_timectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_timectrl.cpp
3 // Purpose: XML resource handler for wxTimePickerCtrl
4 // Author: Vadim Zeitlin
5 // Created: 2011-09-22
6 // Copyright: (c) 2011 Vadim Zeitlin <vadim@wxwidgets.org>
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_TIMEPICKCTRL
18
19 #include "wx/xrc/xh_timectrl.h"
20 #include "wx/timectrl.h"
21
22 IMPLEMENT_DYNAMIC_CLASS(wxTimeCtrlXmlHandler, wxXmlResourceHandler)
23
24 wxTimeCtrlXmlHandler::wxTimeCtrlXmlHandler()
25 {
26 XRC_ADD_STYLE(wxTP_DEFAULT);
27 AddWindowStyles();
28 }
29
30 wxObject *wxTimeCtrlXmlHandler::DoCreateResource()
31 {
32 XRC_MAKE_INSTANCE(picker, wxTimePickerCtrl)
33
34 picker->Create(m_parentAsWindow,
35 GetID(),
36 wxDefaultDateTime,
37 GetPosition(), GetSize(),
38 GetStyle(wxT("style"), wxTP_DEFAULT),
39 wxDefaultValidator,
40 GetName());
41
42 SetupWindow(picker);
43
44 return picker;
45 }
46
47 bool wxTimeCtrlXmlHandler::CanHandle(wxXmlNode *node)
48 {
49 return IsOfClass(node, wxS("wxTimePickerCtrl"));
50 }
51
52 #endif // wxUSE_XRC && wxUSE_TIMEPICKCTRL