]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/gtk/wx.py
Added the missing EVT_LIST_ITEM_SELECTED and friends.
[wxWidgets.git] / utils / wxPython / src / gtk / wx.py
1 # This file was created automatically by SWIG.
2 import wxc
3
4 from misc import *
5
6 from windows import *
7
8 from gdi import *
9
10 from events import *
11
12 from mdi import *
13
14 from frames import *
15
16 from stattool import *
17
18 from controls import *
19
20 from controls2 import *
21
22 from windows2 import *
23
24 from cmndlgs import *
25
26 from windows3 import *
27
28 from utils import *
29 class wxPyAppPtr(wxEvtHandlerPtr):
30 def __init__(self,this):
31 self.this = this
32 self.thisown = 0
33 def GetAppName(self):
34 val = wxc.wxPyApp_GetAppName(self.this)
35 return val
36 def GetClassName(self):
37 val = wxc.wxPyApp_GetClassName(self.this)
38 return val
39 def GetExitOnFrameDelete(self):
40 val = wxc.wxPyApp_GetExitOnFrameDelete(self.this)
41 return val
42 def GetPrintMode(self):
43 val = wxc.wxPyApp_GetPrintMode(self.this)
44 return val
45 def GetTopWindow(self):
46 val = wxc.wxPyApp_GetTopWindow(self.this)
47 val = wxWindowPtr(val)
48 return val
49 def GetVendorName(self):
50 val = wxc.wxPyApp_GetVendorName(self.this)
51 return val
52 def Dispatch(self):
53 val = wxc.wxPyApp_Dispatch(self.this)
54 return val
55 def ExitMainLoop(self):
56 val = wxc.wxPyApp_ExitMainLoop(self.this)
57 return val
58 def Initialized(self):
59 val = wxc.wxPyApp_Initialized(self.this)
60 return val
61 def MainLoop(self):
62 val = wxc.wxPyApp_MainLoop(self.this)
63 return val
64 def Pending(self):
65 val = wxc.wxPyApp_Pending(self.this)
66 return val
67 def SetAppName(self,arg0):
68 val = wxc.wxPyApp_SetAppName(self.this,arg0)
69 return val
70 def SetClassName(self,arg0):
71 val = wxc.wxPyApp_SetClassName(self.this,arg0)
72 return val
73 def SetExitOnFrameDelete(self,arg0):
74 val = wxc.wxPyApp_SetExitOnFrameDelete(self.this,arg0)
75 return val
76 def SetPrintMode(self,arg0):
77 val = wxc.wxPyApp_SetPrintMode(self.this,arg0)
78 return val
79 def SetTopWindow(self,arg0):
80 val = wxc.wxPyApp_SetTopWindow(self.this,arg0.this)
81 return val
82 def SetVendorName(self,arg0):
83 val = wxc.wxPyApp_SetVendorName(self.this,arg0)
84 return val
85 def AfterMainLoop(self):
86 val = wxc.wxPyApp_AfterMainLoop(self.this)
87 return val
88 def __repr__(self):
89 return "<C wxPyApp instance>"
90 class wxPyApp(wxPyAppPtr):
91 def __init__(self) :
92 self.this = wxc.new_wxPyApp()
93 self.thisown = 1
94
95
96
97
98
99
100 #-------------- FUNCTION WRAPPERS ------------------
101
102 _wxStart = wxc._wxStart
103
104 _wxSetDictionary = wxc._wxSetDictionary
105
106
107
108 #-------------- VARIABLE WRAPPERS ------------------
109
110 wxMAJOR_VERSION = wxc.wxMAJOR_VERSION
111 wxMINOR_VERSION = wxc.wxMINOR_VERSION
112 wxRELEASE_NUMBER = wxc.wxRELEASE_NUMBER
113 wxNOT_FOUND = wxc.wxNOT_FOUND
114 wxVSCROLL = wxc.wxVSCROLL
115 wxHSCROLL = wxc.wxHSCROLL
116 wxCAPTION = wxc.wxCAPTION
117 wxDOUBLE_BORDER = wxc.wxDOUBLE_BORDER
118 wxSUNKEN_BORDER = wxc.wxSUNKEN_BORDER
119 wxRAISED_BORDER = wxc.wxRAISED_BORDER
120 wxBORDER = wxc.wxBORDER
121 wxSIMPLE_BORDER = wxc.wxSIMPLE_BORDER
122 wxSTATIC_BORDER = wxc.wxSTATIC_BORDER
123 wxTRANSPARENT_WINDOW = wxc.wxTRANSPARENT_WINDOW
124 wxNO_BORDER = wxc.wxNO_BORDER
125 wxUSER_COLOURS = wxc.wxUSER_COLOURS
126 wxNO_3D = wxc.wxNO_3D
127 wxTAB_TRAVERSAL = wxc.wxTAB_TRAVERSAL
128 wxHORIZONTAL = wxc.wxHORIZONTAL
129 wxVERTICAL = wxc.wxVERTICAL
130 wxBOTH = wxc.wxBOTH
131 wxCENTER_FRAME = wxc.wxCENTER_FRAME
132 wxSTAY_ON_TOP = wxc.wxSTAY_ON_TOP
133 wxICONIZE = wxc.wxICONIZE
134 wxMINIMIZE = wxc.wxMINIMIZE
135 wxMAXIMIZE = wxc.wxMAXIMIZE
136 wxTHICK_FRAME = wxc.wxTHICK_FRAME
137 wxSYSTEM_MENU = wxc.wxSYSTEM_MENU
138 wxMINIMIZE_BOX = wxc.wxMINIMIZE_BOX
139 wxMAXIMIZE_BOX = wxc.wxMAXIMIZE_BOX
140 wxTINY_CAPTION_HORIZ = wxc.wxTINY_CAPTION_HORIZ
141 wxTINY_CAPTION_VERT = wxc.wxTINY_CAPTION_VERT
142 wxRESIZE_BOX = wxc.wxRESIZE_BOX
143 wxRESIZE_BORDER = wxc.wxRESIZE_BORDER
144 wxDIALOG_MODAL = wxc.wxDIALOG_MODAL
145 wxDIALOG_MODELESS = wxc.wxDIALOG_MODELESS
146 wxDEFAULT_FRAME_STYLE = wxc.wxDEFAULT_FRAME_STYLE
147 wxDEFAULT_DIALOG_STYLE = wxc.wxDEFAULT_DIALOG_STYLE
148 wxFRAME_TOOL_WINDOW = wxc.wxFRAME_TOOL_WINDOW
149 wxCLIP_CHILDREN = wxc.wxCLIP_CHILDREN
150 wxRETAINED = wxc.wxRETAINED
151 wxBACKINGSTORE = wxc.wxBACKINGSTORE
152 wxTB_3DBUTTONS = wxc.wxTB_3DBUTTONS
153 wxTB_HORIZONTAL = wxc.wxTB_HORIZONTAL
154 wxTB_VERTICAL = wxc.wxTB_VERTICAL
155 wxTB_FLAT = wxc.wxTB_FLAT
156 wxCOLOURED = wxc.wxCOLOURED
157 wxFIXED_LENGTH = wxc.wxFIXED_LENGTH
158 wxALIGN_LEFT = wxc.wxALIGN_LEFT
159 wxALIGN_CENTER = wxc.wxALIGN_CENTER
160 wxALIGN_CENTRE = wxc.wxALIGN_CENTRE
161 wxALIGN_RIGHT = wxc.wxALIGN_RIGHT
162 wxLB_NEEDED_SB = wxc.wxLB_NEEDED_SB
163 wxLB_ALWAYS_SB = wxc.wxLB_ALWAYS_SB
164 wxLB_SORT = wxc.wxLB_SORT
165 wxLB_SINGLE = wxc.wxLB_SINGLE
166 wxLB_MULTIPLE = wxc.wxLB_MULTIPLE
167 wxLB_EXTENDED = wxc.wxLB_EXTENDED
168 wxLB_OWNERDRAW = wxc.wxLB_OWNERDRAW
169 wxLB_HSCROLL = wxc.wxLB_HSCROLL
170 wxPROCESS_ENTER = wxc.wxPROCESS_ENTER
171 wxPASSWORD = wxc.wxPASSWORD
172 wxTE_PROCESS_ENTER = wxc.wxTE_PROCESS_ENTER
173 wxTE_PASSWORD = wxc.wxTE_PASSWORD
174 wxTE_READONLY = wxc.wxTE_READONLY
175 wxTE_MULTILINE = wxc.wxTE_MULTILINE
176 wxCB_SIMPLE = wxc.wxCB_SIMPLE
177 wxCB_DROPDOWN = wxc.wxCB_DROPDOWN
178 wxCB_SORT = wxc.wxCB_SORT
179 wxCB_READONLY = wxc.wxCB_READONLY
180 wxRA_HORIZONTAL = wxc.wxRA_HORIZONTAL
181 wxRA_VERTICAL = wxc.wxRA_VERTICAL
182 wxRB_GROUP = wxc.wxRB_GROUP
183 wxGA_PROGRESSBAR = wxc.wxGA_PROGRESSBAR
184 wxGA_HORIZONTAL = wxc.wxGA_HORIZONTAL
185 wxGA_VERTICAL = wxc.wxGA_VERTICAL
186 wxSL_HORIZONTAL = wxc.wxSL_HORIZONTAL
187 wxSL_VERTICAL = wxc.wxSL_VERTICAL
188 wxSL_AUTOTICKS = wxc.wxSL_AUTOTICKS
189 wxSL_LABELS = wxc.wxSL_LABELS
190 wxSL_LEFT = wxc.wxSL_LEFT
191 wxSL_TOP = wxc.wxSL_TOP
192 wxSL_RIGHT = wxc.wxSL_RIGHT
193 wxSL_BOTTOM = wxc.wxSL_BOTTOM
194 wxSL_BOTH = wxc.wxSL_BOTH
195 wxSL_SELRANGE = wxc.wxSL_SELRANGE
196 wxSB_HORIZONTAL = wxc.wxSB_HORIZONTAL
197 wxSB_VERTICAL = wxc.wxSB_VERTICAL
198 wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
199 wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
200 wxTR_HAS_BUTTONS = wxc.wxTR_HAS_BUTTONS
201 wxTR_EDIT_LABELS = wxc.wxTR_EDIT_LABELS
202 wxTR_LINES_AT_ROOT = wxc.wxTR_LINES_AT_ROOT
203 wxLC_ICON = wxc.wxLC_ICON
204 wxLC_SMALL_ICON = wxc.wxLC_SMALL_ICON
205 wxLC_LIST = wxc.wxLC_LIST
206 wxLC_REPORT = wxc.wxLC_REPORT
207 wxLC_ALIGN_TOP = wxc.wxLC_ALIGN_TOP
208 wxLC_ALIGN_LEFT = wxc.wxLC_ALIGN_LEFT
209 wxLC_AUTOARRANGE = wxc.wxLC_AUTOARRANGE
210 wxLC_USER_TEXT = wxc.wxLC_USER_TEXT
211 wxLC_EDIT_LABELS = wxc.wxLC_EDIT_LABELS
212 wxLC_NO_HEADER = wxc.wxLC_NO_HEADER
213 wxLC_NO_SORT_HEADER = wxc.wxLC_NO_SORT_HEADER
214 wxLC_SINGLE_SEL = wxc.wxLC_SINGLE_SEL
215 wxLC_SORT_ASCENDING = wxc.wxLC_SORT_ASCENDING
216 wxLC_SORT_DESCENDING = wxc.wxLC_SORT_DESCENDING
217 wxLC_MASK_TYPE = wxc.wxLC_MASK_TYPE
218 wxLC_MASK_ALIGN = wxc.wxLC_MASK_ALIGN
219 wxLC_MASK_SORT = wxc.wxLC_MASK_SORT
220 wxSP_VERTICAL = wxc.wxSP_VERTICAL
221 wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
222 wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
223 wxSP_WRAP = wxc.wxSP_WRAP
224 wxSP_NOBORDER = wxc.wxSP_NOBORDER
225 wxSP_3D = wxc.wxSP_3D
226 wxSP_BORDER = wxc.wxSP_BORDER
227 wxTAB_MULTILINE = wxc.wxTAB_MULTILINE
228 wxTAB_RIGHTJUSTIFY = wxc.wxTAB_RIGHTJUSTIFY
229 wxTAB_FIXEDWIDTH = wxc.wxTAB_FIXEDWIDTH
230 wxTAB_OWNERDRAW = wxc.wxTAB_OWNERDRAW
231 wxFLOOD_SURFACE = wxc.wxFLOOD_SURFACE
232 wxFLOOD_BORDER = wxc.wxFLOOD_BORDER
233 wxODDEVEN_RULE = wxc.wxODDEVEN_RULE
234 wxWINDING_RULE = wxc.wxWINDING_RULE
235 wxTOOL_TOP = wxc.wxTOOL_TOP
236 wxTOOL_BOTTOM = wxc.wxTOOL_BOTTOM
237 wxTOOL_LEFT = wxc.wxTOOL_LEFT
238 wxTOOL_RIGHT = wxc.wxTOOL_RIGHT
239 wxOK = wxc.wxOK
240 wxYES_NO = wxc.wxYES_NO
241 wxCANCEL = wxc.wxCANCEL
242 wxYES = wxc.wxYES
243 wxNO = wxc.wxNO
244 wxICON_EXCLAMATION = wxc.wxICON_EXCLAMATION
245 wxICON_HAND = wxc.wxICON_HAND
246 wxICON_QUESTION = wxc.wxICON_QUESTION
247 wxICON_INFORMATION = wxc.wxICON_INFORMATION
248 wxICON_STOP = wxc.wxICON_STOP
249 wxICON_ASTERISK = wxc.wxICON_ASTERISK
250 wxICON_MASK = wxc.wxICON_MASK
251 wxCENTRE = wxc.wxCENTRE
252 wxCENTER = wxc.wxCENTER
253 wxSIZE_AUTO_WIDTH = wxc.wxSIZE_AUTO_WIDTH
254 wxSIZE_AUTO_HEIGHT = wxc.wxSIZE_AUTO_HEIGHT
255 wxSIZE_AUTO = wxc.wxSIZE_AUTO
256 wxSIZE_USE_EXISTING = wxc.wxSIZE_USE_EXISTING
257 wxSIZE_ALLOW_MINUS_ONE = wxc.wxSIZE_ALLOW_MINUS_ONE
258 wxPORTRAIT = wxc.wxPORTRAIT
259 wxLANDSCAPE = wxc.wxLANDSCAPE
260 wxID_OPEN = wxc.wxID_OPEN
261 wxID_CLOSE = wxc.wxID_CLOSE
262 wxID_NEW = wxc.wxID_NEW
263 wxID_SAVE = wxc.wxID_SAVE
264 wxID_SAVEAS = wxc.wxID_SAVEAS
265 wxID_REVERT = wxc.wxID_REVERT
266 wxID_EXIT = wxc.wxID_EXIT
267 wxID_UNDO = wxc.wxID_UNDO
268 wxID_REDO = wxc.wxID_REDO
269 wxID_HELP = wxc.wxID_HELP
270 wxID_PRINT = wxc.wxID_PRINT
271 wxID_PRINT_SETUP = wxc.wxID_PRINT_SETUP
272 wxID_PREVIEW = wxc.wxID_PREVIEW
273 wxID_ABOUT = wxc.wxID_ABOUT
274 wxID_HELP_CONTENTS = wxc.wxID_HELP_CONTENTS
275 wxID_HELP_COMMANDS = wxc.wxID_HELP_COMMANDS
276 wxID_HELP_PROCEDURES = wxc.wxID_HELP_PROCEDURES
277 wxID_HELP_CONTEXT = wxc.wxID_HELP_CONTEXT
278 wxID_CUT = wxc.wxID_CUT
279 wxID_COPY = wxc.wxID_COPY
280 wxID_PASTE = wxc.wxID_PASTE
281 wxID_CLEAR = wxc.wxID_CLEAR
282 wxID_FIND = wxc.wxID_FIND
283 wxID_FILE1 = wxc.wxID_FILE1
284 wxID_FILE2 = wxc.wxID_FILE2
285 wxID_FILE3 = wxc.wxID_FILE3
286 wxID_FILE4 = wxc.wxID_FILE4
287 wxID_FILE5 = wxc.wxID_FILE5
288 wxID_FILE6 = wxc.wxID_FILE6
289 wxID_FILE7 = wxc.wxID_FILE7
290 wxID_FILE8 = wxc.wxID_FILE8
291 wxID_FILE9 = wxc.wxID_FILE9
292 wxID_OK = wxc.wxID_OK
293 wxID_CANCEL = wxc.wxID_CANCEL
294 wxID_APPLY = wxc.wxID_APPLY
295 wxID_YES = wxc.wxID_YES
296 wxID_NO = wxc.wxID_NO
297 wxBITMAP_TYPE_BMP = wxc.wxBITMAP_TYPE_BMP
298 wxBITMAP_TYPE_BMP_RESOURCE = wxc.wxBITMAP_TYPE_BMP_RESOURCE
299 wxBITMAP_TYPE_ICO = wxc.wxBITMAP_TYPE_ICO
300 wxBITMAP_TYPE_ICO_RESOURCE = wxc.wxBITMAP_TYPE_ICO_RESOURCE
301 wxBITMAP_TYPE_CUR = wxc.wxBITMAP_TYPE_CUR
302 wxBITMAP_TYPE_CUR_RESOURCE = wxc.wxBITMAP_TYPE_CUR_RESOURCE
303 wxBITMAP_TYPE_XBM = wxc.wxBITMAP_TYPE_XBM
304 wxBITMAP_TYPE_XBM_DATA = wxc.wxBITMAP_TYPE_XBM_DATA
305 wxBITMAP_TYPE_XPM = wxc.wxBITMAP_TYPE_XPM
306 wxBITMAP_TYPE_XPM_DATA = wxc.wxBITMAP_TYPE_XPM_DATA
307 wxBITMAP_TYPE_TIF = wxc.wxBITMAP_TYPE_TIF
308 wxBITMAP_TYPE_TIF_RESOURCE = wxc.wxBITMAP_TYPE_TIF_RESOURCE
309 wxBITMAP_TYPE_GIF = wxc.wxBITMAP_TYPE_GIF
310 wxBITMAP_TYPE_GIF_RESOURCE = wxc.wxBITMAP_TYPE_GIF_RESOURCE
311 wxBITMAP_TYPE_PNG = wxc.wxBITMAP_TYPE_PNG
312 wxBITMAP_TYPE_PNG_RESOURCE = wxc.wxBITMAP_TYPE_PNG_RESOURCE
313 wxBITMAP_TYPE_ANY = wxc.wxBITMAP_TYPE_ANY
314 wxBITMAP_TYPE_RESOURCE = wxc.wxBITMAP_TYPE_RESOURCE
315 wxOPEN = wxc.wxOPEN
316 wxSAVE = wxc.wxSAVE
317 wxHIDE_READONLY = wxc.wxHIDE_READONLY
318 wxOVERWRITE_PROMPT = wxc.wxOVERWRITE_PROMPT
319 wxACCEL_ALT = wxc.wxACCEL_ALT
320 wxACCEL_CTRL = wxc.wxACCEL_CTRL
321 wxACCEL_SHIFT = wxc.wxACCEL_SHIFT
322 ERR_PARAM = wxc.ERR_PARAM
323 ERR_NODATA = wxc.ERR_NODATA
324 ERR_CANCEL = wxc.ERR_CANCEL
325 ERR_SUCCESS = wxc.ERR_SUCCESS
326 wxDEFAULT = wxc.wxDEFAULT
327 wxDECORATIVE = wxc.wxDECORATIVE
328 wxROMAN = wxc.wxROMAN
329 wxSCRIPT = wxc.wxSCRIPT
330 wxSWISS = wxc.wxSWISS
331 wxMODERN = wxc.wxMODERN
332 wxTELETYPE = wxc.wxTELETYPE
333 wxVARIABLE = wxc.wxVARIABLE
334 wxFIXED = wxc.wxFIXED
335 wxNORMAL = wxc.wxNORMAL
336 wxLIGHT = wxc.wxLIGHT
337 wxBOLD = wxc.wxBOLD
338 wxITALIC = wxc.wxITALIC
339 wxSLANT = wxc.wxSLANT
340 wxSOLID = wxc.wxSOLID
341 wxDOT = wxc.wxDOT
342 wxLONG_DASH = wxc.wxLONG_DASH
343 wxSHORT_DASH = wxc.wxSHORT_DASH
344 wxDOT_DASH = wxc.wxDOT_DASH
345 wxUSER_DASH = wxc.wxUSER_DASH
346 wxTRANSPARENT = wxc.wxTRANSPARENT
347 wxSTIPPLE = wxc.wxSTIPPLE
348 wxBDIAGONAL_HATCH = wxc.wxBDIAGONAL_HATCH
349 wxCROSSDIAG_HATCH = wxc.wxCROSSDIAG_HATCH
350 wxFDIAGONAL_HATCH = wxc.wxFDIAGONAL_HATCH
351 wxCROSS_HATCH = wxc.wxCROSS_HATCH
352 wxHORIZONTAL_HATCH = wxc.wxHORIZONTAL_HATCH
353 wxVERTICAL_HATCH = wxc.wxVERTICAL_HATCH
354 wxJOIN_BEVEL = wxc.wxJOIN_BEVEL
355 wxJOIN_MITER = wxc.wxJOIN_MITER
356 wxJOIN_ROUND = wxc.wxJOIN_ROUND
357 wxCAP_ROUND = wxc.wxCAP_ROUND
358 wxCAP_PROJECTING = wxc.wxCAP_PROJECTING
359 wxCAP_BUTT = wxc.wxCAP_BUTT
360 wxCLEAR = wxc.wxCLEAR
361 wxXOR = wxc.wxXOR
362 wxINVERT = wxc.wxINVERT
363 wxOR_REVERSE = wxc.wxOR_REVERSE
364 wxAND_REVERSE = wxc.wxAND_REVERSE
365 wxCOPY = wxc.wxCOPY
366 wxAND = wxc.wxAND
367 wxAND_INVERT = wxc.wxAND_INVERT
368 wxNO_OP = wxc.wxNO_OP
369 wxNOR = wxc.wxNOR
370 wxEQUIV = wxc.wxEQUIV
371 wxSRC_INVERT = wxc.wxSRC_INVERT
372 wxOR_INVERT = wxc.wxOR_INVERT
373 wxNAND = wxc.wxNAND
374 wxOR = wxc.wxOR
375 wxSET = wxc.wxSET
376 wxSRC_OR = wxc.wxSRC_OR
377 wxSRC_AND = wxc.wxSRC_AND
378 WXK_BACK = wxc.WXK_BACK
379 WXK_TAB = wxc.WXK_TAB
380 WXK_RETURN = wxc.WXK_RETURN
381 WXK_ESCAPE = wxc.WXK_ESCAPE
382 WXK_SPACE = wxc.WXK_SPACE
383 WXK_DELETE = wxc.WXK_DELETE
384 WXK_START = wxc.WXK_START
385 WXK_LBUTTON = wxc.WXK_LBUTTON
386 WXK_RBUTTON = wxc.WXK_RBUTTON
387 WXK_CANCEL = wxc.WXK_CANCEL
388 WXK_MBUTTON = wxc.WXK_MBUTTON
389 WXK_CLEAR = wxc.WXK_CLEAR
390 WXK_SHIFT = wxc.WXK_SHIFT
391 WXK_CONTROL = wxc.WXK_CONTROL
392 WXK_MENU = wxc.WXK_MENU
393 WXK_PAUSE = wxc.WXK_PAUSE
394 WXK_CAPITAL = wxc.WXK_CAPITAL
395 WXK_PRIOR = wxc.WXK_PRIOR
396 WXK_NEXT = wxc.WXK_NEXT
397 WXK_END = wxc.WXK_END
398 WXK_HOME = wxc.WXK_HOME
399 WXK_LEFT = wxc.WXK_LEFT
400 WXK_UP = wxc.WXK_UP
401 WXK_RIGHT = wxc.WXK_RIGHT
402 WXK_DOWN = wxc.WXK_DOWN
403 WXK_SELECT = wxc.WXK_SELECT
404 WXK_PRINT = wxc.WXK_PRINT
405 WXK_EXECUTE = wxc.WXK_EXECUTE
406 WXK_SNAPSHOT = wxc.WXK_SNAPSHOT
407 WXK_INSERT = wxc.WXK_INSERT
408 WXK_HELP = wxc.WXK_HELP
409 WXK_NUMPAD0 = wxc.WXK_NUMPAD0
410 WXK_NUMPAD1 = wxc.WXK_NUMPAD1
411 WXK_NUMPAD2 = wxc.WXK_NUMPAD2
412 WXK_NUMPAD3 = wxc.WXK_NUMPAD3
413 WXK_NUMPAD4 = wxc.WXK_NUMPAD4
414 WXK_NUMPAD5 = wxc.WXK_NUMPAD5
415 WXK_NUMPAD6 = wxc.WXK_NUMPAD6
416 WXK_NUMPAD7 = wxc.WXK_NUMPAD7
417 WXK_NUMPAD8 = wxc.WXK_NUMPAD8
418 WXK_NUMPAD9 = wxc.WXK_NUMPAD9
419 WXK_MULTIPLY = wxc.WXK_MULTIPLY
420 WXK_ADD = wxc.WXK_ADD
421 WXK_SEPARATOR = wxc.WXK_SEPARATOR
422 WXK_SUBTRACT = wxc.WXK_SUBTRACT
423 WXK_DECIMAL = wxc.WXK_DECIMAL
424 WXK_DIVIDE = wxc.WXK_DIVIDE
425 WXK_F1 = wxc.WXK_F1
426 WXK_F2 = wxc.WXK_F2
427 WXK_F3 = wxc.WXK_F3
428 WXK_F4 = wxc.WXK_F4
429 WXK_F5 = wxc.WXK_F5
430 WXK_F6 = wxc.WXK_F6
431 WXK_F7 = wxc.WXK_F7
432 WXK_F8 = wxc.WXK_F8
433 WXK_F9 = wxc.WXK_F9
434 WXK_F10 = wxc.WXK_F10
435 WXK_F11 = wxc.WXK_F11
436 WXK_F12 = wxc.WXK_F12
437 WXK_F13 = wxc.WXK_F13
438 WXK_F14 = wxc.WXK_F14
439 WXK_F15 = wxc.WXK_F15
440 WXK_F16 = wxc.WXK_F16
441 WXK_F17 = wxc.WXK_F17
442 WXK_F18 = wxc.WXK_F18
443 WXK_F19 = wxc.WXK_F19
444 WXK_F20 = wxc.WXK_F20
445 WXK_F21 = wxc.WXK_F21
446 WXK_F22 = wxc.WXK_F22
447 WXK_F23 = wxc.WXK_F23
448 WXK_F24 = wxc.WXK_F24
449 WXK_NUMLOCK = wxc.WXK_NUMLOCK
450 WXK_SCROLL = wxc.WXK_SCROLL
451 WXK_PAGEUP = wxc.WXK_PAGEUP
452 WXK_PAGEDOWN = wxc.WXK_PAGEDOWN
453 wxCURSOR_NONE = wxc.wxCURSOR_NONE
454 wxCURSOR_ARROW = wxc.wxCURSOR_ARROW
455 wxCURSOR_BULLSEYE = wxc.wxCURSOR_BULLSEYE
456 wxCURSOR_CHAR = wxc.wxCURSOR_CHAR
457 wxCURSOR_CROSS = wxc.wxCURSOR_CROSS
458 wxCURSOR_HAND = wxc.wxCURSOR_HAND
459 wxCURSOR_IBEAM = wxc.wxCURSOR_IBEAM
460 wxCURSOR_LEFT_BUTTON = wxc.wxCURSOR_LEFT_BUTTON
461 wxCURSOR_MAGNIFIER = wxc.wxCURSOR_MAGNIFIER
462 wxCURSOR_MIDDLE_BUTTON = wxc.wxCURSOR_MIDDLE_BUTTON
463 wxCURSOR_NO_ENTRY = wxc.wxCURSOR_NO_ENTRY
464 wxCURSOR_PAINT_BRUSH = wxc.wxCURSOR_PAINT_BRUSH
465 wxCURSOR_PENCIL = wxc.wxCURSOR_PENCIL
466 wxCURSOR_POINT_LEFT = wxc.wxCURSOR_POINT_LEFT
467 wxCURSOR_POINT_RIGHT = wxc.wxCURSOR_POINT_RIGHT
468 wxCURSOR_QUESTION_ARROW = wxc.wxCURSOR_QUESTION_ARROW
469 wxCURSOR_RIGHT_BUTTON = wxc.wxCURSOR_RIGHT_BUTTON
470 wxCURSOR_SIZENESW = wxc.wxCURSOR_SIZENESW
471 wxCURSOR_SIZENS = wxc.wxCURSOR_SIZENS
472 wxCURSOR_SIZENWSE = wxc.wxCURSOR_SIZENWSE
473 wxCURSOR_SIZEWE = wxc.wxCURSOR_SIZEWE
474 wxCURSOR_SIZING = wxc.wxCURSOR_SIZING
475 wxCURSOR_SPRAYCAN = wxc.wxCURSOR_SPRAYCAN
476 wxCURSOR_WAIT = wxc.wxCURSOR_WAIT
477 wxCURSOR_WATCH = wxc.wxCURSOR_WATCH
478 wxCURSOR_BLANK = wxc.wxCURSOR_BLANK
479 FALSE = wxc.FALSE
480 false = wxc.false
481 TRUE = wxc.TRUE
482 true = wxc.true
483 wxEVT_NULL = wxc.wxEVT_NULL
484 wxEVT_FIRST = wxc.wxEVT_FIRST
485 wxEVT_COMMAND_BUTTON_CLICKED = wxc.wxEVT_COMMAND_BUTTON_CLICKED
486 wxEVT_COMMAND_CHECKBOX_CLICKED = wxc.wxEVT_COMMAND_CHECKBOX_CLICKED
487 wxEVT_COMMAND_CHOICE_SELECTED = wxc.wxEVT_COMMAND_CHOICE_SELECTED
488 wxEVT_COMMAND_LISTBOX_SELECTED = wxc.wxEVT_COMMAND_LISTBOX_SELECTED
489 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
490 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
491 wxEVT_COMMAND_TEXT_UPDATED = wxc.wxEVT_COMMAND_TEXT_UPDATED
492 wxEVT_COMMAND_TEXT_ENTER = wxc.wxEVT_COMMAND_TEXT_ENTER
493 wxEVT_COMMAND_MENU_SELECTED = wxc.wxEVT_COMMAND_MENU_SELECTED
494 wxEVT_COMMAND_SLIDER_UPDATED = wxc.wxEVT_COMMAND_SLIDER_UPDATED
495 wxEVT_COMMAND_RADIOBOX_SELECTED = wxc.wxEVT_COMMAND_RADIOBOX_SELECTED
496 wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxc.wxEVT_COMMAND_RADIOBUTTON_SELECTED
497 wxEVT_COMMAND_SCROLLBAR_UPDATED = wxc.wxEVT_COMMAND_SCROLLBAR_UPDATED
498 wxEVT_COMMAND_VLBOX_SELECTED = wxc.wxEVT_COMMAND_VLBOX_SELECTED
499 wxEVT_COMMAND_COMBOBOX_SELECTED = wxc.wxEVT_COMMAND_COMBOBOX_SELECTED
500 wxEVT_COMMAND_TOOL_CLICKED = wxc.wxEVT_COMMAND_TOOL_CLICKED
501 wxEVT_COMMAND_TOOL_RCLICKED = wxc.wxEVT_COMMAND_TOOL_RCLICKED
502 wxEVT_COMMAND_TOOL_ENTER = wxc.wxEVT_COMMAND_TOOL_ENTER
503 wxEVT_SET_FOCUS = wxc.wxEVT_SET_FOCUS
504 wxEVT_KILL_FOCUS = wxc.wxEVT_KILL_FOCUS
505 wxEVT_LEFT_DOWN = wxc.wxEVT_LEFT_DOWN
506 wxEVT_LEFT_UP = wxc.wxEVT_LEFT_UP
507 wxEVT_MIDDLE_DOWN = wxc.wxEVT_MIDDLE_DOWN
508 wxEVT_MIDDLE_UP = wxc.wxEVT_MIDDLE_UP
509 wxEVT_RIGHT_DOWN = wxc.wxEVT_RIGHT_DOWN
510 wxEVT_RIGHT_UP = wxc.wxEVT_RIGHT_UP
511 wxEVT_MOTION = wxc.wxEVT_MOTION
512 wxEVT_ENTER_WINDOW = wxc.wxEVT_ENTER_WINDOW
513 wxEVT_LEAVE_WINDOW = wxc.wxEVT_LEAVE_WINDOW
514 wxEVT_LEFT_DCLICK = wxc.wxEVT_LEFT_DCLICK
515 wxEVT_MIDDLE_DCLICK = wxc.wxEVT_MIDDLE_DCLICK
516 wxEVT_RIGHT_DCLICK = wxc.wxEVT_RIGHT_DCLICK
517 wxEVT_NC_LEFT_DOWN = wxc.wxEVT_NC_LEFT_DOWN
518 wxEVT_NC_LEFT_UP = wxc.wxEVT_NC_LEFT_UP
519 wxEVT_NC_MIDDLE_DOWN = wxc.wxEVT_NC_MIDDLE_DOWN
520 wxEVT_NC_MIDDLE_UP = wxc.wxEVT_NC_MIDDLE_UP
521 wxEVT_NC_RIGHT_DOWN = wxc.wxEVT_NC_RIGHT_DOWN
522 wxEVT_NC_RIGHT_UP = wxc.wxEVT_NC_RIGHT_UP
523 wxEVT_NC_MOTION = wxc.wxEVT_NC_MOTION
524 wxEVT_NC_ENTER_WINDOW = wxc.wxEVT_NC_ENTER_WINDOW
525 wxEVT_NC_LEAVE_WINDOW = wxc.wxEVT_NC_LEAVE_WINDOW
526 wxEVT_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK
527 wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK
528 wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK
529 wxEVT_CHAR = wxc.wxEVT_CHAR
530 wxEVT_SCROLL_TOP = wxc.wxEVT_SCROLL_TOP
531 wxEVT_SCROLL_BOTTOM = wxc.wxEVT_SCROLL_BOTTOM
532 wxEVT_SCROLL_LINEUP = wxc.wxEVT_SCROLL_LINEUP
533 wxEVT_SCROLL_LINEDOWN = wxc.wxEVT_SCROLL_LINEDOWN
534 wxEVT_SCROLL_PAGEUP = wxc.wxEVT_SCROLL_PAGEUP
535 wxEVT_SCROLL_PAGEDOWN = wxc.wxEVT_SCROLL_PAGEDOWN
536 wxEVT_SCROLL_THUMBTRACK = wxc.wxEVT_SCROLL_THUMBTRACK
537 wxEVT_SIZE = wxc.wxEVT_SIZE
538 wxEVT_MOVE = wxc.wxEVT_MOVE
539 wxEVT_CLOSE_WINDOW = wxc.wxEVT_CLOSE_WINDOW
540 wxEVT_END_SESSION = wxc.wxEVT_END_SESSION
541 wxEVT_QUERY_END_SESSION = wxc.wxEVT_QUERY_END_SESSION
542 wxEVT_ACTIVATE_APP = wxc.wxEVT_ACTIVATE_APP
543 wxEVT_POWER = wxc.wxEVT_POWER
544 wxEVT_CHAR_HOOK = wxc.wxEVT_CHAR_HOOK
545 wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
546 wxEVT_ACTIVATE = wxc.wxEVT_ACTIVATE
547 wxEVT_CREATE = wxc.wxEVT_CREATE
548 wxEVT_DESTROY = wxc.wxEVT_DESTROY
549 wxEVT_SHOW = wxc.wxEVT_SHOW
550 wxEVT_ICONIZE = wxc.wxEVT_ICONIZE
551 wxEVT_MAXIMIZE = wxc.wxEVT_MAXIMIZE
552 wxEVT_MOUSE_CAPTURE_CHANGED = wxc.wxEVT_MOUSE_CAPTURE_CHANGED
553 wxEVT_PAINT = wxc.wxEVT_PAINT
554 wxEVT_ERASE_BACKGROUND = wxc.wxEVT_ERASE_BACKGROUND
555 wxEVT_NC_PAINT = wxc.wxEVT_NC_PAINT
556 wxEVT_PAINT_ICON = wxc.wxEVT_PAINT_ICON
557 wxEVT_MENU_CHAR = wxc.wxEVT_MENU_CHAR
558 wxEVT_MENU_INIT = wxc.wxEVT_MENU_INIT
559 wxEVT_MENU_HIGHLIGHT = wxc.wxEVT_MENU_HIGHLIGHT
560 wxEVT_POPUP_MENU_INIT = wxc.wxEVT_POPUP_MENU_INIT
561 wxEVT_CONTEXT_MENU = wxc.wxEVT_CONTEXT_MENU
562 wxEVT_SYS_COLOUR_CHANGED = wxc.wxEVT_SYS_COLOUR_CHANGED
563 wxEVT_SETTING_CHANGED = wxc.wxEVT_SETTING_CHANGED
564 wxEVT_QUERY_NEW_PALETTE = wxc.wxEVT_QUERY_NEW_PALETTE
565 wxEVT_PALETTE_CHANGED = wxc.wxEVT_PALETTE_CHANGED
566 wxEVT_JOY_BUTTON_DOWN = wxc.wxEVT_JOY_BUTTON_DOWN
567 wxEVT_JOY_BUTTON_UP = wxc.wxEVT_JOY_BUTTON_UP
568 wxEVT_JOY_MOVE = wxc.wxEVT_JOY_MOVE
569 wxEVT_JOY_ZMOVE = wxc.wxEVT_JOY_ZMOVE
570 wxEVT_DROP_FILES = wxc.wxEVT_DROP_FILES
571 wxEVT_DRAW_ITEM = wxc.wxEVT_DRAW_ITEM
572 wxEVT_MEASURE_ITEM = wxc.wxEVT_MEASURE_ITEM
573 wxEVT_COMPARE_ITEM = wxc.wxEVT_COMPARE_ITEM
574 wxEVT_INIT_DIALOG = wxc.wxEVT_INIT_DIALOG
575 wxEVT_IDLE = wxc.wxEVT_IDLE
576 wxEVT_UPDATE_UI = wxc.wxEVT_UPDATE_UI
577 wxEVT_COMMAND_LEFT_CLICK = wxc.wxEVT_COMMAND_LEFT_CLICK
578 wxEVT_COMMAND_LEFT_DCLICK = wxc.wxEVT_COMMAND_LEFT_DCLICK
579 wxEVT_COMMAND_RIGHT_CLICK = wxc.wxEVT_COMMAND_RIGHT_CLICK
580 wxEVT_COMMAND_RIGHT_DCLICK = wxc.wxEVT_COMMAND_RIGHT_DCLICK
581 wxEVT_COMMAND_SET_FOCUS = wxc.wxEVT_COMMAND_SET_FOCUS
582 wxEVT_COMMAND_KILL_FOCUS = wxc.wxEVT_COMMAND_KILL_FOCUS
583 wxEVT_COMMAND_ENTER = wxc.wxEVT_COMMAND_ENTER
584 wxEVT_COMMAND_TREE_BEGIN_DRAG = wxc.wxEVT_COMMAND_TREE_BEGIN_DRAG
585 wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxc.wxEVT_COMMAND_TREE_BEGIN_RDRAG
586 wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT
587 wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxc.wxEVT_COMMAND_TREE_END_LABEL_EDIT
588 wxEVT_COMMAND_TREE_DELETE_ITEM = wxc.wxEVT_COMMAND_TREE_DELETE_ITEM
589 wxEVT_COMMAND_TREE_GET_INFO = wxc.wxEVT_COMMAND_TREE_GET_INFO
590 wxEVT_COMMAND_TREE_SET_INFO = wxc.wxEVT_COMMAND_TREE_SET_INFO
591 wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxc.wxEVT_COMMAND_TREE_ITEM_EXPANDED
592 wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxc.wxEVT_COMMAND_TREE_ITEM_EXPANDING
593 wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxc.wxEVT_COMMAND_TREE_ITEM_COLLAPSED
594 wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxc.wxEVT_COMMAND_TREE_ITEM_COLLAPSING
595 wxEVT_COMMAND_TREE_SEL_CHANGED = wxc.wxEVT_COMMAND_TREE_SEL_CHANGED
596 wxEVT_COMMAND_TREE_SEL_CHANGING = wxc.wxEVT_COMMAND_TREE_SEL_CHANGING
597 wxEVT_COMMAND_TREE_KEY_DOWN = wxc.wxEVT_COMMAND_TREE_KEY_DOWN
598 wxEVT_COMMAND_LIST_BEGIN_DRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_DRAG
599 wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxc.wxEVT_COMMAND_LIST_BEGIN_RDRAG
600 wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
601 wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxc.wxEVT_COMMAND_LIST_END_LABEL_EDIT
602 wxEVT_COMMAND_LIST_DELETE_ITEM = wxc.wxEVT_COMMAND_LIST_DELETE_ITEM
603 wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
604 wxEVT_COMMAND_LIST_GET_INFO = wxc.wxEVT_COMMAND_LIST_GET_INFO
605 wxEVT_COMMAND_LIST_SET_INFO = wxc.wxEVT_COMMAND_LIST_SET_INFO
606 wxEVT_COMMAND_LIST_ITEM_SELECTED = wxc.wxEVT_COMMAND_LIST_ITEM_SELECTED
607 wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxc.wxEVT_COMMAND_LIST_ITEM_DESELECTED
608 wxEVT_COMMAND_LIST_KEY_DOWN = wxc.wxEVT_COMMAND_LIST_KEY_DOWN
609 wxEVT_COMMAND_LIST_INSERT_ITEM = wxc.wxEVT_COMMAND_LIST_INSERT_ITEM
610 wxEVT_COMMAND_LIST_COL_CLICK = wxc.wxEVT_COMMAND_LIST_COL_CLICK
611 wxEVT_COMMAND_TAB_SEL_CHANGED = wxc.wxEVT_COMMAND_TAB_SEL_CHANGED
612 wxEVT_COMMAND_TAB_SEL_CHANGING = wxc.wxEVT_COMMAND_TAB_SEL_CHANGING
613 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
614 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
615 __version__ = wxc.__version__
616 cvar = wxc.cvar
617 wxPyDefaultPosition = wxPointPtr(wxc.cvar.wxPyDefaultPosition)
618 wxPyDefaultSize = wxSizePtr(wxc.cvar.wxPyDefaultSize)
619
620
621 #-------------- USER INCLUDE -----------------------
622
623 #----------------------------------------------------------------------------
624 # Name: _extra.py
625 # Purpose: This file is appended to the shadow class file generated
626 # by SWIG. We add some unSWIGable things here.
627 #
628 # Author: Robin Dunn
629 #
630 # Created: 6/30/97
631 # RCS-ID: $Id$
632 # Copyright: (c) 1998 by Total Control Software
633 # Licence: wxWindows license
634 #----------------------------------------------------------------------------
635
636 import sys
637
638 #----------------------------------------------------------------------
639 # This gives this module's dictionary to the C++ extension code...
640
641 _wxSetDictionary(vars())
642
643
644 #----------------------------------------------------------------------
645 #----------------------------------------------------------------------
646 # Helper function to link python methods to wxWindows virtual
647 # functions by name.
648
649 def _checkForCallback(obj, name, event, theID=-1):
650 try: cb = getattr(obj, name)
651 except: pass
652 else: obj.Connect(theID, -1, event, cb)
653
654 def _StdWindowCallbacks(win):
655 _checkForCallback(win, "OnChar", wxEVT_CHAR)
656 _checkForCallback(win, "OnSize", wxEVT_SIZE)
657 _checkForCallback(win, "OnEraseBackground", wxEVT_ERASE_BACKGROUND)
658 _checkForCallback(win, "OnSysColourChanged", wxEVT_SYS_COLOUR_CHANGED)
659 _checkForCallback(win, "OnInitDialog", wxEVT_INIT_DIALOG)
660 _checkForCallback(win, "OnIdle", wxEVT_IDLE)
661 _checkForCallback(win, "OnPaint", wxEVT_PAINT)
662
663 def _StdFrameCallbacks(win):
664 _StdWindowCallbacks(win)
665 _checkForCallback(win, "OnActivate", wxEVT_ACTIVATE)
666 _checkForCallback(win, "OnMenuHighlight", wxEVT_MENU_HIGHLIGHT)
667 _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
668
669
670 def _StdDialogCallbacks(win):
671 _StdWindowCallbacks(win)
672 _checkForCallback(win, "OnOk", wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK)
673 _checkForCallback(win, "OnApply", wxEVT_COMMAND_BUTTON_CLICKED, wxID_APPLY)
674 _checkForCallback(win, "OnCancel", wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL)
675 _checkForCallback(win, "OnCloseWindow", wxEVT_CLOSE_WINDOW)
676 _checkForCallback(win, "OnCharHook", wxEVT_CHAR_HOOK)
677
678
679 def _StdOnScrollCallback(win):
680 try: cb = getattr(win, "OnScroll")
681 except: pass
682 else: EVT_SCROLL(win, cb)
683
684
685
686 #----------------------------------------------------------------------
687 #----------------------------------------------------------------------
688 # functions that look and act like the C++ Macros of the same name
689
690
691 # Miscellaneous
692 def EVT_SIZE(win, func):
693 win.Connect(-1, -1, wxEVT_SIZE, func)
694
695 def EVT_MOVE(win, func):
696 win.Connect(-1, -1, wxEVT_MOVE, func)
697
698 def EVT_CLOSE(win, func):
699 win.Connect(-1, -1, wxEVT_CLOSE_WINDOW, func)
700
701 def EVT_PAINT(win, func):
702 win.Connect(-1, -1, wxEVT_PAINT, func)
703
704 def EVT_ERASE_BACKGROUND(win, func):
705 win.Connect(-1, -1, wxEVT_ERASE_BACKGROUND, func)
706
707 def EVT_CHAR(win, func):
708 win.Connect(-1, -1, wxEVT_CHAR, func)
709
710 def EVT_CHAR_HOOK(win, func):
711 win.Connect(-1, -1, wxEVT_CHAR_HOOK, func)
712
713 def EVT_MENU_HIGHLIGHT(win, id, func):
714 win.Connect(id, -1, wxEVT_MENU_HIGHLIGHT, func)
715
716 def EVT_MENU_HIGHLIGHT_ALL(win, func):
717 win.Connect(-1, -1, wxEVT_MENU_HIGHLIGHT, func)
718
719 def EVT_SET_FOCUS(win, func):
720 win.Connect(-1, -1, wxEVT_SET_FOCUS, func)
721
722 def EVT_KILL_FOCUS(win, func):
723 win.Connect(-1, -1, wxEVT_KILL_FOCUS, func)
724
725 def EVT_ACTIVATE(win, func):
726 win.Connect(-1, -1, wxEVT_ACTIVATE, func)
727
728 def EVT_ACTIVATE_APP(win, func):
729 win.Connect(-1, -1, wxEVT_ACTIVATE_APP, func)
730
731 def EVT_END_SESSION(win, func):
732 win.Connect(-1, -1, wxEVT_END_SESSION, func)
733
734 def EVT_QUERY_END_SESSION(win, func):
735 win.Connect(-1, -1, wxEVT_QUERY_END_SESSION, func)
736
737 def EVT_DROP_FILES(win, func):
738 win.Connect(-1, -1, wxEVT_DROP_FILES, func)
739
740 def EVT_INIT_DIALOG(win, func):
741 win.Connect(-1, -1, wxEVT_INIT_DIALOG, func)
742
743 def EVT_SYS_COLOUR_CHANGED(win, func):
744 win.Connect(-1, -1, wxEVT_SYS_COLOUR_CHANGED, func)
745
746 def EVT_SHOW(win, func):
747 win.Connect(-1, -1, wxEVT_SHOW, func)
748
749 def EVT_MAXIMIZE(win, func):
750 win.Connect(-1, -1, wxEVT_MAXIMIZE, func)
751
752 def EVT_ICONIZE(win, func):
753 win.Connect(-1, -1, wxEVT_ICONIZE, func)
754
755 def EVT_NAVIGATION_KEY(win, func):
756 win.Connect(-1, -1, wxEVT_NAVIGATION_KEY, func)
757
758
759 # Mouse Events
760 def EVT_LEFT_DOWN(win, func):
761 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
762
763 def EVT_LEFT_UP(win, func):
764 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
765
766 def EVT_MIDDLE_DOWN(win, func):
767 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
768
769 def EVT_MIDDLE_UP(win, func):
770 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
771
772 def EVT_RIGHT_DOWN(win, func):
773 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
774
775 def EVT_RIGHT_UP(win, func):
776 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
777
778 def EVT_MOTION(win, func):
779 win.Connect(-1, -1, wxEVT_MOTION, func)
780
781 def EVT_LEFT_DCLICK(win, func):
782 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
783
784 def EVT_MIDDLE_DCLICK(win, func):
785 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
786
787 def EVT_RIGHT_DCLICK(win, func):
788 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
789
790 def EVT_LEAVE_WINDOW(win, func):
791 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
792
793 def EVT_ENTER_WINDOW(win, func):
794 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
795
796
797 # all mouse events
798 def EVT_MOUSE_EVENTS(win, func):
799 win.Connect(-1, -1, wxEVT_LEFT_DOWN, func)
800 win.Connect(-1, -1, wxEVT_LEFT_UP, func)
801 win.Connect(-1, -1, wxEVT_MIDDLE_DOWN, func)
802 win.Connect(-1, -1, wxEVT_MIDDLE_UP, func)
803 win.Connect(-1, -1, wxEVT_RIGHT_DOWN, func)
804 win.Connect(-1, -1, wxEVT_RIGHT_UP, func)
805 win.Connect(-1, -1, wxEVT_MOTION, func)
806 win.Connect(-1, -1, wxEVT_LEFT_DCLICK, func)
807 win.Connect(-1, -1, wxEVT_MIDDLE_DCLICK, func)
808 win.Connect(-1, -1, wxEVT_RIGHT_DCLICK, func)
809 win.Connect(-1, -1, wxEVT_LEAVE_WINDOW, func)
810 win.Connect(-1, -1, wxEVT_ENTER_WINDOW, func)
811
812 # EVT_COMMAND
813 def EVT_COMMAND(win, id, cmd, func):
814 win.Connect(id, -1, cmd, func)
815
816 def EVT_COMMAND_RANGE(win, id1, id2, cmd, func):
817 win.Connect(id1, id2, cmd, func)
818
819 # Scrolling
820 def EVT_SCROLL(win, func):
821 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
822 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
823 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
824 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
825 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
826 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
827 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func)
828
829 def EVT_SCROLL_TOP(win, func):
830 win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
831
832 def EVT_SCROLL_BOTTOM(win, func):
833 win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
834
835 def EVT_SCROLL_LINEUP(win, func):
836 win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
837
838 def EVT_SCROLL_LINEDOWN(win, func):
839 win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
840
841 def EVT_SCROLL_PAGEUP(win, func):
842 win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
843
844 def EVT_SCROLL_PAGEDOWN(win, func):
845 win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
846
847 def EVT_SCROLL_THUMBTRACK(win, func):
848 win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func)
849
850
851
852 # Scrolling, with an id
853 def EVT_COMMAND_SCROLL(win, id, func):
854 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
855 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
856 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
857 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
858 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
859 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
860 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
861
862 def EVT_COMMAND_SCROLL_TOP(win, id, func):
863 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
864
865 def EVT_COMMAND_SCROLL_BOTTOM(win, id, func):
866 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
867
868 def EVT_COMMAND_SCROLL_LINEUP(win, id, func):
869 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
870
871 def EVT_COMMAND_SCROLL_LINEDOWN(win, id, func):
872 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
873
874 def EVT_COMMAND_SCROLL_PAGEUP(win, id, func):
875 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
876
877 def EVT_COMMAND_SCROLL_PAGEDOWN(win, id, func):
878 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
879
880 def EVT_COMMAND_SCROLL_THUMBTRACK(win, id, func):
881 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK, func)
882
883
884 # Convenience commands
885 def EVT_BUTTON(win, id, func):
886 win.Connect(id, -1, wxEVT_COMMAND_BUTTON_CLICKED, func)
887
888 def EVT_CHECKBOX(win, id, func):
889 win.Connect(id, -1, wxEVT_COMMAND_CHECKBOX_CLICKED, func)
890
891 def EVT_CHOICE(win, id, func):
892 win.Connect(id, -1, wxEVT_COMMAND_CHOICE_SELECTED, func)
893
894 def EVT_LISTBOX(win, id, func):
895 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_SELECTED, func)
896
897 def EVT_LISTBOX_DCLICK(win, id, func):
898 win.Connect(id, -1, wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, func)
899
900 def EVT_TEXT(win, id, func):
901 win.Connect(id, -1, wxEVT_COMMAND_TEXT_UPDATED, func)
902
903 def EVT_TEXT_ENTER(win, id, func):
904 win.Connect(id, -1, wxEVT_COMMAND_TEXT_ENTER, func)
905
906 def EVT_MENU(win, id, func):
907 win.Connect(id, -1, wxEVT_COMMAND_MENU_SELECTED, func)
908
909 def EVT_MENU_RANGE(win, id1, id2, func):
910 win.Connect(id1, id2, wxEVT_COMMAND_MENU_SELECTED, func)
911
912 def EVT_SLIDER(win, id, func):
913 win.Connect(id, -1, wxEVT_COMMAND_SLIDER_UPDATED, func)
914
915 def EVT_RADIOBOX(win, id, func):
916 win.Connect(id, -1, wxEVT_COMMAND_RADIOBOX_SELECTED, func)
917
918 def EVT_RADIOBUTTON(win, id, func):
919 win.Connect(id, -1, wxEVT_COMMAND_RADIOBUTTON_SELECTED, func)
920
921 def EVT_VLBOX(win, id, func):
922 win.Connect(id, -1, wxEVT_COMMAND_VLBOX_SELECTED, func)
923
924 def EVT_COMBOBOX(win, id, func):
925 win.Connect(id, -1, wxEVT_COMMAND_COMBOBOX_SELECTED, func)
926
927 def EVT_TOOL(win, id, func):
928 win.Connect(id, -1, wxEVT_COMMAND_TOOL_CLICKED, func)
929
930 def EVT_TOOL_RCLICKED(win, id, func):
931 win.Connect(id, -1, wxEVT_COMMAND_TOOL_RCLICKED, func)
932
933 def EVT_TOOL_ENTER(win, id, func):
934 win.Connect(id, -1, wxEVT_COMMAND_TOOL_ENTER, func)
935
936 def EVT_CHECKLISTBOX(win, id, func):
937 win.Connect(id, -1, wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, func)
938
939
940 # Generic command events
941
942 def EVT_COMMAND_LEFT_CLICK(win, id, func):
943 win.Connect(id, -1, wxEVT_COMMAND_LEFT_CLICK, func)
944
945 def EVT_COMMAND_LEFT_DCLICK(win, id, func):
946 win.Connect(id, -1, wxEVT_COMMAND_LEFT_DCLICK, func)
947
948 def EVT_COMMAND_RIGHT_CLICK(win, id, func):
949 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_CLICK, func)
950
951 def EVT_COMMAND_RIGHT_DCLICK(win, id, func):
952 win.Connect(id, -1, wxEVT_COMMAND_RIGHT_DCLICK, func)
953
954 def EVT_COMMAND_SET_FOCUS(win, id, func):
955 win.Connect(id, -1, wxEVT_COMMAND_SET_FOCUS, func)
956
957 def EVT_COMMAND_KILL_FOCUS(win, id, func):
958 win.Connect(id, -1, wxEVT_COMMAND_KILL_FOCUS, func)
959
960 def EVT_COMMAND_ENTER(win, id, func):
961 win.Connect(id, -1, wxEVT_COMMAND_ENTER, func)
962
963
964 # wxNotebook events
965 def EVT_NOTEBOOK_PAGE_CHANGED(win, id, func):
966 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, func)
967
968 def EVT_NOTEBOOK_PAGE_CHANGING(win, id, func):
969 win.Connect(id, -1, wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, func)
970
971
972 # wxTreeCtrl events
973 def EVT_TREE_BEGIN_DRAG(win, id, func):
974 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_DRAG, func)
975
976 def EVT_TREE_BEGIN_RDRAG(win, id, func):
977 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_RDRAG, func)
978
979 def EVT_TREE_BEGIN_LABEL_EDIT(win, id, func):
980 win.Connect(id, -1, wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, func)
981
982 def EVT_TREE_END_LABEL_EDIT(win, id, func):
983 win.Connect(id, -1, wxEVT_COMMAND_TREE_END_LABEL_EDIT, func)
984
985 def EVT_TREE_GET_INFO(win, id, func):
986 win.Connect(id, -1, wxEVT_COMMAND_TREE_GET_INFO, func)
987
988 def EVT_TREE_SET_INFO(win, id, func):
989 win.Connect(id, -1, wxEVT_COMMAND_TREE_SET_INFO, func)
990
991 def EVT_TREE_ITEM_EXPANDED(win, id, func):
992 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDED, func)
993
994 def EVT_TREE_ITEM_EXPANDING(win, id, func):
995 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_EXPANDING, func)
996
997 def EVT_TREE_ITEM_COLLAPSED(win, id, func):
998 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSED, func)
999
1000 def EVT_TREE_ITEM_COLLAPSING(win, id, func):
1001 win.Connect(id, -1, wxEVT_COMMAND_TREE_ITEM_COLLAPSING, func)
1002
1003 def EVT_TREE_SEL_CHANGED(win, id, func):
1004 win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGED, func)
1005
1006 def EVT_TREE_SEL_CHANGING(win, id, func):
1007 win.Connect(id, -1, wxEVT_COMMAND_TREE_SEL_CHANGING, func)
1008
1009 def EVT_TREE_KEY_DOWN(win, id, func):
1010 win.Connect(id, -1, wxEVT_COMMAND_TREE_KEY_DOWN, func)
1011
1012 def EVT_TREE_DELETE_ITEM(win, id, func):
1013 win.Connect(id, -1, wxEVT_COMMAND_TREE_DELETE_ITEM, func)
1014
1015
1016 # wxSpinButton
1017 def EVT_SPIN_UP(win, id, func):
1018 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
1019
1020 def EVT_SPIN_DOWN(win, id, func):
1021 win.Connect(id, -1,wxEVT_SCROLL_LINEDOWN, func)
1022
1023 def EVT_SPIN(win, id, func):
1024 win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
1025 win.Connect(id, -1, wxEVT_SCROLL_BOTTOM, func)
1026 win.Connect(id, -1, wxEVT_SCROLL_LINEUP, func)
1027 win.Connect(id, -1, wxEVT_SCROLL_LINEDOWN, func)
1028 win.Connect(id, -1, wxEVT_SCROLL_PAGEUP, func)
1029 win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
1030 win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
1031
1032
1033
1034
1035 # wxTaskBarIcon
1036 def EVT_TASKBAR_MOVE(win, func):
1037 win.Connect(-1, -1, wxEVT_TASKBAR_MOVE, func)
1038
1039 def EVT_TASKBAR_LEFT_DOWN(win, func):
1040 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DOWN, func)
1041
1042 def EVT_TASKBAR_LEFT_UP(win, func):
1043 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_UP, func)
1044
1045 def EVT_TASKBAR_RIGHT_DOWN(win, func):
1046 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DOWN, func)
1047
1048 def EVT_TASKBAR_RIGHT_UP(win, func):
1049 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_UP, func)
1050
1051 def EVT_TASKBAR_LEFT_DCLICK(win, func):
1052 win.Connect(-1, -1, wxEVT_TASKBAR_LEFT_DCLICK, func)
1053
1054 def EVT_TASKBAR_RIGHT_DCLICK(win, func):
1055 win.Connect(-1, -1, wxEVT_TASKBAR_RIGHT_DCLICK, func)
1056
1057
1058 # wxGrid
1059 def EVT_GRID_SELECT_CELL(win, fn):
1060 win.Connect(-1, -1, wxEVT_GRID_SELECT_CELL, fn)
1061
1062 def EVT_GRID_CREATE_CELL(win, fn):
1063 win.Connect(-1, -1, wxEVT_GRID_CREATE_CELL, fn)
1064
1065 def EVT_GRID_CHANGE_LABELS(win, fn):
1066 win.Connect(-1, -1, wxEVT_GRID_CHANGE_LABELS, fn)
1067
1068 def EVT_GRID_CHANGE_SEL_LABEL(win, fn):
1069 win.Connect(-1, -1, wxEVT_GRID_CHANGE_SEL_LABEL, fn)
1070
1071 def EVT_GRID_CELL_CHANGE(win, fn):
1072 win.Connect(-1, -1, wxEVT_GRID_CELL_CHANGE, fn)
1073
1074 def EVT_GRID_CELL_LCLICK(win, fn):
1075 win.Connect(-1, -1, wxEVT_GRID_CELL_LCLICK, fn)
1076
1077 def EVT_GRID_CELL_RCLICK(win, fn):
1078 win.Connect(-1, -1, wxEVT_GRID_CELL_RCLICK, fn)
1079
1080 def EVT_GRID_LABEL_LCLICK(win, fn):
1081 win.Connect(-1, -1, wxEVT_GRID_LABEL_LCLICK, fn)
1082
1083 def EVT_GRID_LABEL_RCLICK(win, fn):
1084 win.Connect(-1, -1, wxEVT_GRID_LABEL_RCLICK, fn)
1085
1086
1087 # wxSashWindow
1088 def EVT_SASH_DRAGGED(win, id, func):
1089 win.Connect(id, -1, wxEVT_SASH_DRAGGED, func)
1090
1091 def EVT_SASH_DRAGGED_RANGE(win, id1, id2, func):
1092 win.Connect(id1, id2, wxEVT_SASH_DRAGGED, func)
1093
1094 def EVT_QUERY_LAYOUT_INFO(win, func):
1095 win.Connect(-1, -1, wxEVT_EVT_QUERY_LAYOUT_INFO, func)
1096
1097 def EVT_CALCULATE_LAYOUT(win, func):
1098 win.Connect(-1, -1, wxEVT_EVT_CALCULATE_LAYOUT, func)
1099
1100
1101 # wxListCtrl
1102 def EVT_LIST_BEGIN_DRAG(win, id, func):
1103 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_DRAG, func)
1104
1105 def EVT_LIST_BEGIN_RDRAG(win, id, func):
1106 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_RDRAG, func)
1107
1108 def EVT_LIST_BEGIN_LABEL_EDIT(win, id, func):
1109 win.Connect(id, -1, wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT, func)
1110
1111 def EVT_LIST_END_LABEL_EDIT(win, id, func):
1112 win.Connect(id, -1, wxEVT_COMMAND_LIST_END_LABEL_EDIT, func)
1113
1114 def EVT_LIST_DELETE_ITEM(win, id, func):
1115 win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ITEM, func)
1116
1117 def EVT_LIST_DELETE_ALL_ITEMS(win, id, func):
1118 win.Connect(id, -1, wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, func)
1119
1120 def EVT_LIST_GET_INFO(win, id, func):
1121 win.Connect(id, -1, wxEVT_COMMAND_LIST_GET_INFO, func)
1122
1123 def EVT_LIST_SET_INFO(win, id, func):
1124 win.Connect(id, -1, wxEVT_COMMAND_LIST_SET_INFO, func)
1125
1126 def EVT_LIST_ITEM_SELECTED(win, id, func):
1127 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_SELECTED, func)
1128
1129 def EVT_LIST_ITEM_DESELECTED(win, id, func):
1130 win.Connect(id, -1, wxEVT_COMMAND_LIST_ITEM_DESELECTED, func)
1131
1132 def EVT_LIST_KEY_DOWN(win, id, func):
1133 win.Connect(id, -1, wxEVT_COMMAND_LIST_KEY_DOWN, func)
1134
1135 def EVT_LIST_INSERT_ITEM(win, id, func):
1136 win.Connect(id, -1, wxEVT_COMMAND_LIST_INSERT_ITEM, func)
1137
1138 def EVT_LIST_COL_CLICK(win, id, func):
1139 win.Connect(id, -1, wxEVT_COMMAND_LIST_COL_CLICK, func)
1140
1141
1142 #----------------------------------------------------------------------
1143
1144 class wxTimer(wxPyTimer):
1145 def __init__(self):
1146 wxPyTimer.__init__(self, self.Notify) # derived class must provide
1147 # Notify(self) method.
1148
1149 #----------------------------------------------------------------------
1150 # Some wxWin methods can take "NULL" as parameters, but the shadow classes
1151 # expect an object with the SWIG pointer as a 'this' member. This class
1152 # and instance fools the shadow into passing the NULL pointer.
1153
1154 class NullObj:
1155 this = 'NULL' # SWIG converts this to (void*)0
1156
1157 NULL = NullObj()
1158
1159
1160 #----------------------------------------------------------------------
1161 # aliases
1162
1163 wxColor = wxColour
1164 wxNamedColor = wxNamedColour
1165
1166 wxPyDefaultPosition.Set(-1,-1)
1167 wxPyDefaultSize.Set(-1,-1)
1168
1169 # aliases so that C++ documentation applies:
1170 wxDefaultPosition = wxPyDefaultPosition
1171 wxDefaultSize = wxPyDefaultSize
1172
1173 #----------------------------------------------------------------------
1174
1175 ## class wxPyStdOutWindow(wxFrame):
1176 ## def __init__(self, title = "wxPython: stdout/stderr"):
1177 ## wxFrame.__init__(self, NULL, title)
1178 ## self.title = title
1179 ## self.text = wxTextWindow(self)
1180 ## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD))
1181 ## self.SetSize(-1,-1,400,200)
1182 ## self.Show(false)
1183 ## self.isShown = false
1184
1185 ## def write(self, str): # with this method,
1186 ## if not self.isShown:
1187 ## self.Show(true)
1188 ## self.isShown = true
1189 ## self.text.WriteText(str)
1190
1191 ## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it
1192 ## self.Show(false)
1193 ## self.isShown = false
1194
1195
1196 _defRedirect = (wxPlatform == '__WXMSW__')
1197
1198 #----------------------------------------------------------------------
1199 # The main application class. Derive from this and implement an OnInit
1200 # method that creates a frame and then calls self.SetTopWindow(frame)
1201
1202 class wxApp(wxPyApp):
1203 error = 'wxApp.error'
1204
1205 def __init__(self, redirect=_defRedirect, filename=None):
1206 wxPyApp.__init__(self)
1207 self.stdioWin = None
1208 self.saveStdio = (sys.stdout, sys.stderr)
1209 if redirect:
1210 self.RedirectStdio(filename)
1211
1212 # this initializes wxWindows and then calls our OnInit
1213 _wxStart(self.OnInit)
1214
1215
1216 def __del__(self):
1217 try:
1218 self.RestoreStdio()
1219 except:
1220 pass
1221
1222 def RedirectStdio(self, filename):
1223 if filename:
1224 sys.stdout = sys.stderr = open(filename, 'a')
1225 else:
1226 raise self.error, 'wxPyStdOutWindow not yet implemented.'
1227 #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
1228
1229 def RestoreStdio(self):
1230 sys.stdout, sys.stderr = self.saveStdio
1231 if self.stdioWin != None:
1232 self.stdioWin.Show(false)
1233 self.stdioWin.Destroy()
1234 self.stdioWin = None
1235
1236
1237 #----------------------------------------------------------------------------
1238 #
1239 # $Log$
1240 # Revision 1.5 1999/02/01 00:17:53 RD
1241 # Added the missing EVT_LIST_ITEM_SELECTED and friends.
1242 #
1243 # Revision 1.10 1999/02/01 00:10:39 RD
1244 #
1245 # Added the missing EVT_LIST_ITEM_SELECTED and friends.
1246 #
1247 # Revision 1.9 1999/01/30 07:30:09 RD
1248 #
1249 # Added wxSashWindow, wxSashEvent, wxLayoutAlgorithm, etc.
1250 #
1251 # Various cleanup, tweaks, minor additions, etc. to maintain
1252 # compatibility with the current wxWindows.
1253 #
1254 # Revision 1.8 1999/01/29 21:13:42 HH
1255 # Added aliases for wxDefaultPosition and wxDefaultSize (from wxPy..) in _extras,
1256 # so that C++ documentation applies.
1257 #
1258 # Revision 1.7 1998/11/25 08:45:21 RD
1259 #
1260 # Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
1261 # Added events for wxGrid
1262 # Other various fixes and additions
1263 #
1264 # Revision 1.6 1998/11/16 00:00:52 RD
1265 # Generic treectrl for wxPython/GTK compiles...
1266 #
1267 # Revision 1.5 1998/10/20 07:38:02 RD
1268 # bug fix
1269 #
1270 # Revision 1.4 1998/10/20 06:43:54 RD
1271 # New wxTreeCtrl wrappers (untested)
1272 # some changes in helpers
1273 # etc.
1274 #
1275 # Revision 1.3 1998/10/02 06:40:33 RD
1276 #
1277 # Version 0.4 of wxPython for MSW.
1278 #
1279 # Revision 1.2 1998/08/18 19:48:12 RD
1280 # more wxGTK compatibility things.
1281 #
1282 # It builds now but there are serious runtime problems...
1283 #
1284 # Revision 1.1 1998/08/09 08:25:49 RD
1285 # Initial version
1286 #
1287 #
1288