]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_datectrl.cpp
wxGTK1 : wx/private/eventloopsourcesmanager.h was missing in evtloop.cpp
[wxWidgets.git] / src / xrc / xh_datectrl.cpp
CommitLineData
310e47b3 1/////////////////////////////////////////////////////////////////////////////
80fdcdb9 2// Name: src/xrc/xh_datectrl.cpp
310e47b3
VS
3// Purpose: XML resource handler for wxDatePickerCtrl
4// Author: Vaclav Slavik
5// Created: 2005-02-07
310e47b3
VS
6// Copyright: (c) 2005 Vaclav Slavik
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
9
310e47b3
VS
10// For compilers that support precompilation, includes "wx.h".
11#include "wx/wxprec.h"
12
13#ifdef __BORLANDC__
14 #pragma hdrstop
15#endif
16
1ee3fb38 17#if wxUSE_XRC && wxUSE_DATEPICKCTRL
310e47b3
VS
18
19#include "wx/xrc/xh_datectrl.h"
20#include "wx/datectrl.h"
21
22IMPLEMENT_DYNAMIC_CLASS(wxDateCtrlXmlHandler, wxXmlResourceHandler)
23
24wxDateCtrlXmlHandler::wxDateCtrlXmlHandler() : wxXmlResourceHandler()
25{
26 XRC_ADD_STYLE(wxDP_DEFAULT);
27 XRC_ADD_STYLE(wxDP_SPIN);
28 XRC_ADD_STYLE(wxDP_DROPDOWN);
4e1ba52e 29 XRC_ADD_STYLE(wxDP_ALLOWNONE);
310e47b3
VS
30 XRC_ADD_STYLE(wxDP_SHOWCENTURY);
31 AddWindowStyles();
32}
33
34wxObject *wxDateCtrlXmlHandler::DoCreateResource()
35{
36 XRC_MAKE_INSTANCE(picker, wxDatePickerCtrl)
37
38 picker->Create(m_parentAsWindow,
39 GetID(),
40 wxDefaultDateTime,
41 GetPosition(), GetSize(),
9a83f860 42 GetStyle(wxT("style"), wxDP_DEFAULT | wxDP_SHOWCENTURY),
310e47b3
VS
43 wxDefaultValidator,
44 GetName());
45
46 SetupWindow(picker);
47
48 return picker;
49}
50
51bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode *node)
52{
53 return IsOfClass(node, wxT("wxDatePickerCtrl"));
54}
55
1ee3fb38 56#endif // wxUSE_XRC && wxUSE_DATEPICKCTRL