]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/mac/wx.py
Delete help text entry before adding new one, else
[wxWidgets.git] / wxPython / src / mac / wx.py
index f1bb17fd52f790bb43e4e7eeb23d8eda9891e51b..d44a968b403480bdeba8c3e08eec0ceb0fb56408 100644 (file)
@@ -344,6 +344,8 @@ wxPRINT_QUALITY_HIGH = wxc.wxPRINT_QUALITY_HIGH
 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
@@ -461,6 +463,13 @@ wxMM_ISOTROPIC = wxc.wxMM_ISOTROPIC
 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
@@ -1563,6 +1572,30 @@ def wxPyTypeCast(obj, typeStr):
 
 
 #----------------------------------------------------------------------------
+_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