]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/calendar.py
Added selection methods
[wxWidgets.git] / wxPython / src / msw / calendar.py
CommitLineData
f6bcfd97 1# This file was created automatically by SWIG.
d14a1e28
RD
2# Don't modify this file, modify the SWIG interface instead.
3
4import _calendar
5
6import misc
7import core
8wx = core
9CAL_SUNDAY_FIRST = _calendar.CAL_SUNDAY_FIRST
10CAL_MONDAY_FIRST = _calendar.CAL_MONDAY_FIRST
11CAL_SHOW_HOLIDAYS = _calendar.CAL_SHOW_HOLIDAYS
12CAL_NO_YEAR_CHANGE = _calendar.CAL_NO_YEAR_CHANGE
13CAL_NO_MONTH_CHANGE = _calendar.CAL_NO_MONTH_CHANGE
14CAL_SEQUENTIAL_MONTH_SELECTION = _calendar.CAL_SEQUENTIAL_MONTH_SELECTION
15CAL_SHOW_SURROUNDING_WEEKS = _calendar.CAL_SHOW_SURROUNDING_WEEKS
16CAL_HITTEST_NOWHERE = _calendar.CAL_HITTEST_NOWHERE
17CAL_HITTEST_HEADER = _calendar.CAL_HITTEST_HEADER
18CAL_HITTEST_DAY = _calendar.CAL_HITTEST_DAY
19CAL_HITTEST_INCMONTH = _calendar.CAL_HITTEST_INCMONTH
20CAL_HITTEST_DECMONTH = _calendar.CAL_HITTEST_DECMONTH
21CAL_HITTEST_SURROUNDING_WEEK = _calendar.CAL_HITTEST_SURROUNDING_WEEK
22CAL_BORDER_NONE = _calendar.CAL_BORDER_NONE
23CAL_BORDER_SQUARE = _calendar.CAL_BORDER_SQUARE
24CAL_BORDER_ROUND = _calendar.CAL_BORDER_ROUND
25class CalendarDateAttr(object):
423f194a
RD
26 def __repr__(self):
27 return "<%s.%s; proxy of C++ wxCalendarDateAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 28 def __init__(self, *args, **kwargs):
41f1cec7 29 """
d03fd34d
RD
30 __init__(Colour colText, Colour colBack=wxNullColour, Colour colBorder=wxNullColour,
31 Font font=wxNullFont,
32 int border=CAL_BORDER_NONE) -> CalendarDateAttr
41f1cec7 33 """
d14a1e28
RD
34 newobj = _calendar.new_CalendarDateAttr(*args, **kwargs)
35 self.this = newobj.this
eedf876b 36 self.thisown = 1
d14a1e28 37 del newobj.thisown
423f194a 38 def SetTextColour(*args, **kwargs):
d03fd34d 39 """SetTextColour(Colour colText)"""
423f194a
RD
40 return _calendar.CalendarDateAttr_SetTextColour(*args, **kwargs)
41
42 def SetBackgroundColour(*args, **kwargs):
d03fd34d 43 """SetBackgroundColour(Colour colBack)"""
423f194a
RD
44 return _calendar.CalendarDateAttr_SetBackgroundColour(*args, **kwargs)
45
46 def SetBorderColour(*args, **kwargs):
d03fd34d 47 """SetBorderColour(Colour col)"""
423f194a
RD
48 return _calendar.CalendarDateAttr_SetBorderColour(*args, **kwargs)
49
50 def SetFont(*args, **kwargs):
d03fd34d 51 """SetFont(Font font)"""
423f194a
RD
52 return _calendar.CalendarDateAttr_SetFont(*args, **kwargs)
53
54 def SetBorder(*args, **kwargs):
d03fd34d 55 """SetBorder(int border)"""
423f194a
RD
56 return _calendar.CalendarDateAttr_SetBorder(*args, **kwargs)
57
58 def SetHoliday(*args, **kwargs):
59 """SetHoliday(bool holiday)"""
60 return _calendar.CalendarDateAttr_SetHoliday(*args, **kwargs)
61
62 def HasTextColour(*args, **kwargs):
63 """HasTextColour() -> bool"""
64 return _calendar.CalendarDateAttr_HasTextColour(*args, **kwargs)
65
66 def HasBackgroundColour(*args, **kwargs):
67 """HasBackgroundColour() -> bool"""
68 return _calendar.CalendarDateAttr_HasBackgroundColour(*args, **kwargs)
69
70 def HasBorderColour(*args, **kwargs):
71 """HasBorderColour() -> bool"""
72 return _calendar.CalendarDateAttr_HasBorderColour(*args, **kwargs)
73
74 def HasFont(*args, **kwargs):
75 """HasFont() -> bool"""
76 return _calendar.CalendarDateAttr_HasFont(*args, **kwargs)
77
78 def HasBorder(*args, **kwargs):
79 """HasBorder() -> bool"""
80 return _calendar.CalendarDateAttr_HasBorder(*args, **kwargs)
81
82 def IsHoliday(*args, **kwargs):
83 """IsHoliday() -> bool"""
84 return _calendar.CalendarDateAttr_IsHoliday(*args, **kwargs)
85
86 def GetTextColour(*args, **kwargs):
d03fd34d 87 """GetTextColour() -> Colour"""
423f194a
RD
88 return _calendar.CalendarDateAttr_GetTextColour(*args, **kwargs)
89
90 def GetBackgroundColour(*args, **kwargs):
d03fd34d 91 """GetBackgroundColour() -> Colour"""
423f194a
RD
92 return _calendar.CalendarDateAttr_GetBackgroundColour(*args, **kwargs)
93
94 def GetBorderColour(*args, **kwargs):
d03fd34d 95 """GetBorderColour() -> Colour"""
423f194a
RD
96 return _calendar.CalendarDateAttr_GetBorderColour(*args, **kwargs)
97
98 def GetFont(*args, **kwargs):
d03fd34d 99 """GetFont() -> Font"""
423f194a
RD
100 return _calendar.CalendarDateAttr_GetFont(*args, **kwargs)
101
102 def GetBorder(*args, **kwargs):
d03fd34d 103 """GetBorder() -> int"""
423f194a
RD
104 return _calendar.CalendarDateAttr_GetBorder(*args, **kwargs)
105
eedf876b 106
d14a1e28
RD
107class CalendarDateAttrPtr(CalendarDateAttr):
108 def __init__(self, this):
109 self.this = this
110 if not hasattr(self,"thisown"): self.thisown = 0
111 self.__class__ = CalendarDateAttr
112_calendar.CalendarDateAttr_swigregister(CalendarDateAttrPtr)
eedf876b 113
d14a1e28 114def CalendarDateAttrBorder(*args, **kwargs):
d03fd34d 115 """CalendarDateAttrBorder(int border, Colour colBorder=wxNullColour) -> CalendarDateAttr"""
d14a1e28 116 val = _calendar.new_CalendarDateAttrBorder(*args, **kwargs)
eedf876b
RD
117 val.thisown = 1
118 return val
119
d14a1e28 120class CalendarEvent(core.CommandEvent):
423f194a
RD
121 def __repr__(self):
122 return "<%s.%s; proxy of C++ wxCalendarEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 123 def __init__(self, *args, **kwargs):
423f194a 124 """__init__(CalendarCtrl cal, wxEventType type) -> CalendarEvent"""
d14a1e28
RD
125 newobj = _calendar.new_CalendarEvent(*args, **kwargs)
126 self.this = newobj.this
f6bcfd97 127 self.thisown = 1
d14a1e28 128 del newobj.thisown
423f194a
RD
129 def GetDate(*args, **kwargs):
130 """GetDate() -> DateTime"""
131 return _calendar.CalendarEvent_GetDate(*args, **kwargs)
132
9fd4be55
RD
133 def SetDate(*args, **kwargs):
134 """SetDate(DateTime date)"""
135 return _calendar.CalendarEvent_SetDate(*args, **kwargs)
136
137 def SetWeekDay(*args, **kwargs):
d03fd34d 138 """SetWeekDay(int wd)"""
9fd4be55
RD
139 return _calendar.CalendarEvent_SetWeekDay(*args, **kwargs)
140
423f194a 141 def GetWeekDay(*args, **kwargs):
d03fd34d 142 """GetWeekDay() -> int"""
423f194a
RD
143 return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs)
144
f6bcfd97 145
d14a1e28
RD
146class CalendarEventPtr(CalendarEvent):
147 def __init__(self, this):
f6bcfd97 148 self.this = this
d14a1e28
RD
149 if not hasattr(self,"thisown"): self.thisown = 0
150 self.__class__ = CalendarEvent
151_calendar.CalendarEvent_swigregister(CalendarEventPtr)
152
153wxEVT_CALENDAR_DOUBLECLICKED = _calendar.wxEVT_CALENDAR_DOUBLECLICKED
154wxEVT_CALENDAR_SEL_CHANGED = _calendar.wxEVT_CALENDAR_SEL_CHANGED
155wxEVT_CALENDAR_DAY_CHANGED = _calendar.wxEVT_CALENDAR_DAY_CHANGED
156wxEVT_CALENDAR_MONTH_CHANGED = _calendar.wxEVT_CALENDAR_MONTH_CHANGED
157wxEVT_CALENDAR_YEAR_CHANGED = _calendar.wxEVT_CALENDAR_YEAR_CHANGED
158wxEVT_CALENDAR_WEEKDAY_CLICKED = _calendar.wxEVT_CALENDAR_WEEKDAY_CLICKED
159EVT_CALENDAR = wx.PyEventBinder( wxEVT_CALENDAR_DOUBLECLICKED, 1)
160EVT_CALENDAR_SEL_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_SEL_CHANGED, 1)
161EVT_CALENDAR_DAY = wx.PyEventBinder( wxEVT_CALENDAR_DAY_CHANGED, 1)
162EVT_CALENDAR_MONTH = wx.PyEventBinder( wxEVT_CALENDAR_MONTH_CHANGED, 1)
163EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1)
164EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1)
165
166class CalendarCtrl(core.Control):
423f194a
RD
167 def __repr__(self):
168 return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 169 def __init__(self, *args, **kwargs):
41f1cec7
RD
170 """
171 __init__(Window parent, int id, DateTime date=wxDefaultDateTime,
172 Point pos=DefaultPosition, Size size=DefaultSize,
173 long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS,
d03fd34d 174 String name=CalendarNameStr) -> CalendarCtrl
41f1cec7 175 """
d14a1e28
RD
176 newobj = _calendar.new_CalendarCtrl(*args, **kwargs)
177 self.this = newobj.this
f6bcfd97 178 self.thisown = 1
d14a1e28 179 del newobj.thisown
0122b7e3 180 self._setOORInfo(self)
423f194a
RD
181
182 def Create(*args, **kwargs):
41f1cec7
RD
183 """
184 Create(Window parent, int id, DateTime date=wxDefaultDateTime,
185 Point pos=DefaultPosition, Size size=DefaultSize,
186 long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS,
d03fd34d 187 String name=CalendarNameStr) -> bool
41f1cec7 188 """
423f194a
RD
189 return _calendar.CalendarCtrl_Create(*args, **kwargs)
190
191 def SetDate(*args, **kwargs):
192 """SetDate(DateTime date)"""
193 return _calendar.CalendarCtrl_SetDate(*args, **kwargs)
194
195 def GetDate(*args, **kwargs):
196 """GetDate() -> DateTime"""
197 return _calendar.CalendarCtrl_GetDate(*args, **kwargs)
198
199 def SetLowerDateLimit(*args, **kwargs):
200 """SetLowerDateLimit(DateTime date=wxDefaultDateTime) -> bool"""
201 return _calendar.CalendarCtrl_SetLowerDateLimit(*args, **kwargs)
202
203 def GetLowerDateLimit(*args, **kwargs):
204 """GetLowerDateLimit() -> DateTime"""
205 return _calendar.CalendarCtrl_GetLowerDateLimit(*args, **kwargs)
206
207 def SetUpperDateLimit(*args, **kwargs):
208 """SetUpperDateLimit(DateTime date=wxDefaultDateTime) -> bool"""
209 return _calendar.CalendarCtrl_SetUpperDateLimit(*args, **kwargs)
210
211 def GetUpperDateLimit(*args, **kwargs):
212 """GetUpperDateLimit() -> DateTime"""
213 return _calendar.CalendarCtrl_GetUpperDateLimit(*args, **kwargs)
214
215 def SetDateRange(*args, **kwargs):
216 """SetDateRange(DateTime lowerdate=wxDefaultDateTime, DateTime upperdate=wxDefaultDateTime) -> bool"""
217 return _calendar.CalendarCtrl_SetDateRange(*args, **kwargs)
218
219 def EnableYearChange(*args, **kwargs):
220 """EnableYearChange(bool enable=True)"""
221 return _calendar.CalendarCtrl_EnableYearChange(*args, **kwargs)
222
223 def EnableMonthChange(*args, **kwargs):
224 """EnableMonthChange(bool enable=True)"""
225 return _calendar.CalendarCtrl_EnableMonthChange(*args, **kwargs)
226
227 def EnableHolidayDisplay(*args, **kwargs):
228 """EnableHolidayDisplay(bool display=True)"""
229 return _calendar.CalendarCtrl_EnableHolidayDisplay(*args, **kwargs)
230
231 def SetHeaderColours(*args, **kwargs):
d03fd34d 232 """SetHeaderColours(Colour colFg, Colour colBg)"""
423f194a
RD
233 return _calendar.CalendarCtrl_SetHeaderColours(*args, **kwargs)
234
235 def GetHeaderColourFg(*args, **kwargs):
d03fd34d 236 """GetHeaderColourFg() -> Colour"""
423f194a
RD
237 return _calendar.CalendarCtrl_GetHeaderColourFg(*args, **kwargs)
238
239 def GetHeaderColourBg(*args, **kwargs):
d03fd34d 240 """GetHeaderColourBg() -> Colour"""
423f194a
RD
241 return _calendar.CalendarCtrl_GetHeaderColourBg(*args, **kwargs)
242
243 def SetHighlightColours(*args, **kwargs):
d03fd34d 244 """SetHighlightColours(Colour colFg, Colour colBg)"""
423f194a
RD
245 return _calendar.CalendarCtrl_SetHighlightColours(*args, **kwargs)
246
247 def GetHighlightColourFg(*args, **kwargs):
d03fd34d 248 """GetHighlightColourFg() -> Colour"""
423f194a
RD
249 return _calendar.CalendarCtrl_GetHighlightColourFg(*args, **kwargs)
250
251 def GetHighlightColourBg(*args, **kwargs):
d03fd34d 252 """GetHighlightColourBg() -> Colour"""
423f194a
RD
253 return _calendar.CalendarCtrl_GetHighlightColourBg(*args, **kwargs)
254
255 def SetHolidayColours(*args, **kwargs):
d03fd34d 256 """SetHolidayColours(Colour colFg, Colour colBg)"""
423f194a
RD
257 return _calendar.CalendarCtrl_SetHolidayColours(*args, **kwargs)
258
259 def GetHolidayColourFg(*args, **kwargs):
d03fd34d 260 """GetHolidayColourFg() -> Colour"""
423f194a
RD
261 return _calendar.CalendarCtrl_GetHolidayColourFg(*args, **kwargs)
262
263 def GetHolidayColourBg(*args, **kwargs):
d03fd34d 264 """GetHolidayColourBg() -> Colour"""
423f194a
RD
265 return _calendar.CalendarCtrl_GetHolidayColourBg(*args, **kwargs)
266
267 def GetAttr(*args, **kwargs):
268 """GetAttr(size_t day) -> CalendarDateAttr"""
269 return _calendar.CalendarCtrl_GetAttr(*args, **kwargs)
270
271 def SetAttr(*args, **kwargs):
272 """SetAttr(size_t day, CalendarDateAttr attr)"""
273 return _calendar.CalendarCtrl_SetAttr(*args, **kwargs)
274
275 def SetHoliday(*args, **kwargs):
276 """SetHoliday(size_t day)"""
277 return _calendar.CalendarCtrl_SetHoliday(*args, **kwargs)
278
279 def ResetAttr(*args, **kwargs):
280 """ResetAttr(size_t day)"""
281 return _calendar.CalendarCtrl_ResetAttr(*args, **kwargs)
282
283 def HitTest(*args, **kwargs):
d03fd34d 284 """HitTest(Point pos, DateTime date=None, int wd=None) -> int"""
423f194a
RD
285 return _calendar.CalendarCtrl_HitTest(*args, **kwargs)
286
287 def Enable(*args, **kwargs):
288 """Enable(bool enable=True) -> bool"""
289 return _calendar.CalendarCtrl_Enable(*args, **kwargs)
290
291 def Show(*args, **kwargs):
292 """Show(bool show=True) -> bool"""
293 return _calendar.CalendarCtrl_Show(*args, **kwargs)
294
9fd4be55
RD
295 def GetMonthControl(*args, **kwargs):
296 """GetMonthControl() -> Control"""
297 return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs)
298
299 def GetYearControl(*args, **kwargs):
300 """GetYearControl() -> Control"""
301 return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs)
302
f6bcfd97 303
d14a1e28
RD
304class CalendarCtrlPtr(CalendarCtrl):
305 def __init__(self, this):
306 self.this = this
307 if not hasattr(self,"thisown"): self.thisown = 0
308 self.__class__ = CalendarCtrl
309_calendar.CalendarCtrl_swigregister(CalendarCtrlPtr)
d03fd34d
RD
310cvar = _calendar.cvar
311CalendarNameStr = cvar.CalendarNameStr
f6bcfd97 312
d14a1e28 313def PreCalendarCtrl(*args, **kwargs):
423f194a 314 """PreCalendarCtrl() -> CalendarCtrl"""
d14a1e28 315 val = _calendar.new_PreCalendarCtrl(*args, **kwargs)
09f3d4e6
RD
316 val.thisown = 1
317 return val
318
f6bcfd97 319