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