%constant wxEventType wxEVT_MOVING;
%constant wxEventType wxEVT_HIBERNATE;
+%constant wxEventType wxEVT_COMMAND_TEXT_COPY;
+%constant wxEventType wxEVT_COMMAND_TEXT_CUT;
+%constant wxEventType wxEVT_COMMAND_TEXT_PASTE;
+
// Generic command events
// Note: a click is a higher-level event than button down/up
EVT_CONTEXT_MENU = wx.PyEventBinder( wxEVT_CONTEXT_MENU )
+EVT_TEXT_CUT = wx.PyEventBinder( wxEVT_COMMAND_TEXT_CUT )
+EVT_TEXT_COPY = wx.PyEventBinder( wxEVT_COMMAND_TEXT_COPY )
+EVT_TEXT_PASTE = wx.PyEventBinder( wxEVT_COMMAND_TEXT_PASTE )
}
void SetInt(int i);
DocDeclStr(
- long , GetInt() const,
+ int , GetInt() const,
"Returns the integer identifier corresponding to a listbox, choice or
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;
};
};
+//---------------------------------------------------------------------------
+%newgroup;
+
+
+DocStr(wxClipboardTextEvent,
+"A Clipboard Text event is sent when a window intercepts a text
+copy/cut/paste message, i.e. the user has cut/copied/pasted data
+from/into a text control via ctrl-C/X/V, ctrl/shift-del/insert, a
+popup menu command, etc. NOTE : under windows these events are *NOT*
+generated automatically for a Rich Edit text control.", "");
+
+class wxClipboardTextEvent : public wxCommandEvent
+{
+public:
+ wxClipboardTextEvent(wxEventType type = wxEVT_NULL,
+ wxWindowID winid = 0);
+};
+
+
//---------------------------------------------------------------------------
%newgroup;