wxPRINT_QUALITY_MEDIUM = wxc.wxPRINT_QUALITY_MEDIUM
wxPRINT_QUALITY_LOW = wxc.wxPRINT_QUALITY_LOW
wxPRINT_QUALITY_DRAFT = wxc.wxPRINT_QUALITY_DRAFT
+wxID_ANY = wxc.wxID_ANY
+wxID_SEPARATOR = wxc.wxID_SEPARATOR
wxID_OPEN = wxc.wxID_OPEN
wxID_CLOSE = wxc.wxID_CLOSE
wxID_NEW = wxc.wxID_NEW
wxMM_ANISOTROPIC = wxc.wxMM_ANISOTROPIC
wxMM_POINTS = wxc.wxMM_POINTS
wxMM_METRIC = wxc.wxMM_METRIC
+wxTIMER_CONTINUOUS = wxc.wxTIMER_CONTINUOUS
+wxTIMER_ONE_SHOT = wxc.wxTIMER_ONE_SHOT
+wxMOUSE_BTN_ANY = wxc.wxMOUSE_BTN_ANY
+wxMOUSE_BTN_NONE = wxc.wxMOUSE_BTN_NONE
+wxMOUSE_BTN_LEFT = wxc.wxMOUSE_BTN_LEFT
+wxMOUSE_BTN_MIDDLE = wxc.wxMOUSE_BTN_MIDDLE
+wxMOUSE_BTN_RIGHT = wxc.wxMOUSE_BTN_RIGHT
wxBORDER_DEFAULT = wxc.wxBORDER_DEFAULT
wxBORDER_NONE = wxc.wxBORDER_NONE
wxBORDER_STATIC = wxc.wxBORDER_STATIC
wxEVT_SCROLL_PAGEDOWN = wxc.wxEVT_SCROLL_PAGEDOWN
wxEVT_SCROLL_THUMBTRACK = wxc.wxEVT_SCROLL_THUMBTRACK
wxEVT_SCROLL_THUMBRELEASE = wxc.wxEVT_SCROLL_THUMBRELEASE
+wxEVT_SCROLL_ENDSCROLL = wxc.wxEVT_SCROLL_ENDSCROLL
wxEVT_SCROLLWIN_TOP = wxc.wxEVT_SCROLLWIN_TOP
wxEVT_SCROLLWIN_BOTTOM = wxc.wxEVT_SCROLLWIN_BOTTOM
wxEVT_SCROLLWIN_LINEUP = wxc.wxEVT_SCROLLWIN_LINEUP
# Scrolling
def EVT_SCROLL(win, func):
- win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
- win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
- win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
- win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
- win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
- win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
- win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK,func)
+ win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_BOTTOM, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_LINEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_LINEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_PAGEUP, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_PAGEDOWN, func)
+ win.Connect(-1, -1, wxEVT_SCROLL_THUMBTRACK, func)
win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE,func)
+ win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
def EVT_SCROLL_TOP(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_TOP, func)
def EVT_SCROLL_THUMBRELEASE(win, func):
win.Connect(-1, -1, wxEVT_SCROLL_THUMBRELEASE, func)
+def EVT_SCROLL_ENDSCROLL(win, func):
+ win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
+
# Scrolling, with an id
win.Connect(id, -1, wxEVT_SCROLL_PAGEDOWN, func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBTRACK,func)
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE,func)
+ win.Connect(-1, -1, wxEVT_SCROLL_ENDSCROLL, func)
def EVT_COMMAND_SCROLL_TOP(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_TOP, func)
def EVT_COMMAND_SCROLL_THUMBRELEASE(win, id, func):
win.Connect(id, -1, wxEVT_SCROLL_THUMBRELEASE, func)
+def EVT_COMMAND_SCROLL_ENDSCROLL(win, id, func):
+ win.Connect(id, -1, wxEVT_SCROLL_ENDSCROLL, func)
+
#---
def EVT_SCROLLWIN(win, func):
win.Connect(-1, -1, wxEVT_SCROLLWIN_TOP, func)
#----------------------------------------------------------------------------
+_wxCallAfterId = None
+
+def wxCallAfter(callable, *args, **kw):
+ """
+ Call the specified function after the current and pending event
+ handlers have been completed. This is also good for making GUI
+ method calls from non-GUI threads.
+ """
+ app = wxGetApp()
+ assert app, 'No wxApp created yet'
+
+ global _wxCallAfterId
+ if _wxCallAfterId is None:
+ _wxCallAfterId = wxNewId()
+ app.Connect(-1, -1, _wxCallAfterId,
+ lambda event: apply(event.callable, event.args, event.kw) )
+ evt = wxPyEvent()
+ evt.SetEventType(_wxCallAfterId)
+ evt.callable = callable
+ evt.args = args
+ evt.kw = kw
+ wxPostEvent(app, evt)
+
+#----------------------------------------------------------------------
class wxPyDeadObjectError(AttributeError):
pass
def __init__(self, flag=0):
wxApp.__init__(self, flag)
def OnInit(self):
+ wxInitAllImageHandlers()
return true