]> git.saurik.com Git - wxWidgets.git/blob - utils/wxPython/src/gtk/wxp.py
1. log::save works with wxGTK
[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 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 GetClassName(self):
33 val = wxpc.wxPyApp_GetClassName(self.this)
34 return val
35 def GetExitOnFrameDelete(self):
36 val = wxpc.wxPyApp_GetExitOnFrameDelete(self.this)
37 return val
38 def GetPrintMode(self):
39 val = wxpc.wxPyApp_GetPrintMode(self.this)
40 return val
41 def GetTopWindow(self):
42 val = wxpc.wxPyApp_GetTopWindow(self.this)
43 val = wxWindowPtr(val)
44 return val
45 def GetVendorName(self):
46 val = wxpc.wxPyApp_GetVendorName(self.this)
47 return val
48 def Dispatch(self):
49 val = wxpc.wxPyApp_Dispatch(self.this)
50 return val
51 def ExitMainLoop(self):
52 val = wxpc.wxPyApp_ExitMainLoop(self.this)
53 return val
54 def Initialized(self):
55 val = wxpc.wxPyApp_Initialized(self.this)
56 return val
57 def MainLoop(self):
58 val = wxpc.wxPyApp_MainLoop(self.this)
59 return val
60 def Pending(self):
61 val = wxpc.wxPyApp_Pending(self.this)
62 return val
63 def SetAppName(self,arg0):
64 val = wxpc.wxPyApp_SetAppName(self.this,arg0)
65 return val
66 def SetClassName(self,arg0):
67 val = wxpc.wxPyApp_SetClassName(self.this,arg0)
68 return val
69 def SetExitOnFrameDelete(self,arg0):
70 val = wxpc.wxPyApp_SetExitOnFrameDelete(self.this,arg0)
71 return val
72 def SetPrintMode(self,arg0):
73 val = wxpc.wxPyApp_SetPrintMode(self.this,arg0)
74 return val
75 def SetTopWindow(self,arg0):
76 val = wxpc.wxPyApp_SetTopWindow(self.this,arg0.this)
77 return val
78 def SetVendorName(self,arg0):
79 val = wxpc.wxPyApp_SetVendorName(self.this,arg0)
80 return val
81 def AfterMainLoop(self):
82 val = wxpc.wxPyApp_AfterMainLoop(self.this)
83 return val
84 def __repr__(self):
85 return "<C wxPyApp instance>"
86 class wxPyApp(wxPyAppPtr):
87 def __init__(self) :
88 self.this = wxpc.new_wxPyApp()
89 self.thisown = 1
90
91
92
93
94
95
96 #-------------- FUNCTION WRAPPERS ------------------
97
98 _wxStart = wxpc._wxStart
99
100 _wxSetDictionary = wxpc._wxSetDictionary
101
102
103
104 #-------------- VARIABLE WRAPPERS ------------------
105
106 wxMAJOR_VERSION = wxpc.wxMAJOR_VERSION
107 wxMINOR_VERSION = wxpc.wxMINOR_VERSION
108 wxRELEASE_NUMBER = wxpc.wxRELEASE_NUMBER
109 NOT_FOUND = wxpc.NOT_FOUND
110 wxVSCROLL = wxpc.wxVSCROLL
111 wxHSCROLL = wxpc.wxHSCROLL
112 wxCAPTION = wxpc.wxCAPTION
113 wxDOUBLE_BORDER = wxpc.wxDOUBLE_BORDER
114 wxSUNKEN_BORDER = wxpc.wxSUNKEN_BORDER
115 wxRAISED_BORDER = wxpc.wxRAISED_BORDER
116 wxBORDER = wxpc.wxBORDER
117 wxSIMPLE_BORDER = wxpc.wxSIMPLE_BORDER
118 wxSTATIC_BORDER = wxpc.wxSTATIC_BORDER
119 wxTRANSPARENT_WINDOW = wxpc.wxTRANSPARENT_WINDOW
120 wxNO_BORDER = wxpc.wxNO_BORDER
121 wxUSER_COLOURS = wxpc.wxUSER_COLOURS
122 wxNO_3D = wxpc.wxNO_3D
123 wxTAB_TRAVERSAL = wxpc.wxTAB_TRAVERSAL
124 wxHORIZONTAL = wxpc.wxHORIZONTAL
125 wxVERTICAL = wxpc.wxVERTICAL
126 wxBOTH = wxpc.wxBOTH
127 wxCENTER_FRAME = wxpc.wxCENTER_FRAME
128 wxSTAY_ON_TOP = wxpc.wxSTAY_ON_TOP
129 wxICONIZE = wxpc.wxICONIZE
130 wxMINIMIZE = wxpc.wxMINIMIZE
131 wxMAXIMIZE = wxpc.wxMAXIMIZE
132 wxTHICK_FRAME = wxpc.wxTHICK_FRAME
133 wxSYSTEM_MENU = wxpc.wxSYSTEM_MENU
134 wxMINIMIZE_BOX = wxpc.wxMINIMIZE_BOX
135 wxMAXIMIZE_BOX = wxpc.wxMAXIMIZE_BOX
136 wxTINY_CAPTION_HORIZ = wxpc.wxTINY_CAPTION_HORIZ
137 wxTINY_CAPTION_VERT = wxpc.wxTINY_CAPTION_VERT
138 wxRESIZE_BOX = wxpc.wxRESIZE_BOX
139 wxRESIZE_BORDER = wxpc.wxRESIZE_BORDER
140 wxDIALOG_MODAL = wxpc.wxDIALOG_MODAL
141 wxDIALOG_MODELESS = wxpc.wxDIALOG_MODELESS
142 wxDEFAULT_FRAME_STYLE = wxpc.wxDEFAULT_FRAME_STYLE
143 wxDEFAULT_DIALOG_STYLE = wxpc.wxDEFAULT_DIALOG_STYLE
144 wxRETAINED = wxpc.wxRETAINED
145 wxBACKINGSTORE = wxpc.wxBACKINGSTORE
146 wxTB_3DBUTTONS = wxpc.wxTB_3DBUTTONS
147 wxTB_HORIZONTAL = wxpc.wxTB_HORIZONTAL
148 wxTB_VERTICAL = wxpc.wxTB_VERTICAL
149 wxTB_FLAT = wxpc.wxTB_FLAT
150 wxCOLOURED = wxpc.wxCOLOURED
151 wxFIXED_LENGTH = wxpc.wxFIXED_LENGTH
152 wxALIGN_LEFT = wxpc.wxALIGN_LEFT
153 wxALIGN_CENTER = wxpc.wxALIGN_CENTER
154 wxALIGN_CENTRE = wxpc.wxALIGN_CENTRE
155 wxALIGN_RIGHT = wxpc.wxALIGN_RIGHT
156 wxLB_NEEDED_SB = wxpc.wxLB_NEEDED_SB
157 wxLB_ALWAYS_SB = wxpc.wxLB_ALWAYS_SB
158 wxLB_SORT = wxpc.wxLB_SORT
159 wxLB_SINGLE = wxpc.wxLB_SINGLE
160 wxLB_MULTIPLE = wxpc.wxLB_MULTIPLE
161 wxLB_EXTENDED = wxpc.wxLB_EXTENDED
162 wxLB_OWNERDRAW = wxpc.wxLB_OWNERDRAW
163 wxLB_HSCROLL = wxpc.wxLB_HSCROLL
164 wxPROCESS_ENTER = wxpc.wxPROCESS_ENTER
165 wxPASSWORD = wxpc.wxPASSWORD
166 wxTE_PROCESS_ENTER = wxpc.wxTE_PROCESS_ENTER
167 wxTE_PASSWORD = wxpc.wxTE_PASSWORD
168 wxTE_READONLY = wxpc.wxTE_READONLY
169 wxTE_MULTILINE = wxpc.wxTE_MULTILINE
170 wxCB_SIMPLE = wxpc.wxCB_SIMPLE
171 wxCB_DROPDOWN = wxpc.wxCB_DROPDOWN
172 wxCB_SORT = wxpc.wxCB_SORT
173 wxCB_READONLY = wxpc.wxCB_READONLY
174 wxRA_HORIZONTAL = wxpc.wxRA_HORIZONTAL
175 wxRA_VERTICAL = wxpc.wxRA_VERTICAL
176 wxRB_GROUP = wxpc.wxRB_GROUP
177 wxGA_PROGRESSBAR = wxpc.wxGA_PROGRESSBAR
178 wxGA_HORIZONTAL = wxpc.wxGA_HORIZONTAL
179 wxGA_VERTICAL = wxpc.wxGA_VERTICAL
180 wxSL_HORIZONTAL = wxpc.wxSL_HORIZONTAL
181 wxSL_VERTICAL = wxpc.wxSL_VERTICAL
182 wxSL_AUTOTICKS = wxpc.wxSL_AUTOTICKS
183 wxSL_LABELS = wxpc.wxSL_LABELS
184 wxSL_LEFT = wxpc.wxSL_LEFT
185 wxSL_TOP = wxpc.wxSL_TOP
186 wxSL_RIGHT = wxpc.wxSL_RIGHT
187 wxSL_BOTTOM = wxpc.wxSL_BOTTOM
188 wxSL_BOTH = wxpc.wxSL_BOTH
189 wxSL_SELRANGE = wxpc.wxSL_SELRANGE
190 wxSB_HORIZONTAL = wxpc.wxSB_HORIZONTAL
191 wxSB_VERTICAL = wxpc.wxSB_VERTICAL
192 wxBU_AUTODRAW = wxpc.wxBU_AUTODRAW
193 wxBU_NOAUTODRAW = wxpc.wxBU_NOAUTODRAW
194 wxTR_HAS_BUTTONS = wxpc.wxTR_HAS_BUTTONS
195 wxTR_EDIT_LABELS = wxpc.wxTR_EDIT_LABELS
196 wxTR_LINES_AT_ROOT = wxpc.wxTR_LINES_AT_ROOT
197 wxLC_ICON = wxpc.wxLC_ICON
198 wxLC_SMALL_ICON = wxpc.wxLC_SMALL_ICON
199 wxLC_LIST = wxpc.wxLC_LIST
200 wxLC_REPORT = wxpc.wxLC_REPORT
201 wxLC_ALIGN_TOP = wxpc.wxLC_ALIGN_TOP
202 wxLC_ALIGN_LEFT = wxpc.wxLC_ALIGN_LEFT
203 wxLC_AUTOARRANGE = wxpc.wxLC_AUTOARRANGE
204 wxLC_USER_TEXT = wxpc.wxLC_USER_TEXT
205 wxLC_EDIT_LABELS = wxpc.wxLC_EDIT_LABELS
206 wxLC_NO_HEADER = wxpc.wxLC_NO_HEADER
207 wxLC_NO_SORT_HEADER = wxpc.wxLC_NO_SORT_HEADER
208 wxLC_SINGLE_SEL = wxpc.wxLC_SINGLE_SEL
209 wxLC_SORT_ASCENDING = wxpc.wxLC_SORT_ASCENDING
210 wxLC_SORT_DESCENDING = wxpc.wxLC_SORT_DESCENDING
211 wxLC_MASK_TYPE = wxpc.wxLC_MASK_TYPE
212 wxLC_MASK_ALIGN = wxpc.wxLC_MASK_ALIGN
213 wxLC_MASK_SORT = wxpc.wxLC_MASK_SORT
214 wxSP_VERTICAL = wxpc.wxSP_VERTICAL
215 wxSP_HORIZONTAL = wxpc.wxSP_HORIZONTAL
216 wxSP_ARROW_KEYS = wxpc.wxSP_ARROW_KEYS
217 wxSP_WRAP = wxpc.wxSP_WRAP
218 wxSP_NOBORDER = wxpc.wxSP_NOBORDER
219 wxSP_3D = wxpc.wxSP_3D
220 wxSP_BORDER = wxpc.wxSP_BORDER
221 wxTAB_MULTILINE = wxpc.wxTAB_MULTILINE
222 wxTAB_RIGHTJUSTIFY = wxpc.wxTAB_RIGHTJUSTIFY
223 wxTAB_FIXEDWIDTH = wxpc.wxTAB_FIXEDWIDTH
224 wxTAB_OWNERDRAW = wxpc.wxTAB_OWNERDRAW
225 wxFLOOD_SURFACE = wxpc.wxFLOOD_SURFACE
226 wxFLOOD_BORDER = wxpc.wxFLOOD_BORDER
227 wxODDEVEN_RULE = wxpc.wxODDEVEN_RULE
228 wxWINDING_RULE = wxpc.wxWINDING_RULE
229 wxTOOL_TOP = wxpc.wxTOOL_TOP
230 wxTOOL_BOTTOM = wxpc.wxTOOL_BOTTOM
231 wxTOOL_LEFT = wxpc.wxTOOL_LEFT
232 wxTOOL_RIGHT = wxpc.wxTOOL_RIGHT
233 wxOK = wxpc.wxOK
234 wxYES_NO = wxpc.wxYES_NO
235 wxCANCEL = wxpc.wxCANCEL
236 wxYES = wxpc.wxYES
237 wxNO = wxpc.wxNO
238 wxICON_EXCLAMATION = wxpc.wxICON_EXCLAMATION
239 wxICON_HAND = wxpc.wxICON_HAND
240 wxICON_QUESTION = wxpc.wxICON_QUESTION
241 wxICON_INFORMATION = wxpc.wxICON_INFORMATION
242 wxICON_STOP = wxpc.wxICON_STOP
243 wxICON_ASTERISK = wxpc.wxICON_ASTERISK
244 wxICON_MASK = wxpc.wxICON_MASK
245 wxCENTRE = wxpc.wxCENTRE
246 wxCENTER = wxpc.wxCENTER
247 wxSIZE_AUTO_WIDTH = wxpc.wxSIZE_AUTO_WIDTH
248 wxSIZE_AUTO_HEIGHT = wxpc.wxSIZE_AUTO_HEIGHT
249 wxSIZE_AUTO = wxpc.wxSIZE_AUTO
250 wxSIZE_USE_EXISTING = wxpc.wxSIZE_USE_EXISTING
251 wxSIZE_ALLOW_MINUS_ONE = wxpc.wxSIZE_ALLOW_MINUS_ONE
252 wxDF_TEXT = wxpc.wxDF_TEXT
253 wxDF_BITMAP = wxpc.wxDF_BITMAP
254 wxDF_METAFILE = wxpc.wxDF_METAFILE
255 wxDF_DIB = wxpc.wxDF_DIB
256 wxDF_OEMTEXT = wxpc.wxDF_OEMTEXT
257 wxDF_FILENAME = wxpc.wxDF_FILENAME
258 wxPORTRAIT = wxpc.wxPORTRAIT
259 wxLANDSCAPE = wxpc.wxLANDSCAPE
260 wxID_OPEN = wxpc.wxID_OPEN
261 wxID_CLOSE = wxpc.wxID_CLOSE
262 wxID_NEW = wxpc.wxID_NEW
263 wxID_SAVE = wxpc.wxID_SAVE
264 wxID_SAVEAS = wxpc.wxID_SAVEAS
265 wxID_REVERT = wxpc.wxID_REVERT
266 wxID_EXIT = wxpc.wxID_EXIT
267 wxID_UNDO = wxpc.wxID_UNDO
268 wxID_REDO = wxpc.wxID_REDO
269 wxID_HELP = wxpc.wxID_HELP
270 wxID_PRINT = wxpc.wxID_PRINT
271 wxID_PRINT_SETUP = wxpc.wxID_PRINT_SETUP
272 wxID_PREVIEW = wxpc.wxID_PREVIEW
273 wxID_ABOUT = wxpc.wxID_ABOUT
274 wxID_HELP_CONTENTS = wxpc.wxID_HELP_CONTENTS
275 wxID_HELP_COMMANDS = wxpc.wxID_HELP_COMMANDS
276 wxID_HELP_PROCEDURES = wxpc.wxID_HELP_PROCEDURES
277 wxID_HELP_CONTEXT = wxpc.wxID_HELP_CONTEXT
278 wxID_CUT = wxpc.wxID_CUT
279 wxID_COPY = wxpc.wxID_COPY
280 wxID_PASTE = wxpc.wxID_PASTE
281 wxID_CLEAR = wxpc.wxID_CLEAR
282 wxID_FIND = wxpc.wxID_FIND
283 wxID_FILE1 = wxpc.wxID_FILE1
284 wxID_FILE2 = wxpc.wxID_FILE2
285 wxID_FILE3 = wxpc.wxID_FILE3
286 wxID_FILE4 = wxpc.wxID_FILE4
287 wxID_FILE5 = wxpc.wxID_FILE5
288 wxID_FILE6 = wxpc.wxID_FILE6
289 wxID_FILE7 = wxpc.wxID_FILE7
290 wxID_FILE8 = wxpc.wxID_FILE8
291 wxID_FILE9 = wxpc.wxID_FILE9
292 wxID_OK = wxpc.wxID_OK
293 wxID_CANCEL = wxpc.wxID_CANCEL
294 wxID_APPLY = wxpc.wxID_APPLY
295 wxID_YES = wxpc.wxID_YES
296 wxID_NO = wxpc.wxID_NO
297 wxBITMAP_TYPE_BMP = wxpc.wxBITMAP_TYPE_BMP
298 wxBITMAP_TYPE_BMP_RESOURCE = wxpc.wxBITMAP_TYPE_BMP_RESOURCE
299 wxBITMAP_TYPE_ICO = wxpc.wxBITMAP_TYPE_ICO
300 wxBITMAP_TYPE_ICO_RESOURCE = wxpc.wxBITMAP_TYPE_ICO_RESOURCE
301 wxBITMAP_TYPE_CUR = wxpc.wxBITMAP_TYPE_CUR
302 wxBITMAP_TYPE_CUR_RESOURCE = wxpc.wxBITMAP_TYPE_CUR_RESOURCE
303 wxBITMAP_TYPE_XBM = wxpc.wxBITMAP_TYPE_XBM
304 wxBITMAP_TYPE_XBM_DATA = wxpc.wxBITMAP_TYPE_XBM_DATA
305 wxBITMAP_TYPE_XPM = wxpc.wxBITMAP_TYPE_XPM
306 wxBITMAP_TYPE_XPM_DATA = wxpc.wxBITMAP_TYPE_XPM_DATA
307 wxBITMAP_TYPE_TIF = wxpc.wxBITMAP_TYPE_TIF
308 wxBITMAP_TYPE_TIF_RESOURCE = wxpc.wxBITMAP_TYPE_TIF_RESOURCE
309 wxBITMAP_TYPE_GIF = wxpc.wxBITMAP_TYPE_GIF
310 wxBITMAP_TYPE_GIF_RESOURCE = wxpc.wxBITMAP_TYPE_GIF_RESOURCE
311 wxBITMAP_TYPE_PNG = wxpc.wxBITMAP_TYPE_PNG
312 wxBITMAP_TYPE_PNG_RESOURCE = wxpc.wxBITMAP_TYPE_PNG_RESOURCE
313 wxBITMAP_TYPE_ANY = wxpc.wxBITMAP_TYPE_ANY
314 wxBITMAP_TYPE_RESOURCE = wxpc.wxBITMAP_TYPE_RESOURCE
315 wxOPEN = wxpc.wxOPEN
316 wxSAVE = wxpc.wxSAVE
317 wxHIDE_READONLY = wxpc.wxHIDE_READONLY
318 wxOVERWRITE_PROMPT = wxpc.wxOVERWRITE_PROMPT
319 wxACCEL_ALT = wxpc.wxACCEL_ALT
320 wxACCEL_CTRL = wxpc.wxACCEL_CTRL
321 wxACCEL_SHIFT = wxpc.wxACCEL_SHIFT
322 ERR_PARAM = wxpc.ERR_PARAM
323 ERR_NODATA = wxpc.ERR_NODATA
324 ERR_CANCEL = wxpc.ERR_CANCEL
325 ERR_SUCCESS = wxpc.ERR_SUCCESS
326 wxDEFAULT = wxpc.wxDEFAULT
327 wxDECORATIVE = wxpc.wxDECORATIVE
328 wxROMAN = wxpc.wxROMAN
329 wxSCRIPT = wxpc.wxSCRIPT
330 wxSWISS = wxpc.wxSWISS
331 wxMODERN = wxpc.wxMODERN
332 wxTELETYPE = wxpc.wxTELETYPE
333 wxVARIABLE = wxpc.wxVARIABLE
334 wxFIXED = wxpc.wxFIXED
335 wxNORMAL = wxpc.wxNORMAL
336 wxLIGHT = wxpc.wxLIGHT
337 wxBOLD = wxpc.wxBOLD
338 wxITALIC = wxpc.wxITALIC
339 wxSLANT = wxpc.wxSLANT
340 wxSOLID = wxpc.wxSOLID
341 wxDOT = wxpc.wxDOT
342 wxLONG_DASH = wxpc.wxLONG_DASH
343 wxSHORT_DASH = wxpc.wxSHORT_DASH
344 wxDOT_DASH = wxpc.wxDOT_DASH
345 wxUSER_DASH = wxpc.wxUSER_DASH
346 wxTRANSPARENT = wxpc.wxTRANSPARENT
347 wxSTIPPLE = wxpc.wxSTIPPLE
348 wxBDIAGONAL_HATCH = wxpc.wxBDIAGONAL_HATCH
349 wxCROSSDIAG_HATCH = wxpc.wxCROSSDIAG_HATCH
350 wxFDIAGONAL_HATCH = wxpc.wxFDIAGONAL_HATCH
351 wxCROSS_HATCH = wxpc.wxCROSS_HATCH
352 wxHORIZONTAL_HATCH = wxpc.wxHORIZONTAL_HATCH
353 wxVERTICAL_HATCH = wxpc.wxVERTICAL_HATCH
354 wxJOIN_BEVEL = wxpc.wxJOIN_BEVEL
355 wxJOIN_MITER = wxpc.wxJOIN_MITER
356 wxJOIN_ROUND = wxpc.wxJOIN_ROUND
357 wxCAP_ROUND = wxpc.wxCAP_ROUND
358 wxCAP_PROJECTING = wxpc.wxCAP_PROJECTING
359 wxCAP_BUTT = wxpc.wxCAP_BUTT
360 wxCLEAR = wxpc.wxCLEAR
361 wxXOR = wxpc.wxXOR
362 wxINVERT = wxpc.wxINVERT
363 wxOR_REVERSE = wxpc.wxOR_REVERSE
364 wxAND_REVERSE = wxpc.wxAND_REVERSE
365 wxCOPY = wxpc.wxCOPY
366 wxAND = wxpc.wxAND
367 wxAND_INVERT = wxpc.wxAND_INVERT
368 wxNO_OP = wxpc.wxNO_OP
369 wxNOR = wxpc.wxNOR
370 wxEQUIV = wxpc.wxEQUIV
371 wxSRC_INVERT = wxpc.wxSRC_INVERT
372 wxOR_INVERT = wxpc.wxOR_INVERT
373 wxNAND = wxpc.wxNAND
374 wxOR = wxpc.wxOR
375 wxSET = wxpc.wxSET
376 wxSRC_OR = wxpc.wxSRC_OR
377 wxSRC_AND = wxpc.wxSRC_AND
378 WXK_BACK = wxpc.WXK_BACK
379 WXK_TAB = wxpc.WXK_TAB
380 WXK_RETURN = wxpc.WXK_RETURN
381 WXK_ESCAPE = wxpc.WXK_ESCAPE
382 WXK_SPACE = wxpc.WXK_SPACE
383 WXK_DELETE = wxpc.WXK_DELETE
384 WXK_START = wxpc.WXK_START
385 WXK_LBUTTON = wxpc.WXK_LBUTTON
386 WXK_RBUTTON = wxpc.WXK_RBUTTON
387 WXK_CANCEL = wxpc.WXK_CANCEL
388 WXK_MBUTTON = wxpc.WXK_MBUTTON
389 WXK_CLEAR = wxpc.WXK_CLEAR
390 WXK_SHIFT = wxpc.WXK_SHIFT
391 WXK_CONTROL = wxpc.WXK_CONTROL
392 WXK_MENU = wxpc.WXK_MENU
393 WXK_PAUSE = wxpc.WXK_PAUSE
394 WXK_CAPITAL = wxpc.WXK_CAPITAL
395 WXK_PRIOR = wxpc.WXK_PRIOR
396 WXK_NEXT = wxpc.WXK_NEXT
397 WXK_END = wxpc.WXK_END
398 WXK_HOME = wxpc.WXK_HOME
399 WXK_LEFT = wxpc.WXK_LEFT
400 WXK_UP = wxpc.WXK_UP
401 WXK_RIGHT = wxpc.WXK_RIGHT
402 WXK_DOWN = wxpc.WXK_DOWN
403 WXK_SELECT = wxpc.WXK_SELECT
404 WXK_PRINT = wxpc.WXK_PRINT
405 WXK_EXECUTE = wxpc.WXK_EXECUTE
406 WXK_SNAPSHOT = wxpc.WXK_SNAPSHOT
407 WXK_INSERT = wxpc.WXK_INSERT
408 WXK_HELP = wxpc.WXK_HELP
409 WXK_NUMPAD0 = wxpc.WXK_NUMPAD0
410 WXK_NUMPAD1 = wxpc.WXK_NUMPAD1
411 WXK_NUMPAD2 = wxpc.WXK_NUMPAD2
412 WXK_NUMPAD3 = wxpc.WXK_NUMPAD3
413 WXK_NUMPAD4 = wxpc.WXK_NUMPAD4
414 WXK_NUMPAD5 = wxpc.WXK_NUMPAD5
415 WXK_NUMPAD6 = wxpc.WXK_NUMPAD6
416 WXK_NUMPAD7 = wxpc.WXK_NUMPAD7
417 WXK_NUMPAD8 = wxpc.WXK_NUMPAD8
418 WXK_NUMPAD9 = wxpc.WXK_NUMPAD9
419 WXK_MULTIPLY = wxpc.WXK_MULTIPLY
420 WXK_ADD = wxpc.WXK_ADD
421 WXK_SEPARATOR = wxpc.WXK_SEPARATOR
422 WXK_SUBTRACT = wxpc.WXK_SUBTRACT
423 WXK_DECIMAL = wxpc.WXK_DECIMAL
424 WXK_DIVIDE = wxpc.WXK_DIVIDE
425 WXK_F1 = wxpc.WXK_F1
426 WXK_F2 = wxpc.WXK_F2
427 WXK_F3 = wxpc.WXK_F3
428 WXK_F4 = wxpc.WXK_F4
429 WXK_F5 = wxpc.WXK_F5
430 WXK_F6 = wxpc.WXK_F6
431 WXK_F7 = wxpc.WXK_F7
432 WXK_F8 = wxpc.WXK_F8
433 WXK_F9 = wxpc.WXK_F9
434 WXK_F10 = wxpc.WXK_F10
435 WXK_F11 = wxpc.WXK_F11
436 WXK_F12 = wxpc.WXK_F12
437 WXK_F13 = wxpc.WXK_F13
438 WXK_F14 = wxpc.WXK_F14
439 WXK_F15 = wxpc.WXK_F15
440 WXK_F16 = wxpc.WXK_F16
441 WXK_F17 = wxpc.WXK_F17
442 WXK_F18 = wxpc.WXK_F18
443 WXK_F19 = wxpc.WXK_F19
444 WXK_F20 = wxpc.WXK_F20
445 WXK_F21 = wxpc.WXK_F21
446 WXK_F22 = wxpc.WXK_F22
447 WXK_F23 = wxpc.WXK_F23
448 WXK_F24 = wxpc.WXK_F24
449 WXK_NUMLOCK = wxpc.WXK_NUMLOCK
450 WXK_SCROLL = wxpc.WXK_SCROLL
451 WXK_PAGEUP = wxpc.WXK_PAGEUP
452 WXK_PAGEDOWN = wxpc.WXK_PAGEDOWN
453 wxCURSOR_NONE = wxpc.wxCURSOR_NONE
454 wxCURSOR_ARROW = wxpc.wxCURSOR_ARROW
455 wxCURSOR_BULLSEYE = wxpc.wxCURSOR_BULLSEYE
456 wxCURSOR_CHAR = wxpc.wxCURSOR_CHAR
457 wxCURSOR_CROSS = wxpc.wxCURSOR_CROSS
458 wxCURSOR_HAND = wxpc.wxCURSOR_HAND
459 wxCURSOR_IBEAM = wxpc.wxCURSOR_IBEAM
460 wxCURSOR_LEFT_BUTTON = wxpc.wxCURSOR_LEFT_BUTTON
461 wxCURSOR_MAGNIFIER = wxpc.wxCURSOR_MAGNIFIER
462 wxCURSOR_MIDDLE_BUTTON = wxpc.wxCURSOR_MIDDLE_BUTTON
463 wxCURSOR_NO_ENTRY = wxpc.wxCURSOR_NO_ENTRY
464 wxCURSOR_PAINT_BRUSH = wxpc.wxCURSOR_PAINT_BRUSH
465 wxCURSOR_PENCIL = wxpc.wxCURSOR_PENCIL
466 wxCURSOR_POINT_LEFT = wxpc.wxCURSOR_POINT_LEFT
467 wxCURSOR_POINT_RIGHT = wxpc.wxCURSOR_POINT_RIGHT
468 wxCURSOR_QUESTION_ARROW = wxpc.wxCURSOR_QUESTION_ARROW
469 wxCURSOR_RIGHT_BUTTON = wxpc.wxCURSOR_RIGHT_BUTTON
470 wxCURSOR_SIZENESW = wxpc.wxCURSOR_SIZENESW
471 wxCURSOR_SIZENS = wxpc.wxCURSOR_SIZENS
472 wxCURSOR_SIZENWSE = wxpc.wxCURSOR_SIZENWSE
473 wxCURSOR_SIZEWE = wxpc.wxCURSOR_SIZEWE
474 wxCURSOR_SIZING = wxpc.wxCURSOR_SIZING
475 wxCURSOR_SPRAYCAN = wxpc.wxCURSOR_SPRAYCAN
476 wxCURSOR_WAIT = wxpc.wxCURSOR_WAIT
477 wxCURSOR_WATCH = wxpc.wxCURSOR_WATCH
478 wxCURSOR_BLANK = wxpc.wxCURSOR_BLANK
479 FALSE = wxpc.FALSE
480 false = wxpc.false
481 TRUE = wxpc.TRUE
482 true = wxpc.true
483 wxEVT_NULL = wxpc.wxEVT_NULL
484 wxEVT_FIRST = wxpc.wxEVT_FIRST
485 wxEVT_COMMAND_BUTTON_CLICKED = wxpc.wxEVT_COMMAND_BUTTON_CLICKED
486 wxEVT_COMMAND_CHECKBOX_CLICKED = wxpc.wxEVT_COMMAND_CHECKBOX_CLICKED
487 wxEVT_COMMAND_CHOICE_SELECTED = wxpc.wxEVT_COMMAND_CHOICE_SELECTED
488 wxEVT_COMMAND_LISTBOX_SELECTED = wxpc.wxEVT_COMMAND_LISTBOX_SELECTED
489 wxEVT_COMMAND_LISTBOX_DOUBLECLICKED = wxpc.wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
490 wxEVT_COMMAND_CHECKLISTBOX_TOGGLED = wxpc.wxEVT_COMMAND_CHECKLISTBOX_TOGGLED
491 wxEVT_COMMAND_TEXT_UPDATED = wxpc.wxEVT_COMMAND_TEXT_UPDATED
492 wxEVT_COMMAND_TEXT_ENTER = wxpc.wxEVT_COMMAND_TEXT_ENTER
493 wxEVT_COMMAND_MENU_SELECTED = wxpc.wxEVT_COMMAND_MENU_SELECTED
494 wxEVT_COMMAND_SLIDER_UPDATED = wxpc.wxEVT_COMMAND_SLIDER_UPDATED
495 wxEVT_COMMAND_RADIOBOX_SELECTED = wxpc.wxEVT_COMMAND_RADIOBOX_SELECTED
496 wxEVT_COMMAND_RADIOBUTTON_SELECTED = wxpc.wxEVT_COMMAND_RADIOBUTTON_SELECTED
497 wxEVT_COMMAND_SCROLLBAR_UPDATED = wxpc.wxEVT_COMMAND_SCROLLBAR_UPDATED
498 wxEVT_COMMAND_VLBOX_SELECTED = wxpc.wxEVT_COMMAND_VLBOX_SELECTED
499 wxEVT_COMMAND_COMBOBOX_SELECTED = wxpc.wxEVT_COMMAND_COMBOBOX_SELECTED
500 wxEVT_COMMAND_TOOL_CLICKED = wxpc.wxEVT_COMMAND_TOOL_CLICKED
501 wxEVT_COMMAND_TOOL_RCLICKED = wxpc.wxEVT_COMMAND_TOOL_RCLICKED
502 wxEVT_COMMAND_TOOL_ENTER = wxpc.wxEVT_COMMAND_TOOL_ENTER
503 wxEVT_SET_FOCUS = wxpc.wxEVT_SET_FOCUS
504 wxEVT_KILL_FOCUS = wxpc.wxEVT_KILL_FOCUS
505 wxEVT_LEFT_DOWN = wxpc.wxEVT_LEFT_DOWN
506 wxEVT_LEFT_UP = wxpc.wxEVT_LEFT_UP
507 wxEVT_MIDDLE_DOWN = wxpc.wxEVT_MIDDLE_DOWN
508 wxEVT_MIDDLE_UP = wxpc.wxEVT_MIDDLE_UP
509 wxEVT_RIGHT_DOWN = wxpc.wxEVT_RIGHT_DOWN
510 wxEVT_RIGHT_UP = wxpc.wxEVT_RIGHT_UP
511 wxEVT_MOTION = wxpc.wxEVT_MOTION
512 wxEVT_ENTER_WINDOW = wxpc.wxEVT_ENTER_WINDOW
513 wxEVT_LEAVE_WINDOW = wxpc.wxEVT_LEAVE_WINDOW
514 wxEVT_LEFT_DCLICK = wxpc.wxEVT_LEFT_DCLICK
515 wxEVT_MIDDLE_DCLICK = wxpc.wxEVT_MIDDLE_DCLICK
516 wxEVT_RIGHT_DCLICK = wxpc.wxEVT_RIGHT_DCLICK
517 wxEVT_NC_LEFT_DOWN = wxpc.wxEVT_NC_LEFT_DOWN
518 wxEVT_NC_LEFT_UP = wxpc.wxEVT_NC_LEFT_UP
519 wxEVT_NC_MIDDLE_DOWN = wxpc.wxEVT_NC_MIDDLE_DOWN
520 wxEVT_NC_MIDDLE_UP = wxpc.wxEVT_NC_MIDDLE_UP
521 wxEVT_NC_RIGHT_DOWN = wxpc.wxEVT_NC_RIGHT_DOWN
522 wxEVT_NC_RIGHT_UP = wxpc.wxEVT_NC_RIGHT_UP
523 wxEVT_NC_MOTION = wxpc.wxEVT_NC_MOTION
524 wxEVT_NC_ENTER_WINDOW = wxpc.wxEVT_NC_ENTER_WINDOW
525 wxEVT_NC_LEAVE_WINDOW = wxpc.wxEVT_NC_LEAVE_WINDOW
526 wxEVT_NC_LEFT_DCLICK = wxpc.wxEVT_NC_LEFT_DCLICK
527 wxEVT_NC_MIDDLE_DCLICK = wxpc.wxEVT_NC_MIDDLE_DCLICK
528 wxEVT_NC_RIGHT_DCLICK = wxpc.wxEVT_NC_RIGHT_DCLICK
529 wxEVT_CHAR = wxpc.wxEVT_CHAR
530 wxEVT_SCROLL_TOP = wxpc.wxEVT_SCROLL_TOP
531 wxEVT_SCROLL_BOTTOM = wxpc.wxEVT_SCROLL_BOTTOM
532 wxEVT_SCROLL_LINEUP = wxpc.wxEVT_SCROLL_LINEUP
533 wxEVT_SCROLL_LINEDOWN = wxpc.wxEVT_SCROLL_LINEDOWN
534 wxEVT_SCROLL_PAGEUP = wxpc.wxEVT_SCROLL_PAGEUP
535 wxEVT_SCROLL_PAGEDOWN = wxpc.wxEVT_SCROLL_PAGEDOWN
536 wxEVT_SCROLL_THUMBTRACK = wxpc.wxEVT_SCROLL_THUMBTRACK
537 wxEVT_SIZE = wxpc.wxEVT_SIZE
538 wxEVT_MOVE = wxpc.wxEVT_MOVE
539 wxEVT_CLOSE_WINDOW = wxpc.wxEVT_CLOSE_WINDOW
540 wxEVT_END_SESSION = wxpc.wxEVT_END_SESSION
541 wxEVT_QUERY_END_SESSION = wxpc.wxEVT_QUERY_END_SESSION
542 wxEVT_ACTIVATE_APP = wxpc.wxEVT_ACTIVATE_APP
543 wxEVT_POWER = wxpc.wxEVT_POWER
544 wxEVT_CHAR_HOOK = wxpc.wxEVT_CHAR_HOOK
545 wxEVT_KEY_UP = wxpc.wxEVT_KEY_UP
546 wxEVT_ACTIVATE = wxpc.wxEVT_ACTIVATE
547 wxEVT_CREATE = wxpc.wxEVT_CREATE
548 wxEVT_DESTROY = wxpc.wxEVT_DESTROY
549 wxEVT_SHOW = wxpc.wxEVT_SHOW
550 wxEVT_ICONIZE = wxpc.wxEVT_ICONIZE
551 wxEVT_MAXIMIZE = wxpc.wxEVT_MAXIMIZE
552 wxEVT_MOUSE_CAPTURE_CHANGED = wxpc.wxEVT_MOUSE_CAPTURE_CHANGED
553 wxEVT_PAINT = wxpc.wxEVT_PAINT
554 wxEVT_ERASE_BACKGROUND = wxpc.wxEVT_ERASE_BACKGROUND
555 wxEVT_NC_PAINT = wxpc.wxEVT_NC_PAINT
556 wxEVT_PAINT_ICON = wxpc.wxEVT_PAINT_ICON
557 wxEVT_MENU_CHAR = wxpc.wxEVT_MENU_CHAR
558 wxEVT_MENU_INIT = wxpc.wxEVT_MENU_INIT
559 wxEVT_MENU_HIGHLIGHT = wxpc.wxEVT_MENU_HIGHLIGHT
560 wxEVT_POPUP_MENU_INIT = wxpc.wxEVT_POPUP_MENU_INIT
561 wxEVT_CONTEXT_MENU = wxpc.wxEVT_CONTEXT_MENU
562 wxEVT_SYS_COLOUR_CHANGED = wxpc.wxEVT_SYS_COLOUR_CHANGED
563 wxEVT_SETTING_CHANGED = wxpc.wxEVT_SETTING_CHANGED
564 wxEVT_QUERY_NEW_PALETTE = wxpc.wxEVT_QUERY_NEW_PALETTE
565 wxEVT_PALETTE_CHANGED = wxpc.wxEVT_PALETTE_CHANGED
566 wxEVT_JOY_BUTTON_DOWN = wxpc.wxEVT_JOY_BUTTON_DOWN
567 wxEVT_JOY_BUTTON_UP = wxpc.wxEVT_JOY_BUTTON_UP
568 wxEVT_JOY_MOVE = wxpc.wxEVT_JOY_MOVE
569 wxEVT_JOY_ZMOVE = wxpc.wxEVT_JOY_ZMOVE
570 wxEVT_DROP_FILES = wxpc.wxEVT_DROP_FILES
571 wxEVT_DRAW_ITEM = wxpc.wxEVT_DRAW_ITEM
572 wxEVT_MEASURE_ITEM = wxpc.wxEVT_MEASURE_ITEM
573 wxEVT_COMPARE_ITEM = wxpc.wxEVT_COMPARE_ITEM
574 wxEVT_INIT_DIALOG = wxpc.wxEVT_INIT_DIALOG
575 wxEVT_IDLE = wxpc.wxEVT_IDLE
576 wxEVT_UPDATE_UI = wxpc.wxEVT_UPDATE_UI
577 wxEVT_COMMAND_LEFT_CLICK = wxpc.wxEVT_COMMAND_LEFT_CLICK
578 wxEVT_COMMAND_LEFT_DCLICK = wxpc.wxEVT_COMMAND_LEFT_DCLICK
579 wxEVT_COMMAND_RIGHT_CLICK = wxpc.wxEVT_COMMAND_RIGHT_CLICK
580 wxEVT_COMMAND_RIGHT_DCLICK = wxpc.wxEVT_COMMAND_RIGHT_DCLICK
581 wxEVT_COMMAND_SET_FOCUS = wxpc.wxEVT_COMMAND_SET_FOCUS
582 wxEVT_COMMAND_KILL_FOCUS = wxpc.wxEVT_COMMAND_KILL_FOCUS
583 wxEVT_COMMAND_ENTER = wxpc.wxEVT_COMMAND_ENTER
584 wxEVT_COMMAND_TREE_BEGIN_DRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_DRAG
585 wxEVT_COMMAND_TREE_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_TREE_BEGIN_RDRAG
586 wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT
587 wxEVT_COMMAND_TREE_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_TREE_END_LABEL_EDIT
588 wxEVT_COMMAND_TREE_DELETE_ITEM = wxpc.wxEVT_COMMAND_TREE_DELETE_ITEM
589 wxEVT_COMMAND_TREE_GET_INFO = wxpc.wxEVT_COMMAND_TREE_GET_INFO
590 wxEVT_COMMAND_TREE_SET_INFO = wxpc.wxEVT_COMMAND_TREE_SET_INFO
591 wxEVT_COMMAND_TREE_ITEM_EXPANDED = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDED
592 wxEVT_COMMAND_TREE_ITEM_EXPANDING = wxpc.wxEVT_COMMAND_TREE_ITEM_EXPANDING
593 wxEVT_COMMAND_TREE_ITEM_COLLAPSED = wxpc.wxEVT_COMMAND_TREE_ITEM_COLLAPSED
594 wxEVT_COMMAND_TREE_ITEM_COLLAPSING = wxpc.wxEVT_COMMAND_TREE_ITEM_COLLAPSING
595 wxEVT_COMMAND_TREE_SEL_CHANGED = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGED
596 wxEVT_COMMAND_TREE_SEL_CHANGING = wxpc.wxEVT_COMMAND_TREE_SEL_CHANGING
597 wxEVT_COMMAND_TREE_KEY_DOWN = wxpc.wxEVT_COMMAND_TREE_KEY_DOWN
598 wxEVT_COMMAND_LIST_BEGIN_DRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_DRAG
599 wxEVT_COMMAND_LIST_BEGIN_RDRAG = wxpc.wxEVT_COMMAND_LIST_BEGIN_RDRAG
600 wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT
601 wxEVT_COMMAND_LIST_END_LABEL_EDIT = wxpc.wxEVT_COMMAND_LIST_END_LABEL_EDIT
602 wxEVT_COMMAND_LIST_DELETE_ITEM = wxpc.wxEVT_COMMAND_LIST_DELETE_ITEM
603 wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS = wxpc.wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS
604 wxEVT_COMMAND_LIST_GET_INFO = wxpc.wxEVT_COMMAND_LIST_GET_INFO
605 wxEVT_COMMAND_LIST_SET_INFO = wxpc.wxEVT_COMMAND_LIST_SET_INFO
606 wxEVT_COMMAND_LIST_ITEM_SELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_SELECTED
607 wxEVT_COMMAND_LIST_ITEM_DESELECTED = wxpc.wxEVT_COMMAND_LIST_ITEM_DESELECTED
608 wxEVT_COMMAND_LIST_KEY_DOWN = wxpc.wxEVT_COMMAND_LIST_KEY_DOWN
609 wxEVT_COMMAND_LIST_INSERT_ITEM = wxpc.wxEVT_COMMAND_LIST_INSERT_ITEM
610 wxEVT_COMMAND_LIST_COL_CLICK = wxpc.wxEVT_COMMAND_LIST_COL_CLICK
611 wxEVT_COMMAND_TAB_SEL_CHANGED = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGED
612 wxEVT_COMMAND_TAB_SEL_CHANGING = wxpc.wxEVT_COMMAND_TAB_SEL_CHANGING
613 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED
614 wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING = wxpc.wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING
615 __version__ = wxpc.__version__
616 cvar = wxpc.cvar
617 wxPyDefaultPosition = wxPointPtr(wxpc.cvar.wxPyDefaultPosition)
618 wxPyDefaultSize = wxSizePtr(wxpc.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
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
1036 class wxTimer(wxPyTimer):
1037 def __init__(self):
1038 wxPyTimer.__init__(self, self.Notify) # derived class must provide
1039 # Notify(self) method.
1040
1041 #----------------------------------------------------------------------
1042 # Some wxWin methods can take "NULL" as parameters, but the shadow classes
1043 # expect an object with the SWIG pointer as a 'this' member. This class
1044 # and instance fools the shadow into passing the NULL pointer.
1045
1046 class NullObj:
1047 this = 'NULL' # SWIG converts this to (void*)0
1048
1049 NULL = NullObj()
1050
1051
1052 #----------------------------------------------------------------------
1053 # aliases
1054
1055 wxColor = wxColour
1056 wxNamedColor = wxNamedColour
1057
1058 wxPyDefaultPosition.Set(-1,-1)
1059 wxPyDefaultSize.Set(-1,-1)
1060
1061 #----------------------------------------------------------------------
1062
1063 ## class wxPyStdOutWindow(wxFrame):
1064 ## def __init__(self, title = "wxPython: stdout/stderr"):
1065 ## wxFrame.__init__(self, NULL, title)
1066 ## self.title = title
1067 ## self.text = wxTextWindow(self)
1068 ## self.text.SetFont(wxFont(10, wxMODERN, wxNORMAL, wxBOLD))
1069 ## self.SetSize(-1,-1,400,200)
1070 ## self.Show(false)
1071 ## self.isShown = false
1072
1073 ## def write(self, str): # with this method,
1074 ## if not self.isShown:
1075 ## self.Show(true)
1076 ## self.isShown = true
1077 ## self.text.WriteText(str)
1078
1079 ## def OnCloseWindow(self, event): # doesn't allow the window to close, just hides it
1080 ## self.Show(false)
1081 ## self.isShown = false
1082
1083
1084 _defRedirect = (wxPlatform == '__WXMSW__')
1085
1086 #----------------------------------------------------------------------
1087 # The main application class. Derive from this and implement an OnInit
1088 # method that creates a frame and then calls self.SetTopWindow(frame)
1089
1090 class wxApp(wxPyApp):
1091 error = 'wxApp.error'
1092
1093 def __init__(self, redirect=_defRedirect, filename=None):
1094 wxPyApp.__init__(self)
1095 self.stdioWin = None
1096 self.saveStdio = (sys.stdout, sys.stderr)
1097 if redirect:
1098 self.RedirectStdio(filename)
1099
1100 # this initializes wxWindows and then calls our OnInit
1101 _wxStart(self.OnInit)
1102
1103
1104 def __del__(self):
1105 try:
1106 self.RestoreStdio()
1107 except:
1108 pass
1109
1110 def RedirectStdio(self, filename):
1111 if filename:
1112 sys.stdout = sys.stderr = open(filename, 'a')
1113 else:
1114 raise self.error, 'wxPyStdOutWindow not yet implemented.'
1115 #self.stdioWin = sys.stdout = sys.stderr = wxPyStdOutWindow()
1116
1117 def RestoreStdio(self):
1118 sys.stdout, sys.stderr = self.saveStdio
1119 if self.stdioWin != None:
1120 self.stdioWin.Show(false)
1121 self.stdioWin.Destroy()
1122 self.stdioWin = None
1123
1124
1125 #----------------------------------------------------------------------------
1126 #
1127 # $Log$
1128 # Revision 1.9 1998/11/16 00:01:43 RD
1129 # Generic treectrl for wxPython/GTK compiles...
1130 #
1131 # Revision 1.5 1998/10/20 07:38:02 RD
1132 # bug fix
1133 #
1134 # Revision 1.4 1998/10/20 06:43:54 RD
1135 # New wxTreeCtrl wrappers (untested)
1136 # some changes in helpers
1137 # etc.
1138 #
1139 # Revision 1.3 1998/10/02 06:40:33 RD
1140 #
1141 # Version 0.4 of wxPython for MSW.
1142 #
1143 # Revision 1.2 1998/08/18 19:48:12 RD
1144 # more wxGTK compatibility things.
1145 #
1146 # It builds now but there are serious runtime problems...
1147 #
1148 # Revision 1.1 1998/08/09 08:25:49 RD
1149 # Initial version
1150 #
1151 #
1152