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