]> git.saurik.com Git - wxWidgets.git/blame - wxPython/src/gtk/calendar.py
Save the initial tstate during initialization
[wxWidgets.git] / wxPython / src / gtk / calendar.py
CommitLineData
f6bcfd97
BP
1# This file was created automatically by SWIG.
2import calendarc
3
4from misc import *
5
6from windows import *
7
8from gdi import *
9
a323d3bd
RD
10from fonts import *
11
f6bcfd97
BP
12from clip_dnd import *
13
14from controls import *
15
16from events import *
17
18from utils import *
19import wx
20
21def EVT_CALENDAR(win, id, fn):
22 win.Connect(id, -1, wxEVT_CALENDAR_DOUBLECLICKED, fn)
23
24def EVT_CALENDAR_SEL_CHANGED(win, id, fn):
25 win.Connect(id, -1, wxEVT_CALENDAR_SEL_CHANGED, fn)
26
27def EVT_CALENDAR_DAY(win, id, fn):
28 win.Connect(id, -1, wxEVT_CALENDAR_DAY_CHANGED, fn)
29
30def EVT_CALENDAR_MONTH(win, id, fn):
31 win.Connect(id, -1, wxEVT_CALENDAR_MONTH_CHANGED, fn)
32
33def EVT_CALENDAR_YEAR(win, id, fn):
34 win.Connect(id, -1, wxEVT_CALENDAR_YEAR_CHANGED, fn)
35
36def EVT_CALENDAR_WEEKDAY_CLICKED(win, id, fn):
37 win.Connect(id, -1, wxEVT_CALENDAR_WEEKDAY_CLICKED, fn)
38
39
40class wxCalendarDateAttrPtr :
41 def __init__(self,this):
42 self.this = this
43 self.thisown = 0
44 def SetTextColour(self, *_args, **_kwargs):
1fded56b 45 val = calendarc.wxCalendarDateAttr_SetTextColour(self, *_args, **_kwargs)
f6bcfd97
BP
46 return val
47 def SetBackgroundColour(self, *_args, **_kwargs):
1fded56b 48 val = calendarc.wxCalendarDateAttr_SetBackgroundColour(self, *_args, **_kwargs)
f6bcfd97
BP
49 return val
50 def SetBorderColour(self, *_args, **_kwargs):
1fded56b 51 val = calendarc.wxCalendarDateAttr_SetBorderColour(self, *_args, **_kwargs)
f6bcfd97
BP
52 return val
53 def SetFont(self, *_args, **_kwargs):
1fded56b 54 val = calendarc.wxCalendarDateAttr_SetFont(self, *_args, **_kwargs)
f6bcfd97
BP
55 return val
56 def SetBorder(self, *_args, **_kwargs):
1fded56b 57 val = calendarc.wxCalendarDateAttr_SetBorder(self, *_args, **_kwargs)
f6bcfd97
BP
58 return val
59 def SetHoliday(self, *_args, **_kwargs):
1fded56b 60 val = calendarc.wxCalendarDateAttr_SetHoliday(self, *_args, **_kwargs)
f6bcfd97
BP
61 return val
62 def HasTextColour(self, *_args, **_kwargs):
1fded56b 63 val = calendarc.wxCalendarDateAttr_HasTextColour(self, *_args, **_kwargs)
f6bcfd97
BP
64 return val
65 def HasBackgroundColour(self, *_args, **_kwargs):
1fded56b 66 val = calendarc.wxCalendarDateAttr_HasBackgroundColour(self, *_args, **_kwargs)
f6bcfd97
BP
67 return val
68 def HasBorderColour(self, *_args, **_kwargs):
1fded56b 69 val = calendarc.wxCalendarDateAttr_HasBorderColour(self, *_args, **_kwargs)
f6bcfd97
BP
70 return val
71 def HasFont(self, *_args, **_kwargs):
1fded56b 72 val = calendarc.wxCalendarDateAttr_HasFont(self, *_args, **_kwargs)
f6bcfd97
BP
73 return val
74 def HasBorder(self, *_args, **_kwargs):
1fded56b 75 val = calendarc.wxCalendarDateAttr_HasBorder(self, *_args, **_kwargs)
f6bcfd97
BP
76 return val
77 def IsHoliday(self, *_args, **_kwargs):
1fded56b 78 val = calendarc.wxCalendarDateAttr_IsHoliday(self, *_args, **_kwargs)
f6bcfd97
BP
79 return val
80 def GetTextColour(self, *_args, **_kwargs):
1fded56b 81 val = calendarc.wxCalendarDateAttr_GetTextColour(self, *_args, **_kwargs)
3e212503 82 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
83 return val
84 def GetBackgroundColour(self, *_args, **_kwargs):
1fded56b 85 val = calendarc.wxCalendarDateAttr_GetBackgroundColour(self, *_args, **_kwargs)
3e212503 86 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
87 return val
88 def GetBorderColour(self, *_args, **_kwargs):
1fded56b 89 val = calendarc.wxCalendarDateAttr_GetBorderColour(self, *_args, **_kwargs)
3e212503 90 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
91 return val
92 def GetFont(self, *_args, **_kwargs):
1fded56b 93 val = calendarc.wxCalendarDateAttr_GetFont(self, *_args, **_kwargs)
3e212503 94 if val: val = wxFontPtr(val) ; val.thisown = 1
f6bcfd97
BP
95 return val
96 def GetBorder(self, *_args, **_kwargs):
1fded56b 97 val = calendarc.wxCalendarDateAttr_GetBorder(self, *_args, **_kwargs)
f6bcfd97
BP
98 return val
99 def __repr__(self):
1fded56b 100 return "<%s.%s instance; proxy of C++ wxCalendarDateAttr instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
f6bcfd97
BP
101class wxCalendarDateAttr(wxCalendarDateAttrPtr):
102 def __init__(self,*_args,**_kwargs):
1fded56b 103 self.this = calendarc.new_wxCalendarDateAttr(*_args,**_kwargs)
f6bcfd97
BP
104 self.thisown = 1
105
106
107
108def wxCalendarDateAttrBorder(*_args,**_kwargs):
1fded56b 109 val = wxCalendarDateAttrPtr(calendarc.new_wxCalendarDateAttrBorder(*_args,**_kwargs))
f6bcfd97
BP
110 val.thisown = 1
111 return val
112
113
114class wxCalendarEventPtr(wxCommandEventPtr):
115 def __init__(self,this):
116 self.this = this
117 self.thisown = 0
118 def GetDate(self, *_args, **_kwargs):
1fded56b 119 val = calendarc.wxCalendarEvent_GetDate(self, *_args, **_kwargs)
f6bcfd97
BP
120 if val: val = wxDateTimePtr(val)
121 return val
122 def GetWeekDay(self, *_args, **_kwargs):
1fded56b 123 val = calendarc.wxCalendarEvent_GetWeekDay(self, *_args, **_kwargs)
f6bcfd97
BP
124 return val
125 def __repr__(self):
1fded56b 126 return "<%s.%s instance; proxy of C++ wxCalendarEvent instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
f6bcfd97
BP
127class wxCalendarEvent(wxCalendarEventPtr):
128 def __init__(self,*_args,**_kwargs):
1fded56b 129 self.this = calendarc.new_wxCalendarEvent(*_args,**_kwargs)
f6bcfd97
BP
130 self.thisown = 1
131
132
133
134
135class wxCalendarCtrlPtr(wxControlPtr):
136 def __init__(self,this):
137 self.this = this
138 self.thisown = 0
aa2a5b86 139 def Create(self, *_args, **_kwargs):
1fded56b 140 val = calendarc.wxCalendarCtrl_Create(self, *_args, **_kwargs)
aa2a5b86 141 return val
f6bcfd97 142 def SetDate(self, *_args, **_kwargs):
1fded56b 143 val = calendarc.wxCalendarCtrl_SetDate(self, *_args, **_kwargs)
f6bcfd97
BP
144 return val
145 def GetDate(self, *_args, **_kwargs):
1fded56b 146 val = calendarc.wxCalendarCtrl_GetDate(self, *_args, **_kwargs)
f6bcfd97
BP
147 if val: val = wxDateTimePtr(val)
148 return val
b66824a5 149 def SetLowerDateLimit(self, *_args, **_kwargs):
1fded56b 150 val = calendarc.wxCalendarCtrl_SetLowerDateLimit(self, *_args, **_kwargs)
b66824a5
RD
151 return val
152 def GetLowerDateLimit(self, *_args, **_kwargs):
1fded56b 153 val = calendarc.wxCalendarCtrl_GetLowerDateLimit(self, *_args, **_kwargs)
b66824a5
RD
154 if val: val = wxDateTimePtr(val)
155 return val
156 def SetUpperDateLimit(self, *_args, **_kwargs):
1fded56b 157 val = calendarc.wxCalendarCtrl_SetUpperDateLimit(self, *_args, **_kwargs)
b66824a5
RD
158 return val
159 def GetUpperDateLimit(self, *_args, **_kwargs):
1fded56b 160 val = calendarc.wxCalendarCtrl_GetUpperDateLimit(self, *_args, **_kwargs)
b66824a5
RD
161 if val: val = wxDateTimePtr(val)
162 return val
163 def SetDateRange(self, *_args, **_kwargs):
1fded56b 164 val = calendarc.wxCalendarCtrl_SetDateRange(self, *_args, **_kwargs)
b66824a5 165 return val
f6bcfd97 166 def EnableYearChange(self, *_args, **_kwargs):
1fded56b 167 val = calendarc.wxCalendarCtrl_EnableYearChange(self, *_args, **_kwargs)
f6bcfd97
BP
168 return val
169 def EnableMonthChange(self, *_args, **_kwargs):
1fded56b 170 val = calendarc.wxCalendarCtrl_EnableMonthChange(self, *_args, **_kwargs)
f6bcfd97
BP
171 return val
172 def EnableHolidayDisplay(self, *_args, **_kwargs):
1fded56b 173 val = calendarc.wxCalendarCtrl_EnableHolidayDisplay(self, *_args, **_kwargs)
f6bcfd97
BP
174 return val
175 def SetHeaderColours(self, *_args, **_kwargs):
1fded56b 176 val = calendarc.wxCalendarCtrl_SetHeaderColours(self, *_args, **_kwargs)
f6bcfd97
BP
177 return val
178 def GetHeaderColourFg(self, *_args, **_kwargs):
1fded56b 179 val = calendarc.wxCalendarCtrl_GetHeaderColourFg(self, *_args, **_kwargs)
3e212503 180 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
181 return val
182 def GetHeaderColourBg(self, *_args, **_kwargs):
1fded56b 183 val = calendarc.wxCalendarCtrl_GetHeaderColourBg(self, *_args, **_kwargs)
3e212503 184 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
185 return val
186 def SetHighlightColours(self, *_args, **_kwargs):
1fded56b 187 val = calendarc.wxCalendarCtrl_SetHighlightColours(self, *_args, **_kwargs)
f6bcfd97
BP
188 return val
189 def GetHighlightColourFg(self, *_args, **_kwargs):
1fded56b 190 val = calendarc.wxCalendarCtrl_GetHighlightColourFg(self, *_args, **_kwargs)
3e212503 191 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
192 return val
193 def GetHighlightColourBg(self, *_args, **_kwargs):
1fded56b 194 val = calendarc.wxCalendarCtrl_GetHighlightColourBg(self, *_args, **_kwargs)
3e212503 195 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
196 return val
197 def SetHolidayColours(self, *_args, **_kwargs):
1fded56b 198 val = calendarc.wxCalendarCtrl_SetHolidayColours(self, *_args, **_kwargs)
f6bcfd97
BP
199 return val
200 def GetHolidayColourFg(self, *_args, **_kwargs):
1fded56b 201 val = calendarc.wxCalendarCtrl_GetHolidayColourFg(self, *_args, **_kwargs)
3e212503 202 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
203 return val
204 def GetHolidayColourBg(self, *_args, **_kwargs):
1fded56b 205 val = calendarc.wxCalendarCtrl_GetHolidayColourBg(self, *_args, **_kwargs)
3e212503 206 if val: val = wxColourPtr(val) ; val.thisown = 1
f6bcfd97
BP
207 return val
208 def GetAttr(self, *_args, **_kwargs):
1fded56b 209 val = calendarc.wxCalendarCtrl_GetAttr(self, *_args, **_kwargs)
f6bcfd97
BP
210 if val: val = wxCalendarDateAttrPtr(val)
211 return val
212 def SetAttr(self, *_args, **_kwargs):
1fded56b 213 val = calendarc.wxCalendarCtrl_SetAttr(self, *_args, **_kwargs)
f6bcfd97
BP
214 return val
215 def SetHoliday(self, *_args, **_kwargs):
1fded56b 216 val = calendarc.wxCalendarCtrl_SetHoliday(self, *_args, **_kwargs)
f6bcfd97
BP
217 return val
218 def ResetAttr(self, *_args, **_kwargs):
1fded56b 219 val = calendarc.wxCalendarCtrl_ResetAttr(self, *_args, **_kwargs)
f6bcfd97
BP
220 return val
221 def HitTest(self, *_args, **_kwargs):
1fded56b 222 val = calendarc.wxCalendarCtrl_HitTest(self, *_args, **_kwargs)
f6bcfd97 223 return val
b66824a5 224 def Enable(self, *_args, **_kwargs):
1fded56b 225 val = calendarc.wxCalendarCtrl_Enable(self, *_args, **_kwargs)
b66824a5
RD
226 return val
227 def Show(self, *_args, **_kwargs):
1fded56b 228 val = calendarc.wxCalendarCtrl_Show(self, *_args, **_kwargs)
b66824a5 229 return val
f6bcfd97 230 def __repr__(self):
1fded56b 231 return "<%s.%s instance; proxy of C++ wxCalendarCtrl instance at %s>" % (self.__class__.__module__, self.__class__.__name__, self.this)
f6bcfd97
BP
232class wxCalendarCtrl(wxCalendarCtrlPtr):
233 def __init__(self,*_args,**_kwargs):
1fded56b 234 self.this = calendarc.new_wxCalendarCtrl(*_args,**_kwargs)
f6bcfd97 235 self.thisown = 1
0220cbc1 236 self._setOORInfo(self)
f6bcfd97
BP
237
238
239
aa2a5b86 240def wxPreCalendarCtrl(*_args,**_kwargs):
1fded56b 241 val = wxCalendarCtrlPtr(calendarc.new_wxPreCalendarCtrl(*_args,**_kwargs))
aa2a5b86 242 val.thisown = 1
17c0e08c 243 val._setOORInfo(val)
aa2a5b86
RD
244 return val
245
f6bcfd97
BP
246
247
248
249#-------------- FUNCTION WRAPPERS ------------------
250
251
252
253#-------------- VARIABLE WRAPPERS ------------------
254
255wxCAL_SUNDAY_FIRST = calendarc.wxCAL_SUNDAY_FIRST
256wxCAL_MONDAY_FIRST = calendarc.wxCAL_MONDAY_FIRST
257wxCAL_SHOW_HOLIDAYS = calendarc.wxCAL_SHOW_HOLIDAYS
258wxCAL_NO_YEAR_CHANGE = calendarc.wxCAL_NO_YEAR_CHANGE
259wxCAL_NO_MONTH_CHANGE = calendarc.wxCAL_NO_MONTH_CHANGE
b66824a5
RD
260wxCAL_SEQUENTIAL_MONTH_SELECTION = calendarc.wxCAL_SEQUENTIAL_MONTH_SELECTION
261wxCAL_SHOW_SURROUNDING_WEEKS = calendarc.wxCAL_SHOW_SURROUNDING_WEEKS
f6bcfd97
BP
262wxCAL_HITTEST_NOWHERE = calendarc.wxCAL_HITTEST_NOWHERE
263wxCAL_HITTEST_HEADER = calendarc.wxCAL_HITTEST_HEADER
264wxCAL_HITTEST_DAY = calendarc.wxCAL_HITTEST_DAY
b66824a5
RD
265wxCAL_HITTEST_INCMONTH = calendarc.wxCAL_HITTEST_INCMONTH
266wxCAL_HITTEST_DECMONTH = calendarc.wxCAL_HITTEST_DECMONTH
267wxCAL_HITTEST_SURROUNDING_WEEK = calendarc.wxCAL_HITTEST_SURROUNDING_WEEK
f6bcfd97
BP
268wxCAL_BORDER_NONE = calendarc.wxCAL_BORDER_NONE
269wxCAL_BORDER_SQUARE = calendarc.wxCAL_BORDER_SQUARE
270wxCAL_BORDER_ROUND = calendarc.wxCAL_BORDER_ROUND
271wxEVT_CALENDAR_DOUBLECLICKED = calendarc.wxEVT_CALENDAR_DOUBLECLICKED
272wxEVT_CALENDAR_SEL_CHANGED = calendarc.wxEVT_CALENDAR_SEL_CHANGED
273wxEVT_CALENDAR_DAY_CHANGED = calendarc.wxEVT_CALENDAR_DAY_CHANGED
274wxEVT_CALENDAR_MONTH_CHANGED = calendarc.wxEVT_CALENDAR_MONTH_CHANGED
275wxEVT_CALENDAR_YEAR_CHANGED = calendarc.wxEVT_CALENDAR_YEAR_CHANGED
276wxEVT_CALENDAR_WEEKDAY_CLICKED = calendarc.wxEVT_CALENDAR_WEEKDAY_CLICKED
277
278
279#-------------- USER INCLUDE -----------------------
280
281
282# Stuff these names into the wx namespace so wxPyConstructObject can find them
283
284wx.wxCalendarEventPtr = wxCalendarEventPtr
b67a9327 285wx.wxCalendarCtrlPtr = wxCalendarCtrlPtr