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