]> git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_datectrl.cpp
Add virtual ~wxAnyScrollHelperBase() to fix compiler warning.
[wxWidgets.git] / src / xrc / xh_datectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/xrc/xh_datectrl.cpp
3 // Purpose: XML resource handler for wxDatePickerCtrl
4 // Author: Vaclav Slavik
5 // Created: 2005-02-07
6 // Copyright: (c) 2005 Vaclav Slavik
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_DATEPICKCTRL
18
19 #include "wx/xrc/xh_datectrl.h"
20 #include "wx/datectrl.h"
21
22 IMPLEMENT_DYNAMIC_CLASS(wxDateCtrlXmlHandler, wxXmlResourceHandler)
23
24 wxDateCtrlXmlHandler::wxDateCtrlXmlHandler() : wxXmlResourceHandler()
25 {
26 XRC_ADD_STYLE(wxDP_DEFAULT);
27 XRC_ADD_STYLE(wxDP_SPIN);
28 XRC_ADD_STYLE(wxDP_DROPDOWN);
29 XRC_ADD_STYLE(wxDP_ALLOWNONE);
30 XRC_ADD_STYLE(wxDP_SHOWCENTURY);
31 AddWindowStyles();
32 }
33
34 wxObject *wxDateCtrlXmlHandler::DoCreateResource()
35 {
36 XRC_MAKE_INSTANCE(picker, wxDatePickerCtrl)
37
38 picker->Create(m_parentAsWindow,
39 GetID(),
40 wxDefaultDateTime,
41 GetPosition(), GetSize(),
42 GetStyle(wxT("style"), wxDP_DEFAULT | wxDP_SHOWCENTURY),
43 wxDefaultValidator,
44 GetName());
45
46 SetupWindow(picker);
47
48 return picker;
49 }
50
51 bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode *node)
52 {
53 return IsOfClass(node, wxT("wxDatePickerCtrl"));
54 }
55
56 #endif // wxUSE_XRC && wxUSE_DATEPICKCTRL