]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/src/_event.i
Sometimes we do need to allow recursion of callbacks
[wxWidgets.git] / wxPython / src / _event.i
index 3a0d4194e4515815b8104c2db6a3e86231b02b96..cc7db9582cbf1583177c8cf2cf8b8fb91cc53c87 100644 (file)
@@ -567,6 +567,32 @@ radiobox selection (only if the event was a selection, not a
 deselection), or a boolean value representing the value of a checkbox.", "");
     
 
+     %extend {
+        DocStr(GetClientData,
+               "Returns the client data object for a listbox or choice selection event, (if any.)", "");
+        PyObject* GetClientData() {
+            wxPyClientData* data = (wxPyClientData*)self->GetClientObject();
+            if (data) {
+                Py_INCREF(data->m_obj);
+                return data->m_obj;
+            } else {
+                Py_INCREF(Py_None);
+                return Py_None;
+            }
+        }
+
+        DocStr(SetClientData,
+               "Associate the given client data with the item at position n.", "");
+        void SetClientData(PyObject* clientData) {
+            wxPyClientData* data = new wxPyClientData(clientData);
+            self->SetClientObject(data);
+        }
+    }
+    %pythoncode {
+         GetClientObject = GetClientData
+         SetClientObject = SetClientData
+    }
+             
     virtual wxEvent *Clone() const;
 
 };
@@ -1937,7 +1963,11 @@ public:
     DocDeclStr(
         bool , GetEnabled() const,
         "Returns ``True`` if the UI element should be enabled.", "");
-    
+
+    DocDeclStr(
+        bool , GetShown() const,
+        "Returns ``True`` if the UI element should be shown.", "");
+        
     DocDeclStr(
         wxString , GetText() const,
         "Returns the text that should be set for the UI element.", "");
@@ -1957,7 +1987,11 @@ internal use only.", "");
         "Returns ``True`` if the application has called `Enable`. For wxWidgets
 internal use only.", "");
     
-
+    DocDeclStr(
+        bool , GetSetShown() const,
+        "Returns ``True`` if the application has called `Show`. For wxWidgets
+internal use only.", "");
+    
 
     DocDeclStr(
         void , Check(bool check),
@@ -1966,6 +2000,11 @@ internal use only.", "");
     DocDeclStr(
         void , Enable(bool enable),
         "Enable or disable the UI element.", "");
+
+    DocDeclStr(
+        void , Show(bool show),
+        "Show or hide the UI element.", "");
+    
     
     DocDeclStr(
         void , SetText(const wxString& text),