]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/msw/calendar.py
Updated layout test
[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
d55e5bfc
RD
6import _misc
7import _core
8wx = _core
c24da6d6 9__docfilter__ = wx.__DocFilter(globals())
d14a1e28
RD
10CAL_SUNDAY_FIRST = _calendar.CAL_SUNDAY_FIRST
11CAL_MONDAY_FIRST = _calendar.CAL_MONDAY_FIRST
12CAL_SHOW_HOLIDAYS = _calendar.CAL_SHOW_HOLIDAYS
13CAL_NO_YEAR_CHANGE = _calendar.CAL_NO_YEAR_CHANGE
14CAL_NO_MONTH_CHANGE = _calendar.CAL_NO_MONTH_CHANGE
15CAL_SEQUENTIAL_MONTH_SELECTION = _calendar.CAL_SEQUENTIAL_MONTH_SELECTION
16CAL_SHOW_SURROUNDING_WEEKS = _calendar.CAL_SHOW_SURROUNDING_WEEKS
17CAL_HITTEST_NOWHERE = _calendar.CAL_HITTEST_NOWHERE
18CAL_HITTEST_HEADER = _calendar.CAL_HITTEST_HEADER
19CAL_HITTEST_DAY = _calendar.CAL_HITTEST_DAY
20CAL_HITTEST_INCMONTH = _calendar.CAL_HITTEST_INCMONTH
21CAL_HITTEST_DECMONTH = _calendar.CAL_HITTEST_DECMONTH
22CAL_HITTEST_SURROUNDING_WEEK = _calendar.CAL_HITTEST_SURROUNDING_WEEK
23CAL_BORDER_NONE = _calendar.CAL_BORDER_NONE
24CAL_BORDER_SQUARE = _calendar.CAL_BORDER_SQUARE
25CAL_BORDER_ROUND = _calendar.CAL_BORDER_ROUND
26class CalendarDateAttr(object):
98e665d3 27 """
c24da6d6
RD
28 A set of customization attributes for a calendar date, which can be
29 used to control the look of the Calendar object.
98e665d3 30 """
423f194a
RD
31 def __repr__(self):
32 return "<%s.%s; proxy of C++ wxCalendarDateAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 33 def __init__(self, *args, **kwargs):
41f1cec7 34 """
a95a7133 35 __init__(self, Colour colText=wxNullColour, Colour colBack=wxNullColour,
98e665d3 36 Colour colBorder=wxNullColour, Font font=wxNullFont,
d03fd34d 37 int border=CAL_BORDER_NONE) -> CalendarDateAttr
98e665d3
RD
38
39 Create a CalendarDateAttr.
41f1cec7 40 """
d14a1e28
RD
41 newobj = _calendar.new_CalendarDateAttr(*args, **kwargs)
42 self.this = newobj.this
eedf876b 43 self.thisown = 1
d14a1e28 44 del newobj.thisown
423f194a 45 def SetTextColour(*args, **kwargs):
a95a7133 46 """SetTextColour(self, Colour colText)"""
423f194a
RD
47 return _calendar.CalendarDateAttr_SetTextColour(*args, **kwargs)
48
49 def SetBackgroundColour(*args, **kwargs):
a95a7133 50 """SetBackgroundColour(self, Colour colBack)"""
423f194a
RD
51 return _calendar.CalendarDateAttr_SetBackgroundColour(*args, **kwargs)
52
53 def SetBorderColour(*args, **kwargs):
a95a7133 54 """SetBorderColour(self, Colour col)"""
423f194a
RD
55 return _calendar.CalendarDateAttr_SetBorderColour(*args, **kwargs)
56
57 def SetFont(*args, **kwargs):
a95a7133 58 """SetFont(self, Font font)"""
423f194a
RD
59 return _calendar.CalendarDateAttr_SetFont(*args, **kwargs)
60
61 def SetBorder(*args, **kwargs):
a95a7133 62 """SetBorder(self, int border)"""
423f194a
RD
63 return _calendar.CalendarDateAttr_SetBorder(*args, **kwargs)
64
65 def SetHoliday(*args, **kwargs):
a95a7133 66 """SetHoliday(self, bool holiday)"""
423f194a
RD
67 return _calendar.CalendarDateAttr_SetHoliday(*args, **kwargs)
68
69 def HasTextColour(*args, **kwargs):
a95a7133 70 """HasTextColour(self) -> bool"""
423f194a
RD
71 return _calendar.CalendarDateAttr_HasTextColour(*args, **kwargs)
72
73 def HasBackgroundColour(*args, **kwargs):
a95a7133 74 """HasBackgroundColour(self) -> bool"""
423f194a
RD
75 return _calendar.CalendarDateAttr_HasBackgroundColour(*args, **kwargs)
76
77 def HasBorderColour(*args, **kwargs):
a95a7133 78 """HasBorderColour(self) -> bool"""
423f194a
RD
79 return _calendar.CalendarDateAttr_HasBorderColour(*args, **kwargs)
80
81 def HasFont(*args, **kwargs):
a95a7133 82 """HasFont(self) -> bool"""
423f194a
RD
83 return _calendar.CalendarDateAttr_HasFont(*args, **kwargs)
84
85 def HasBorder(*args, **kwargs):
a95a7133 86 """HasBorder(self) -> bool"""
423f194a
RD
87 return _calendar.CalendarDateAttr_HasBorder(*args, **kwargs)
88
89 def IsHoliday(*args, **kwargs):
a95a7133 90 """IsHoliday(self) -> bool"""
423f194a
RD
91 return _calendar.CalendarDateAttr_IsHoliday(*args, **kwargs)
92
93 def GetTextColour(*args, **kwargs):
a95a7133 94 """GetTextColour(self) -> Colour"""
423f194a
RD
95 return _calendar.CalendarDateAttr_GetTextColour(*args, **kwargs)
96
97 def GetBackgroundColour(*args, **kwargs):
a95a7133 98 """GetBackgroundColour(self) -> Colour"""
423f194a
RD
99 return _calendar.CalendarDateAttr_GetBackgroundColour(*args, **kwargs)
100
101 def GetBorderColour(*args, **kwargs):
a95a7133 102 """GetBorderColour(self) -> Colour"""
423f194a
RD
103 return _calendar.CalendarDateAttr_GetBorderColour(*args, **kwargs)
104
105 def GetFont(*args, **kwargs):
a95a7133 106 """GetFont(self) -> Font"""
423f194a
RD
107 return _calendar.CalendarDateAttr_GetFont(*args, **kwargs)
108
109 def GetBorder(*args, **kwargs):
a95a7133 110 """GetBorder(self) -> int"""
423f194a
RD
111 return _calendar.CalendarDateAttr_GetBorder(*args, **kwargs)
112
eedf876b 113
d14a1e28
RD
114class CalendarDateAttrPtr(CalendarDateAttr):
115 def __init__(self, this):
116 self.this = this
117 if not hasattr(self,"thisown"): self.thisown = 0
118 self.__class__ = CalendarDateAttr
119_calendar.CalendarDateAttr_swigregister(CalendarDateAttrPtr)
eedf876b 120
d55e5bfc 121class CalendarEvent(_core.CommandEvent):
423f194a
RD
122 def __repr__(self):
123 return "<%s.%s; proxy of C++ wxCalendarEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 124 def __init__(self, *args, **kwargs):
a95a7133 125 """__init__(self, CalendarCtrl cal, wxEventType type) -> CalendarEvent"""
d14a1e28
RD
126 newobj = _calendar.new_CalendarEvent(*args, **kwargs)
127 self.this = newobj.this
f6bcfd97 128 self.thisown = 1
d14a1e28 129 del newobj.thisown
423f194a 130 def GetDate(*args, **kwargs):
a95a7133 131 """GetDate(self) -> DateTime"""
423f194a
RD
132 return _calendar.CalendarEvent_GetDate(*args, **kwargs)
133
9fd4be55 134 def SetDate(*args, **kwargs):
a95a7133 135 """SetDate(self, DateTime date)"""
9fd4be55
RD
136 return _calendar.CalendarEvent_SetDate(*args, **kwargs)
137
138 def SetWeekDay(*args, **kwargs):
a95a7133 139 """SetWeekDay(self, int wd)"""
9fd4be55
RD
140 return _calendar.CalendarEvent_SetWeekDay(*args, **kwargs)
141
423f194a 142 def GetWeekDay(*args, **kwargs):
a95a7133 143 """GetWeekDay(self) -> int"""
423f194a
RD
144 return _calendar.CalendarEvent_GetWeekDay(*args, **kwargs)
145
f6bcfd97 146
d14a1e28
RD
147class CalendarEventPtr(CalendarEvent):
148 def __init__(self, this):
f6bcfd97 149 self.this = this
d14a1e28
RD
150 if not hasattr(self,"thisown"): self.thisown = 0
151 self.__class__ = CalendarEvent
152_calendar.CalendarEvent_swigregister(CalendarEventPtr)
153
154wxEVT_CALENDAR_DOUBLECLICKED = _calendar.wxEVT_CALENDAR_DOUBLECLICKED
155wxEVT_CALENDAR_SEL_CHANGED = _calendar.wxEVT_CALENDAR_SEL_CHANGED
156wxEVT_CALENDAR_DAY_CHANGED = _calendar.wxEVT_CALENDAR_DAY_CHANGED
157wxEVT_CALENDAR_MONTH_CHANGED = _calendar.wxEVT_CALENDAR_MONTH_CHANGED
158wxEVT_CALENDAR_YEAR_CHANGED = _calendar.wxEVT_CALENDAR_YEAR_CHANGED
159wxEVT_CALENDAR_WEEKDAY_CLICKED = _calendar.wxEVT_CALENDAR_WEEKDAY_CLICKED
160EVT_CALENDAR = wx.PyEventBinder( wxEVT_CALENDAR_DOUBLECLICKED, 1)
161EVT_CALENDAR_SEL_CHANGED = wx.PyEventBinder( wxEVT_CALENDAR_SEL_CHANGED, 1)
162EVT_CALENDAR_DAY = wx.PyEventBinder( wxEVT_CALENDAR_DAY_CHANGED, 1)
163EVT_CALENDAR_MONTH = wx.PyEventBinder( wxEVT_CALENDAR_MONTH_CHANGED, 1)
164EVT_CALENDAR_YEAR = wx.PyEventBinder( wxEVT_CALENDAR_YEAR_CHANGED, 1)
165EVT_CALENDAR_WEEKDAY_CLICKED = wx.PyEventBinder( wxEVT_CALENDAR_WEEKDAY_CLICKED, 1)
166
d55e5bfc 167class CalendarCtrl(_core.Control):
c24da6d6
RD
168 """
169 The calendar control allows the user to pick a date interactively.
170
171 The CalendarCtrl displays a window containing several parts: the
172 control to pick the month and the year at the top (either or both of
173 them may be disabled) and a month area below them which shows all the
174 days in the month. The user can move the current selection using the
175 keyboard and select the date (generating EVT_CALENDAR event) by
176 pressing <Return> or double clicking it.
177
178 It has advanced possibilities for the customization of its
179 display. All global settings (such as colours and fonts used) can, of
180 course, be changed. But also, the display style for each day in the
181 month can be set independently using CalendarDateAttr class.
182
183 An item without custom attributes is drawn with the default colours
184 and font and without border, but setting custom attributes with
185 SetAttr allows to modify its appearance. Just create a custom
186 attribute object and set it for the day you want to be displayed
187 specially A day may be marked as being a holiday, (even if it is not
188 recognized as one by wx.DateTime) by using the SetHoliday method.
189
190 As the attributes are specified for each day, they may change when the
191 month is changed, so you will often want to update them in an
192 EVT_CALENDAR_MONTH event handler.
193
194 Window Styles
195 -------------
196 ============================== ============================
197 CAL_SUNDAY_FIRST Show Sunday as the first day
198 in the week
199 CAL_MONDAY_FIRST Show Monday as the first day
200 in the week
201 CAL_SHOW_HOLIDAYS Highlight holidays in the
202 calendar
203 CAL_NO_YEAR_CHANGE Disable the year changing
204 CAL_NO_MONTH_CHANGE Disable the month (and,
205 implicitly, the year) changing
206 CAL_SHOW_SURROUNDING_WEEKS Show the neighbouring weeks in
207 the previous and next months
208 CAL_SEQUENTIAL_MONTH_SELECTION Use alternative, more compact,
209 style for the month and year
210 selection controls.
211
212 The default calendar style is CAL_SHOW_HOLIDAYS.
213
214 Events
215 -------
216 =========================== ==============================
217 EVT_CALENDAR A day was double clicked in the
218 calendar.
219 EVT_CALENDAR_SEL_CHANGED The selected date changed.
220 EVT_CALENDAR_DAY The selected day changed.
221 EVT_CALENDAR_MONTH The selected month changed.
222 EVT_CALENDAR_YEAR The selected year changed.
223 EVT_CALENDAR_WEEKDAY_CLICKED User clicked on the week day
224 header
225
226 Note that changing the selected date will result in one of
227 EVT_CALENDAR_DAY, MONTH or YEAR events and an EVT_CALENDAR_SEL_CHANGED
228 event.
229
230
231 """
423f194a
RD
232 def __repr__(self):
233 return "<%s.%s; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this,)
d14a1e28 234 def __init__(self, *args, **kwargs):
41f1cec7 235 """
a95a7133 236 __init__(self, Window parent, int id=-1, DateTime date=DefaultDateTime,
41f1cec7
RD
237 Point pos=DefaultPosition, Size size=DefaultSize,
238 long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS,
d03fd34d 239 String name=CalendarNameStr) -> CalendarCtrl
98e665d3
RD
240
241 Create and show a calendar control.
41f1cec7 242 """
d14a1e28
RD
243 newobj = _calendar.new_CalendarCtrl(*args, **kwargs)
244 self.this = newobj.this
f6bcfd97 245 self.thisown = 1
d14a1e28 246 del newobj.thisown
0122b7e3 247 self._setOORInfo(self)
423f194a
RD
248
249 def Create(*args, **kwargs):
41f1cec7 250 """
a95a7133 251 Create(self, Window parent, int id, DateTime date=DefaultDateTime,
41f1cec7
RD
252 Point pos=DefaultPosition, Size size=DefaultSize,
253 long style=wxCAL_SHOW_HOLIDAYS|wxWANTS_CHARS,
d03fd34d 254 String name=CalendarNameStr) -> bool
98e665d3 255
c24da6d6
RD
256 Acutally create the GUI portion of the CalendarCtrl for 2-phase
257 creation.
41f1cec7 258 """
423f194a
RD
259 return _calendar.CalendarCtrl_Create(*args, **kwargs)
260
261 def SetDate(*args, **kwargs):
98e665d3 262 """
a95a7133 263 SetDate(self, DateTime date)
98e665d3
RD
264
265 Sets the current date.
266 """
423f194a
RD
267 return _calendar.CalendarCtrl_SetDate(*args, **kwargs)
268
269 def GetDate(*args, **kwargs):
98e665d3 270 """
a95a7133 271 GetDate(self) -> DateTime
98e665d3
RD
272
273 Gets the currently selected date.
274 """
423f194a
RD
275 return _calendar.CalendarCtrl_GetDate(*args, **kwargs)
276
277 def SetLowerDateLimit(*args, **kwargs):
98e665d3 278 """
a95a7133 279 SetLowerDateLimit(self, DateTime date=DefaultDateTime) -> bool
423f194a 280
98e665d3
RD
281 set the range in which selection can occur
282 """
283 return _calendar.CalendarCtrl_SetLowerDateLimit(*args, **kwargs)
423f194a
RD
284
285 def SetUpperDateLimit(*args, **kwargs):
98e665d3 286 """
a95a7133 287 SetUpperDateLimit(self, DateTime date=DefaultDateTime) -> bool
98e665d3
RD
288
289 set the range in which selection can occur
290 """
423f194a
RD
291 return _calendar.CalendarCtrl_SetUpperDateLimit(*args, **kwargs)
292
98e665d3
RD
293 def GetLowerDateLimit(*args, **kwargs):
294 """
a95a7133 295 GetLowerDateLimit(self) -> DateTime
98e665d3
RD
296
297 get the range in which selection can occur
298 """
299 return _calendar.CalendarCtrl_GetLowerDateLimit(*args, **kwargs)
300
423f194a 301 def GetUpperDateLimit(*args, **kwargs):
98e665d3 302 """
a95a7133 303 GetUpperDateLimit(self) -> DateTime
98e665d3
RD
304
305 get the range in which selection can occur
306 """
423f194a
RD
307 return _calendar.CalendarCtrl_GetUpperDateLimit(*args, **kwargs)
308
309 def SetDateRange(*args, **kwargs):
98e665d3 310 """
a95a7133 311 SetDateRange(self, DateTime lowerdate=DefaultDateTime, DateTime upperdate=DefaultDateTime) -> bool
98e665d3
RD
312
313 set the range in which selection can occur
314 """
423f194a
RD
315 return _calendar.CalendarCtrl_SetDateRange(*args, **kwargs)
316
317 def EnableYearChange(*args, **kwargs):
98e665d3 318 """
a95a7133 319 EnableYearChange(self, bool enable=True)
98e665d3
RD
320
321 This function should be used instead of changing CAL_NO_YEAR_CHANGE
322 style bit directly. It allows or disallows the user to change the year
323 interactively.
324 """
423f194a
RD
325 return _calendar.CalendarCtrl_EnableYearChange(*args, **kwargs)
326
327 def EnableMonthChange(*args, **kwargs):
98e665d3 328 """
a95a7133 329 EnableMonthChange(self, bool enable=True)
98e665d3 330
c24da6d6
RD
331 This function should be used instead of changing CAL_NO_MONTH_CHANGE
332 style bit. It allows or disallows the user to change the month
333 interactively. Note that if the month can not be changed, the year can
334 not be changed either.
98e665d3 335 """
423f194a
RD
336 return _calendar.CalendarCtrl_EnableMonthChange(*args, **kwargs)
337
338 def EnableHolidayDisplay(*args, **kwargs):
98e665d3 339 """
a95a7133 340 EnableHolidayDisplay(self, bool display=True)
98e665d3 341
c24da6d6
RD
342 This function should be used instead of changing CAL_SHOW_HOLIDAYS
343 style bit directly. It enables or disables the special highlighting of
344 the holidays.
98e665d3 345 """
423f194a
RD
346 return _calendar.CalendarCtrl_EnableHolidayDisplay(*args, **kwargs)
347
348 def SetHeaderColours(*args, **kwargs):
98e665d3 349 """
a95a7133 350 SetHeaderColours(self, Colour colFg, Colour colBg)
98e665d3 351
c24da6d6 352 Header colours are used for painting the weekdays at the top.
98e665d3 353 """
423f194a
RD
354 return _calendar.CalendarCtrl_SetHeaderColours(*args, **kwargs)
355
356 def GetHeaderColourFg(*args, **kwargs):
98e665d3 357 """
a95a7133 358 GetHeaderColourFg(self) -> Colour
98e665d3 359
c24da6d6 360 Header colours are used for painting the weekdays at the top.
98e665d3 361 """
423f194a
RD
362 return _calendar.CalendarCtrl_GetHeaderColourFg(*args, **kwargs)
363
364 def GetHeaderColourBg(*args, **kwargs):
98e665d3 365 """
a95a7133 366 GetHeaderColourBg(self) -> Colour
98e665d3 367
c24da6d6 368 Header colours are used for painting the weekdays at the top.
98e665d3 369 """
423f194a
RD
370 return _calendar.CalendarCtrl_GetHeaderColourBg(*args, **kwargs)
371
372 def SetHighlightColours(*args, **kwargs):
98e665d3 373 """
a95a7133 374 SetHighlightColours(self, Colour colFg, Colour colBg)
98e665d3 375
c24da6d6 376 Highlight colour is used for the currently selected date.
98e665d3 377 """
423f194a
RD
378 return _calendar.CalendarCtrl_SetHighlightColours(*args, **kwargs)
379
380 def GetHighlightColourFg(*args, **kwargs):
98e665d3 381 """
a95a7133 382 GetHighlightColourFg(self) -> Colour
98e665d3 383
c24da6d6 384 Highlight colour is used for the currently selected date.
98e665d3 385 """
423f194a
RD
386 return _calendar.CalendarCtrl_GetHighlightColourFg(*args, **kwargs)
387
388 def GetHighlightColourBg(*args, **kwargs):
98e665d3 389 """
a95a7133 390 GetHighlightColourBg(self) -> Colour
98e665d3 391
c24da6d6 392 Highlight colour is used for the currently selected date.
98e665d3 393 """
423f194a
RD
394 return _calendar.CalendarCtrl_GetHighlightColourBg(*args, **kwargs)
395
396 def SetHolidayColours(*args, **kwargs):
98e665d3 397 """
a95a7133 398 SetHolidayColours(self, Colour colFg, Colour colBg)
98e665d3 399
c24da6d6
RD
400 Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
401 used).
98e665d3 402 """
423f194a
RD
403 return _calendar.CalendarCtrl_SetHolidayColours(*args, **kwargs)
404
405 def GetHolidayColourFg(*args, **kwargs):
98e665d3 406 """
a95a7133 407 GetHolidayColourFg(self) -> Colour
98e665d3 408
c24da6d6
RD
409 Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
410 used).
98e665d3 411 """
423f194a
RD
412 return _calendar.CalendarCtrl_GetHolidayColourFg(*args, **kwargs)
413
414 def GetHolidayColourBg(*args, **kwargs):
98e665d3 415 """
a95a7133 416 GetHolidayColourBg(self) -> Colour
98e665d3 417
c24da6d6
RD
418 Holiday colour is used for the holidays (if CAL_SHOW_HOLIDAYS style is
419 used).
98e665d3 420 """
423f194a
RD
421 return _calendar.CalendarCtrl_GetHolidayColourBg(*args, **kwargs)
422
423 def GetAttr(*args, **kwargs):
98e665d3 424 """
a95a7133 425 GetAttr(self, size_t day) -> CalendarDateAttr
98e665d3 426
c24da6d6
RD
427 Returns the attribute for the given date (should be in the range
428 1...31). The returned value may be None
98e665d3 429 """
423f194a
RD
430 return _calendar.CalendarCtrl_GetAttr(*args, **kwargs)
431
432 def SetAttr(*args, **kwargs):
98e665d3 433 """
a95a7133 434 SetAttr(self, size_t day, CalendarDateAttr attr)
98e665d3 435
c24da6d6
RD
436 Associates the attribute with the specified date (in the range
437 1...31). If the attribute passed is None, the items attribute is
438 cleared.
98e665d3 439 """
423f194a
RD
440 return _calendar.CalendarCtrl_SetAttr(*args, **kwargs)
441
442 def SetHoliday(*args, **kwargs):
98e665d3 443 """
a95a7133 444 SetHoliday(self, size_t day)
98e665d3
RD
445
446 Marks the specified day as being a holiday in the current month.
447 """
423f194a
RD
448 return _calendar.CalendarCtrl_SetHoliday(*args, **kwargs)
449
450 def ResetAttr(*args, **kwargs):
98e665d3 451 """
a95a7133 452 ResetAttr(self, size_t day)
98e665d3 453
c24da6d6
RD
454 Clears any attributes associated with the given day (in the range
455 1...31).
98e665d3 456 """
423f194a
RD
457 return _calendar.CalendarCtrl_ResetAttr(*args, **kwargs)
458
459 def HitTest(*args, **kwargs):
98e665d3
RD
460 """
461 HitTest(Point pos) -> (result, date, weekday)
462
c24da6d6
RD
463 Returns 3-tuple with information about the given position on the
464 calendar control. The first value of the tuple is a result code and
465 determines the validity of the remaining two values. The result codes
466 are:
423f194a 467
c24da6d6
RD
468 =================== ============================================
469 CAL_HITTEST_NOWHERE hit outside of anything
470 CAL_HITTEST_HEADER hit on the header, weekday is valid
471 CAL_HITTEST_DAY hit on a day in the calendar, date is set.
472 =================== ============================================
423f194a 473
98e665d3
RD
474 """
475 return _calendar.CalendarCtrl_HitTest(*args, **kwargs)
423f194a 476
9fd4be55 477 def GetMonthControl(*args, **kwargs):
98e665d3 478 """
a95a7133 479 GetMonthControl(self) -> Control
98e665d3 480
c24da6d6 481 Get the currently shown control for month.
98e665d3 482 """
9fd4be55
RD
483 return _calendar.CalendarCtrl_GetMonthControl(*args, **kwargs)
484
485 def GetYearControl(*args, **kwargs):
98e665d3 486 """
a95a7133 487 GetYearControl(self) -> Control
98e665d3 488
c24da6d6 489 Get the currently shown control for year.
98e665d3 490 """
9fd4be55
RD
491 return _calendar.CalendarCtrl_GetYearControl(*args, **kwargs)
492
f6bcfd97 493
d14a1e28
RD
494class CalendarCtrlPtr(CalendarCtrl):
495 def __init__(self, this):
496 self.this = this
497 if not hasattr(self,"thisown"): self.thisown = 0
498 self.__class__ = CalendarCtrl
499_calendar.CalendarCtrl_swigregister(CalendarCtrlPtr)
d03fd34d
RD
500cvar = _calendar.cvar
501CalendarNameStr = cvar.CalendarNameStr
f6bcfd97 502
d14a1e28 503def PreCalendarCtrl(*args, **kwargs):
98e665d3
RD
504 """
505 PreCalendarCtrl() -> CalendarCtrl
506
507 Precreate a CalendarCtrl for 2-phase creation.
508 """
d14a1e28 509 val = _calendar.new_PreCalendarCtrl(*args, **kwargs)
09f3d4e6
RD
510 val.thisown = 1
511 return val
512
f6bcfd97 513