]>
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 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
12 #pragma implementation "xh_datectrl.h"
15 // For compilers that support precompilation, includes "wx.h".
16 #include "wx/wxprec.h"
22 #if wxUSE_XRC && wxUSE_DATEPICKCTRL
24 #include "wx/xrc/xh_datectrl.h"
25 #include "wx/datectrl.h"
27 IMPLEMENT_DYNAMIC_CLASS(wxDateCtrlXmlHandler
, wxXmlResourceHandler
)
29 wxDateCtrlXmlHandler::wxDateCtrlXmlHandler() : wxXmlResourceHandler()
31 XRC_ADD_STYLE(wxDP_DEFAULT
);
32 XRC_ADD_STYLE(wxDP_SPIN
);
33 XRC_ADD_STYLE(wxDP_DROPDOWN
);
34 XRC_ADD_STYLE(wxDP_SHOWCENTURY
);
38 wxObject
*wxDateCtrlXmlHandler::DoCreateResource()
40 XRC_MAKE_INSTANCE(picker
, wxDatePickerCtrl
)
42 picker
->Create(m_parentAsWindow
,
45 GetPosition(), GetSize(),
46 GetStyle(_T("style"), wxDP_DEFAULT
| wxDP_SHOWCENTURY
),
55 bool wxDateCtrlXmlHandler::CanHandle(wxXmlNode
*node
)
57 return IsOfClass(node
, wxT("wxDatePickerCtrl"));
60 #endif // wxUSE_XRC && wxUSE_DATEPICKCTRL