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