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