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