]>
git.saurik.com Git - wxWidgets.git/blob - src/xrc/xh_datectrl.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: xh_datectrl.cpp
3 // Purpose: XML resource handler for wxDatePickerCtrl
4 // Author: Vaclav Slavik
7 // Copyright: (c) 2005 Vaclav Slavik
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 // For compilers that support precompilation, includes "wx.h".
12 #include "wx/wxprec.h"
18 #if wxUSE_XRC && wxUSE_DATEPICKCTRL
20 #include "wx/xrc/xh_datectrl.h"
21 #include "wx/datectrl.h"
23 IMPLEMENT_DYNAMIC_CLASS(wxDateCtrlXmlHandler
, wxXmlResourceHandler
)
25 wxDateCtrlXmlHandler::wxDateCtrlXmlHandler() : wxXmlResourceHandler()
27 XRC_ADD_STYLE(wxDP_DEFAULT
);
28 XRC_ADD_STYLE(wxDP_SPIN
);
29 XRC_ADD_STYLE(wxDP_DROPDOWN
);
30 XRC_ADD_STYLE(wxDP_ALLOWNONE
);
31 XRC_ADD_STYLE(wxDP_SHOWCENTURY
);
35 wxObject
*wxDateCtrlXmlHandler::DoCreateResource()
37 XRC_MAKE_INSTANCE(picker
, wxDatePickerCtrl
)
39 picker
->Create(m_parentAsWindow
,
42 GetPosition(), GetSize(),
43 GetStyle(wxT("style"), wxDP_DEFAULT
| wxDP_SHOWCENTURY
),
52 bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
54 return IsOfClass(node
, wxT("wxDatePickerCtrl"));
57 #endif // wxUSE_XRC && wxUSE_DATEPICKCTRL