]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_cald.cpp
Applied patch [ 709618 ] fixes drawing position in wxPrinterDC::DoBlit()
[wxWidgets.git] / src / xrc / xh_cald.cpp
CommitLineData
78d14f80
VS
1/////////////////////////////////////////////////////////////////////////////
2// Name: xh_cald.cpp
b5d6954b 3// Purpose: XRC resource for wxCalendarCtrl
78d14f80
VS
4// Author: Brian Gavin
5// Created: 2000/09/09
6// RCS-ID: $Id$
7// Copyright: (c) 2000 Brian Gavin
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11#ifdef __GNUG__
12#pragma implementation "xh_cald.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
f03b9d45
MB
22#include "wx/setup.h"
23
24#if wxUSE_CALENDARCTRL
25
78d14f80
VS
26#include "wx/xrc/xh_cald.h"
27#include "wx/event.h"
28#include "wx/calctrl.h"
29
30
31wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
32: wxXmlResourceHandler()
33{
544fee32
VS
34 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST);
35 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST);
36 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS);
37 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE);
38 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE);
78d14f80
VS
39 AddWindowStyles();
40}
41
42
43wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
44{
544fee32 45 XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl);
f2588180
VS
46
47 calendar->Create(m_parentAsWindow,
48 GetID(),
49 wxDefaultDateTime,
50 /*TODO: take it from resource*/
51 GetPosition(), GetSize(),
52 GetStyle(),
53 GetName());
78d14f80
VS
54
55 SetupWindow(calendar);
56
57 return calendar;
58}
59
78d14f80
VS
60bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node)
61{
62 return IsOfClass(node, wxT("wxCalendarCtrl"));
63}
f03b9d45
MB
64
65#endif