]> git.saurik.com Git - wxWidgets.git/blame - src/xrc/xh_cald.cpp
Somehow, setting a tint color makes gauge work :/.
[wxWidgets.git] / src / xrc / xh_cald.cpp
CommitLineData
78d14f80 1/////////////////////////////////////////////////////////////////////////////
d5da0ce7 2// Name: src/xrc/xh_cald.cpp
b5d6954b 3// Purpose: XRC resource for wxCalendarCtrl
78d14f80
VS
4// Author: Brian Gavin
5// Created: 2000/09/09
78d14f80
VS
6// Copyright: (c) 2000 Brian Gavin
7// Licence: wxWindows licence
8/////////////////////////////////////////////////////////////////////////////
f80ea77b 9
78d14f80
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
621be1ec 17#if wxUSE_XRC && wxUSE_CALENDARCTRL
f03b9d45 18
78d14f80 19#include "wx/xrc/xh_cald.h"
d5da0ce7
WS
20
21#ifndef WX_PRECOMP
22 #include "wx/event.h"
23#endif //WX_PRECOMP
24
78d14f80
VS
25#include "wx/calctrl.h"
26
854e189f 27IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler, wxXmlResourceHandler)
78d14f80 28
f80ea77b
WS
29wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler()
30: wxXmlResourceHandler()
78d14f80 31{
544fee32
VS
32 XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST);
33 XRC_ADD_STYLE(wxCAL_MONDAY_FIRST);
34 XRC_ADD_STYLE(wxCAL_SHOW_HOLIDAYS);
35 XRC_ADD_STYLE(wxCAL_NO_YEAR_CHANGE);
36 XRC_ADD_STYLE(wxCAL_NO_MONTH_CHANGE);
c1250407
JS
37 XRC_ADD_STYLE(wxCAL_SEQUENTIAL_MONTH_SELECTION);
38 XRC_ADD_STYLE(wxCAL_SHOW_SURROUNDING_WEEKS);
39
78d14f80
VS
40 AddWindowStyles();
41}
42
43
44wxObject *wxCalendarCtrlXmlHandler::DoCreateResource()
f80ea77b 45{
544fee32 46 XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl);
f2588180
VS
47
48 calendar->Create(m_parentAsWindow,
49 GetID(),
50 wxDefaultDateTime,
51 /*TODO: take it from resource*/
52 GetPosition(), GetSize(),
53 GetStyle(),
54 GetName());
f80ea77b 55
78d14f80 56 SetupWindow(calendar);
f80ea77b 57
78d14f80
VS
58 return calendar;
59}
60
78d14f80
VS
61bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node)
62{
63 return IsOfClass(node, wxT("wxCalendarCtrl"));
64}
f03b9d45 65
621be1ec 66#endif // wxUSE_XRC && wxUSE_CALENDARCTRL