wxSB_VERTICAL = wxc.wxSB_VERTICAL
wxST_SIZEGRIP = wxc.wxST_SIZEGRIP
wxST_NO_AUTORESIZE = wxc.wxST_NO_AUTORESIZE
-wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
wxBU_NOAUTODRAW = wxc.wxBU_NOAUTODRAW
+wxBU_AUTODRAW = wxc.wxBU_AUTODRAW
+wxBU_LEFT = wxc.wxBU_LEFT
+wxBU_TOP = wxc.wxBU_TOP
+wxBU_RIGHT = wxc.wxBU_RIGHT
+wxBU_BOTTOM = wxc.wxBU_BOTTOM
+wxBU_EXACTFIT = wxc.wxBU_EXACTFIT
wxSP_VERTICAL = wxc.wxSP_VERTICAL
wxSP_HORIZONTAL = wxc.wxSP_HORIZONTAL
wxSP_ARROW_KEYS = wxc.wxSP_ARROW_KEYS
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_NC_LEFT_DCLICK = wxc.wxEVT_NC_LEFT_DCLICK
wxEVT_NC_MIDDLE_DCLICK = wxc.wxEVT_NC_MIDDLE_DCLICK
wxEVT_NC_RIGHT_DCLICK = wxc.wxEVT_NC_RIGHT_DCLICK
+wxEVT_SET_CURSOR = wxc.wxEVT_SET_CURSOR
wxEVT_CHAR = wxc.wxEVT_CHAR
wxEVT_KEY_DOWN = wxc.wxEVT_KEY_DOWN
wxEVT_KEY_UP = wxc.wxEVT_KEY_UP
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
def EVT_WINDOW_DESTROY(win, func):
win.Connect(-1, -1, wxEVT_DESTROY, func)
+def EVT_SET_CURSOR(win, func):
+ win.Connect(-1, -1, wxEVT_SET_CURSOR, func)
+
def EVT_IDLE(win, func):
# 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