mirror of
https://github.com/wxWidgets/Phoenix.git
synced 2026-01-04 19:10:09 +01:00
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@66393 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2282 lines
54 KiB
Plaintext
2282 lines
54 KiB
Plaintext
//---------------------------------------------------------------------------
|
|
// This file is generated by wxPython's SIP generator. Do not edit by hand.
|
|
//
|
|
// Copyright: (c) 2010 by Total Control Software
|
|
// License: wxWindows License
|
|
//
|
|
// This file will be included by _core.sip
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
%ModuleCode
|
|
|
|
#if !wxUSE_HOTKEY
|
|
#define wxEVT_HOTKEY 0
|
|
#endif
|
|
|
|
%End
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
class wxEvtHandler : wxObject, wxTrackable
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
%TypeCode
|
|
|
|
class wxPyCallback : public wxEvtHandler {
|
|
DECLARE_ABSTRACT_CLASS(wxPyCallback)
|
|
public:
|
|
wxPyCallback(PyObject* func);
|
|
wxPyCallback(const wxPyCallback& other);
|
|
~wxPyCallback();
|
|
|
|
void EventThunker(wxEvent& event);
|
|
|
|
PyObject* m_func;
|
|
};
|
|
|
|
|
|
|
|
IMPLEMENT_ABSTRACT_CLASS(wxPyCallback, wxEvtHandler);
|
|
|
|
wxPyCallback::wxPyCallback(PyObject* func) {
|
|
m_func = func;
|
|
Py_INCREF(m_func);
|
|
}
|
|
|
|
wxPyCallback::wxPyCallback(const wxPyCallback& other) {
|
|
m_func = other.m_func;
|
|
Py_INCREF(m_func);
|
|
}
|
|
|
|
wxPyCallback::~wxPyCallback() {
|
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
|
Py_DECREF(m_func);
|
|
wxPyEndBlockThreads(blocked);
|
|
}
|
|
|
|
|
|
// #define wxPy_PRECALLINIT "_preCallInit"
|
|
// #define wxPy_POSTCALLCLEANUP "_postCallCleanup"
|
|
|
|
// This function is used for all events destined for Python event handlers.
|
|
void wxPyCallback::EventThunker(wxEvent& event) {
|
|
wxPyCallback* cb = (wxPyCallback*)event.m_callbackUserData;
|
|
PyObject* func = cb->m_func;
|
|
PyObject* result;
|
|
PyObject* arg;
|
|
PyObject* tuple;
|
|
bool checkSkip = false;
|
|
|
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
|
wxString className = event.GetClassInfo()->GetClassName();
|
|
|
|
// // If the event is one of these types then pass the original
|
|
// // event object instead of the one passed to us.
|
|
// if ( className == wxT("wxPyEvent") ) {
|
|
// arg = ((wxPyEvent*)&event)->GetSelf();
|
|
// checkSkip = ((wxPyEvent*)&event)->GetCloned();
|
|
// }
|
|
// else if ( className == wxT("wxPyCommandEvent") ) {
|
|
// arg = ((wxPyCommandEvent*)&event)->GetSelf();
|
|
// checkSkip = ((wxPyCommandEvent*)&event)->GetCloned();
|
|
// }
|
|
// else {
|
|
arg = wxPyConstructObject((void*)&event, className);
|
|
// }
|
|
|
|
|
|
if (!arg) {
|
|
PyErr_Print();
|
|
} else {
|
|
// // "intern" the pre/post method names to speed up the HasAttr
|
|
// static PyObject* s_preName = NULL;
|
|
// static PyObject* s_postName = NULL;
|
|
// if (s_preName == NULL) {
|
|
// s_preName = PyString_FromString(wxPy_PRECALLINIT);
|
|
// s_postName = PyString_FromString(wxPy_POSTCALLCLEANUP);
|
|
// }
|
|
|
|
// // Check if the event object needs some preinitialization
|
|
// if (PyObject_HasAttr(arg, s_preName)) {
|
|
// result = PyObject_CallMethodObjArgs(arg, s_preName, arg, NULL);
|
|
// if ( result ) {
|
|
// Py_DECREF(result); // result is ignored, but we still need to decref it
|
|
// PyErr_Clear(); // Just in case...
|
|
// } else {
|
|
// PyErr_Print();
|
|
// }
|
|
// }
|
|
|
|
// Call the event handler, passing the event object
|
|
tuple = PyTuple_New(1);
|
|
PyTuple_SET_ITEM(tuple, 0, arg); // steals ref to arg
|
|
result = PyEval_CallObject(func, tuple);
|
|
if ( result ) {
|
|
Py_DECREF(result); // result is ignored, but we still need to decref it
|
|
PyErr_Clear(); // Just in case...
|
|
} else {
|
|
PyErr_Print();
|
|
}
|
|
|
|
// // Check if the event object needs some post cleanup
|
|
// if (PyObject_HasAttr(arg, s_postName)) {
|
|
// result = PyObject_CallMethodObjArgs(arg, s_postName, arg, NULL);
|
|
// if ( result ) {
|
|
// Py_DECREF(result); // result is ignored, but we still need to decref it
|
|
// PyErr_Clear(); // Just in case...
|
|
// } else {
|
|
// PyErr_Print();
|
|
// }
|
|
// }
|
|
|
|
// if ( checkSkip ) {
|
|
// // if the event object was one of our special types and
|
|
// // it had been cloned, then we need to extract the Skipped
|
|
// // value from the original and set it in the clone.
|
|
// result = PyObject_CallMethod(arg, "GetSkipped", "");
|
|
// if ( result ) {
|
|
// event.Skip(PyInt_AsLong(result));
|
|
// Py_DECREF(result);
|
|
// } else {
|
|
// PyErr_Print();
|
|
// }
|
|
// }
|
|
Py_DECREF(tuple);
|
|
}
|
|
wxPyEndBlockThreads(blocked);
|
|
}
|
|
%End
|
|
|
|
public:
|
|
wxEvtHandler();
|
|
|
|
~wxEvtHandler();
|
|
|
|
void QueueEvent(
|
|
wxEvent * event
|
|
);
|
|
|
|
void AddPendingEvent(
|
|
const wxEvent & event
|
|
);
|
|
|
|
virtual
|
|
bool ProcessEvent(
|
|
wxEvent & event
|
|
);
|
|
|
|
bool ProcessEventLocally(
|
|
wxEvent & event
|
|
);
|
|
|
|
bool SafelyProcessEvent(
|
|
wxEvent & event
|
|
);
|
|
|
|
void ProcessPendingEvents();
|
|
|
|
void DeletePendingEvents();
|
|
|
|
bool GetEvtHandlerEnabled();
|
|
|
|
wxEvtHandler * GetNextHandler();
|
|
|
|
wxEvtHandler * GetPreviousHandler();
|
|
|
|
void SetEvtHandlerEnabled(
|
|
bool enabled
|
|
);
|
|
|
|
void SetNextHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
void SetPreviousHandler(
|
|
wxEvtHandler * handler
|
|
);
|
|
|
|
void Unlink();
|
|
|
|
bool IsUnlinked();
|
|
|
|
private:
|
|
wxEvtHandler(const wxEvtHandler&);
|
|
|
|
|
|
public:
|
|
|
|
|
|
%TypeCode
|
|
void _wxEvtHandler_Connect(wxEvtHandler* self, int& _isErr, int id, int lastId, wxEventType eventType, PyObject* func)
|
|
{
|
|
if (PyCallable_Check(func)) {
|
|
self->Connect(id, lastId, eventType,
|
|
(wxObjectEventFunction)(wxEventFunction)
|
|
&wxPyCallback::EventThunker,
|
|
new wxPyCallback(func));
|
|
}
|
|
else if (func == Py_None) {
|
|
self->Disconnect(id, lastId, eventType,
|
|
(wxObjectEventFunction)(wxEventFunction)
|
|
&wxPyCallback::EventThunker);
|
|
}
|
|
else {
|
|
_isErr = 1;
|
|
PyErr_SetString(PyExc_TypeError, "Expected callable object or None.");
|
|
}
|
|
}
|
|
%End
|
|
void Connect(int id, int lastId, wxEventType eventType, SIP_PYOBJECT func);
|
|
%MethodCode
|
|
_wxEvtHandler_Connect(sipCpp, sipIsErr, id, lastId, eventType, func);
|
|
%End
|
|
|
|
%TypeCode
|
|
bool _wxEvtHandler_Disconnect(wxEvtHandler* self, int& _isErr, int id, int lastId, wxEventType eventType, PyObject* func)
|
|
{
|
|
if (func && func != Py_None) {
|
|
// Find the current matching binder that has this function
|
|
// pointer and dissconnect that one. Unfortuneatly since we
|
|
// wrapped the PyObject function pointer in another object we
|
|
// have to do the searching ourselves...
|
|
wxList::compatibility_iterator node = self->GetDynamicEventTable()->GetFirst();
|
|
while (node)
|
|
{
|
|
wxDynamicEventTableEntry *entry = (wxDynamicEventTableEntry*)node->GetData();
|
|
if ((entry->m_id == id) &&
|
|
((entry->m_lastId == lastId) || (lastId == wxID_ANY)) &&
|
|
((entry->m_eventType == eventType) || (eventType == wxEVT_NULL)) &&
|
|
// FIXME?
|
|
//((entry->m_fn->IsMatching((wxObjectEventFunction)(wxEventFunction)&wxPyCallback::EventThunker))) &&
|
|
(entry->m_callbackUserData != NULL))
|
|
{
|
|
wxPyCallback *cb = (wxPyCallback*)entry->m_callbackUserData;
|
|
wxPyBlock_t blocked = wxPyBeginBlockThreads();
|
|
int result = PyObject_Compare(cb->m_func, func);
|
|
wxPyEndBlockThreads(blocked);
|
|
if (result == 0) {
|
|
delete cb;
|
|
self->GetDynamicEventTable()->Erase(node);
|
|
delete entry;
|
|
return true;
|
|
}
|
|
}
|
|
node = node->GetNext();
|
|
}
|
|
return false;
|
|
}
|
|
else {
|
|
return self->Disconnect(id, lastId, eventType,
|
|
(wxObjectEventFunction)
|
|
&wxPyCallback::EventThunker);
|
|
}
|
|
}
|
|
%End
|
|
bool Disconnect(int id, int lastId=-1, wxEventType eventType=wxEVT_NULL, SIP_PYOBJECT func=NULL);
|
|
%MethodCode
|
|
sipRes = _wxEvtHandler_Disconnect(sipCpp, sipIsErr, id, lastId, eventType, func);
|
|
%End
|
|
|
|
}; // end of class wxEvtHandler
|
|
|
|
|
|
class wxEventBlocker : wxEvtHandler
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxEventBlocker(
|
|
wxWindow * win,
|
|
wxEventType type = -1
|
|
);
|
|
|
|
virtual
|
|
~wxEventBlocker();
|
|
|
|
void Block(
|
|
wxEventType eventType
|
|
);
|
|
|
|
}; // end of class wxEventBlocker
|
|
|
|
|
|
class wxEvent : wxObject /Abstract/
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxEvent(
|
|
int id = 0,
|
|
wxEventType eventType = wxEVT_NULL
|
|
);
|
|
|
|
virtual
|
|
wxEvent * Clone() = 0 /Factory/;
|
|
|
|
wxObject * GetEventObject();
|
|
|
|
wxEventType GetEventType();
|
|
|
|
virtual
|
|
wxEventCategory GetEventCategory();
|
|
|
|
int GetId();
|
|
|
|
bool GetSkipped();
|
|
|
|
long GetTimestamp();
|
|
|
|
bool IsCommandEvent();
|
|
|
|
void ResumePropagation(
|
|
int propagationLevel
|
|
);
|
|
|
|
void SetEventObject(
|
|
wxObject * object
|
|
);
|
|
|
|
void SetEventType(
|
|
wxEventType type
|
|
);
|
|
|
|
void SetId(
|
|
int id
|
|
);
|
|
|
|
void SetTimestamp(
|
|
long timeStamp = 0
|
|
);
|
|
|
|
bool ShouldPropagate();
|
|
|
|
void Skip(
|
|
bool skip = true
|
|
);
|
|
|
|
int StopPropagation();
|
|
|
|
%Property(name=EventObject, get=GetEventObject, set=SetEventObject)
|
|
%Property(name=EventType, get=GetEventType, set=SetEventType)
|
|
%Property(name=Id, get=GetId, set=SetId)
|
|
%Property(name=Skipped, get=GetSkipped)
|
|
%Property(name=Timestamp, get=GetTimestamp, set=SetTimestamp)
|
|
private:
|
|
wxEvent& operator=(const wxEvent&);
|
|
|
|
|
|
}; // end of class wxEvent
|
|
|
|
|
|
class wxCommandEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxCommandEvent(
|
|
wxEventType commandEventType = wxEVT_NULL,
|
|
int id = 0
|
|
);
|
|
|
|
long GetExtraLong();
|
|
|
|
int GetInt();
|
|
|
|
int GetSelection();
|
|
|
|
wxString GetString();
|
|
|
|
bool IsChecked();
|
|
|
|
bool IsSelection();
|
|
|
|
void SetExtraLong(
|
|
long extraLong
|
|
);
|
|
|
|
void SetInt(
|
|
int intCommand
|
|
);
|
|
|
|
void SetString(
|
|
const wxString & string
|
|
);
|
|
|
|
%TypeCode
|
|
PyObject* _wxCommandEvent_GetClientData(wxCommandEvent* self, int& _isErr)
|
|
{
|
|
wxPyClientData* data = (wxPyClientData*)self->GetClientObject();
|
|
if (data) {
|
|
Py_INCREF(data->m_obj);
|
|
return data->m_obj;
|
|
} else {
|
|
Py_INCREF(Py_None);
|
|
return Py_None;
|
|
}
|
|
}
|
|
%End
|
|
SIP_PYOBJECT GetClientData();
|
|
%MethodCode
|
|
sipRes = _wxCommandEvent_GetClientData(sipCpp, sipIsErr);
|
|
%End
|
|
|
|
%TypeCode
|
|
void _wxCommandEvent_SetClientData(wxCommandEvent* self, int& _isErr, PyObject* clientData)
|
|
{
|
|
wxPyClientData* data = new wxPyClientData(clientData);
|
|
self->SetClientObject(data);
|
|
}
|
|
%End
|
|
void SetClientData(SIP_PYOBJECT clientData);
|
|
%MethodCode
|
|
_wxCommandEvent_SetClientData(sipCpp, sipIsErr, clientData);
|
|
%End
|
|
|
|
%Property(name=ClientData, get=GetClientData, set=SetClientData)
|
|
%Property(name=ExtraLong, get=GetExtraLong, set=SetExtraLong)
|
|
%Property(name=Int, get=GetInt, set=SetInt)
|
|
%Property(name=Selection, get=GetSelection)
|
|
%Property(name=String, get=GetString, set=SetString)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxCommandEvent& operator=(const wxCommandEvent&);
|
|
|
|
|
|
}; // end of class wxCommandEvent
|
|
|
|
|
|
class wxActivateEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxActivateEvent(
|
|
wxEventType eventType = wxEVT_NULL,
|
|
bool active = true,
|
|
int id = 0
|
|
);
|
|
|
|
bool GetActive();
|
|
|
|
%Property(name=Active, get=GetActive)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxActivateEvent& operator=(const wxActivateEvent&);
|
|
|
|
|
|
}; // end of class wxActivateEvent
|
|
|
|
|
|
class wxChildFocusEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxChildFocusEvent(
|
|
wxWindow * win = NULL
|
|
);
|
|
|
|
wxWindow * GetWindow();
|
|
|
|
%Property(name=Window, get=GetWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxChildFocusEvent& operator=(const wxChildFocusEvent&);
|
|
|
|
|
|
}; // end of class wxChildFocusEvent
|
|
|
|
|
|
class wxClipboardTextEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxClipboardTextEvent(
|
|
wxEventType commandType = wxEVT_NULL,
|
|
int id = 0
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxClipboardTextEvent& operator=(const wxClipboardTextEvent&);
|
|
|
|
|
|
}; // end of class wxClipboardTextEvent
|
|
|
|
|
|
class wxCloseEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxCloseEvent(
|
|
wxEventType commandEventType = wxEVT_NULL,
|
|
int id = 0
|
|
);
|
|
|
|
bool CanVeto();
|
|
|
|
bool GetLoggingOff();
|
|
|
|
void SetCanVeto(
|
|
bool canVeto
|
|
);
|
|
|
|
void SetLoggingOff(
|
|
bool loggingOff
|
|
);
|
|
|
|
void Veto(
|
|
bool veto = true
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxCloseEvent& operator=(const wxCloseEvent&);
|
|
|
|
|
|
}; // end of class wxCloseEvent
|
|
|
|
|
|
class wxContextMenuEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxContextMenuEvent(
|
|
wxEventType type = wxEVT_NULL,
|
|
int id = 0,
|
|
const wxPoint & pos = wxDefaultPosition
|
|
);
|
|
|
|
const wxPoint & GetPosition();
|
|
|
|
void SetPosition(
|
|
const wxPoint & point
|
|
);
|
|
|
|
%Property(name=Position, get=GetPosition, set=SetPosition)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxContextMenuEvent& operator=(const wxContextMenuEvent&);
|
|
|
|
|
|
}; // end of class wxContextMenuEvent
|
|
|
|
|
|
class wxDisplayChangedEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxDisplayChangedEvent();
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxDisplayChangedEvent& operator=(const wxDisplayChangedEvent&);
|
|
|
|
|
|
}; // end of class wxDisplayChangedEvent
|
|
|
|
|
|
class wxDropFilesEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxDropFilesEvent(
|
|
wxEventType id = 0,
|
|
int noFiles = 0,
|
|
wxString * files = NULL
|
|
);
|
|
|
|
wxString * GetFiles();
|
|
|
|
int GetNumberOfFiles();
|
|
|
|
wxPoint GetPosition();
|
|
|
|
%Property(name=Files, get=GetFiles)
|
|
%Property(name=NumberOfFiles, get=GetNumberOfFiles)
|
|
%Property(name=Position, get=GetPosition)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxDropFilesEvent& operator=(const wxDropFilesEvent&);
|
|
|
|
|
|
}; // end of class wxDropFilesEvent
|
|
|
|
|
|
class wxEraseEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxEraseEvent(
|
|
int id = 0,
|
|
wxDC * dc = NULL
|
|
);
|
|
|
|
wxDC * GetDC();
|
|
|
|
%Property(name=DC, get=GetDC)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxEraseEvent& operator=(const wxEraseEvent&);
|
|
|
|
|
|
}; // end of class wxEraseEvent
|
|
|
|
|
|
class wxFocusEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxFocusEvent(
|
|
wxEventType eventType = wxEVT_NULL,
|
|
int id = 0
|
|
);
|
|
|
|
wxWindow * GetWindow();
|
|
|
|
void SetWindow(
|
|
wxWindow * win
|
|
);
|
|
|
|
%Property(name=Window, get=GetWindow, set=SetWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxFocusEvent& operator=(const wxFocusEvent&);
|
|
|
|
|
|
}; // end of class wxFocusEvent
|
|
|
|
|
|
class wxHelpEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxHelpEvent(
|
|
wxEventType type = wxEVT_NULL,
|
|
wxWindowID winid = 0,
|
|
const wxPoint & pt = wxDefaultPosition,
|
|
wxHelpEvent::Origin origin = Origin_Unknown
|
|
);
|
|
|
|
enum Origin
|
|
{
|
|
Origin_Unknown,
|
|
Origin_Keyboard,
|
|
Origin_HelpButton
|
|
};
|
|
|
|
wxHelpEvent::Origin GetOrigin();
|
|
|
|
const wxPoint & GetPosition();
|
|
|
|
void SetOrigin(
|
|
wxHelpEvent::Origin origin
|
|
);
|
|
|
|
void SetPosition(
|
|
const wxPoint & pt
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxHelpEvent& operator=(const wxHelpEvent&);
|
|
|
|
|
|
}; // end of class wxHelpEvent
|
|
|
|
|
|
class wxIconizeEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxIconizeEvent(
|
|
int id = 0,
|
|
bool iconized = true
|
|
);
|
|
|
|
bool IsIconized();
|
|
|
|
bool Iconized() /Deprecated/;
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxIconizeEvent& operator=(const wxIconizeEvent&);
|
|
|
|
|
|
}; // end of class wxIconizeEvent
|
|
|
|
|
|
class wxIdleEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxIdleEvent();
|
|
|
|
bool MoreRequested();
|
|
|
|
void RequestMore(
|
|
bool needMore = true
|
|
);
|
|
|
|
static
|
|
wxIdleMode GetMode();
|
|
|
|
static
|
|
void SetMode(
|
|
wxIdleMode mode
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxIdleEvent& operator=(const wxIdleEvent&);
|
|
|
|
|
|
}; // end of class wxIdleEvent
|
|
|
|
|
|
class wxInitDialogEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxInitDialogEvent(
|
|
int id = 0
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxInitDialogEvent& operator=(const wxInitDialogEvent&);
|
|
|
|
|
|
}; // end of class wxInitDialogEvent
|
|
|
|
|
|
class wxJoystickEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxJoystickEvent(
|
|
wxEventType eventType = wxEVT_NULL,
|
|
int state = 0,
|
|
int joystick = wxJOYSTICK1,
|
|
int change = 0
|
|
);
|
|
|
|
bool ButtonDown(
|
|
int button = wxJOY_BUTTON_ANY
|
|
);
|
|
|
|
bool ButtonIsDown(
|
|
int button = wxJOY_BUTTON_ANY
|
|
);
|
|
|
|
bool ButtonUp(
|
|
int button = wxJOY_BUTTON_ANY
|
|
);
|
|
|
|
int GetButtonChange();
|
|
|
|
int GetButtonState();
|
|
|
|
int GetJoystick();
|
|
|
|
wxPoint GetPosition();
|
|
|
|
int GetZPosition();
|
|
|
|
bool IsButton();
|
|
|
|
bool IsMove();
|
|
|
|
bool IsZMove();
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxJoystickEvent& operator=(const wxJoystickEvent&);
|
|
|
|
|
|
}; // end of class wxJoystickEvent
|
|
|
|
|
|
class wxKeyEvent : wxEvent, wxKeyboardState
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxKeyEvent(
|
|
wxEventType keyEventType = wxEVT_NULL
|
|
);
|
|
|
|
wxPoint GetPosition();
|
|
|
|
int GetKeyCode();
|
|
|
|
bool IsKeyInCategory(
|
|
int category
|
|
);
|
|
|
|
wxUint32 GetRawKeyCode();
|
|
|
|
wxUint32 GetRawKeyFlags();
|
|
|
|
wxChar GetUnicodeKey();
|
|
|
|
wxCoord GetX();
|
|
|
|
wxCoord GetY();
|
|
|
|
%Property(name=X, get=GetX)
|
|
%Property(name=Y, get=GetY)
|
|
%Property(name=KeyCode, get=GetKeyCode)
|
|
%Property(name=Position, get=GetPosition)
|
|
%Property(name=RawKeyCode, get=GetRawKeyCode)
|
|
%Property(name=RawKeyFlags, get=GetRawKeyFlags)
|
|
%Property(name=UnicodeKey, get=GetUnicodeKey)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxKeyEvent& operator=(const wxKeyEvent&);
|
|
|
|
|
|
}; // end of class wxKeyEvent
|
|
|
|
|
|
class wxMaximizeEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMaximizeEvent(
|
|
int id = 0
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMaximizeEvent& operator=(const wxMaximizeEvent&);
|
|
|
|
|
|
}; // end of class wxMaximizeEvent
|
|
|
|
|
|
class wxMenuEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMenuEvent(
|
|
wxEventType type = wxEVT_NULL,
|
|
int id = 0,
|
|
wxMenu * menu = NULL
|
|
);
|
|
|
|
wxMenu * GetMenu();
|
|
|
|
int GetMenuId();
|
|
|
|
bool IsPopup();
|
|
|
|
%Property(name=Menu, get=GetMenu)
|
|
%Property(name=MenuId, get=GetMenuId)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMenuEvent& operator=(const wxMenuEvent&);
|
|
|
|
|
|
}; // end of class wxMenuEvent
|
|
|
|
|
|
class wxMouseCaptureChangedEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMouseCaptureChangedEvent(
|
|
wxWindowID windowId = 0,
|
|
wxWindow * gainedCapture = NULL
|
|
);
|
|
|
|
wxWindow * GetCapturedWindow();
|
|
|
|
%Property(name=CapturedWindow, get=GetCapturedWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMouseCaptureChangedEvent& operator=(const wxMouseCaptureChangedEvent&);
|
|
|
|
|
|
}; // end of class wxMouseCaptureChangedEvent
|
|
|
|
|
|
class wxMouseCaptureLostEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMouseCaptureLostEvent(
|
|
wxWindowID windowId = 0
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMouseCaptureLostEvent& operator=(const wxMouseCaptureLostEvent&);
|
|
|
|
|
|
}; // end of class wxMouseCaptureLostEvent
|
|
|
|
|
|
class wxMouseEvent : wxEvent, wxMouseState
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMouseEvent(
|
|
wxEventType mouseEventType = wxEVT_NULL
|
|
);
|
|
|
|
bool Aux1DClick();
|
|
|
|
bool Aux1Down();
|
|
|
|
bool Aux1Up();
|
|
|
|
bool Aux2DClick();
|
|
|
|
bool Aux2Down();
|
|
|
|
bool Aux2Up();
|
|
|
|
bool Button(
|
|
wxMouseButton but
|
|
);
|
|
|
|
bool ButtonDClick(
|
|
wxMouseButton but = wxMOUSE_BTN_ANY
|
|
);
|
|
|
|
bool ButtonDown(
|
|
wxMouseButton but = wxMOUSE_BTN_ANY
|
|
);
|
|
|
|
bool ButtonUp(
|
|
wxMouseButton but = wxMOUSE_BTN_ANY
|
|
);
|
|
|
|
bool Dragging();
|
|
|
|
bool Entering();
|
|
|
|
int GetButton();
|
|
|
|
int GetClickCount();
|
|
|
|
int GetLinesPerAction();
|
|
|
|
wxPoint GetLogicalPosition(
|
|
const wxDC & dc
|
|
);
|
|
|
|
int GetWheelDelta();
|
|
|
|
int GetWheelRotation();
|
|
|
|
int GetWheelAxis();
|
|
|
|
bool IsButton();
|
|
|
|
bool IsPageScroll();
|
|
|
|
bool Leaving();
|
|
|
|
bool LeftDClick();
|
|
|
|
bool LeftDown();
|
|
|
|
bool LeftUp();
|
|
|
|
bool MetaDown();
|
|
|
|
bool MiddleDClick();
|
|
|
|
bool MiddleDown();
|
|
|
|
bool MiddleUp();
|
|
|
|
bool Moving();
|
|
|
|
bool RightDClick();
|
|
|
|
bool RightDown();
|
|
|
|
bool RightUp();
|
|
|
|
%Property(name=LinesPerAction, get=GetLinesPerAction)
|
|
%Property(name=LogicalPosition, get=GetLogicalPosition)
|
|
%Property(name=WheelDelta, get=GetWheelDelta)
|
|
%Property(name=WheelRotation, get=GetWheelRotation)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMouseEvent& operator=(const wxMouseEvent&);
|
|
|
|
|
|
}; // end of class wxMouseEvent
|
|
|
|
|
|
class wxMoveEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxMoveEvent(
|
|
const wxPoint & pt,
|
|
int id = 0
|
|
);
|
|
|
|
wxPoint GetPosition();
|
|
|
|
wxRect GetRect();
|
|
|
|
void SetRect(
|
|
const wxRect & rect
|
|
);
|
|
|
|
void SetPosition(
|
|
const wxPoint & pos
|
|
);
|
|
|
|
%Property(name=Rect, get=GetRect, set=SetRect)
|
|
%Property(name=Position, get=GetPosition, set=SetPosition)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxMoveEvent& operator=(const wxMoveEvent&);
|
|
|
|
|
|
}; // end of class wxMoveEvent
|
|
|
|
|
|
class wxNavigationKeyEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxNavigationKeyEvent();
|
|
|
|
wxNavigationKeyEvent(
|
|
const wxNavigationKeyEvent & event
|
|
);
|
|
|
|
enum wxNavigationKeyEventFlags
|
|
{
|
|
IsBackward,
|
|
IsForward,
|
|
WinChange,
|
|
FromTab
|
|
};
|
|
|
|
wxWindow * GetCurrentFocus();
|
|
|
|
bool GetDirection();
|
|
|
|
bool IsFromTab();
|
|
|
|
bool IsWindowChange();
|
|
|
|
void SetCurrentFocus(
|
|
wxWindow * currentFocus
|
|
);
|
|
|
|
void SetDirection(
|
|
bool direction
|
|
);
|
|
|
|
void SetFlags(
|
|
long flags
|
|
);
|
|
|
|
void SetFromTab(
|
|
bool fromTab
|
|
);
|
|
|
|
void SetWindowChange(
|
|
bool windowChange
|
|
);
|
|
|
|
%Property(name=CurrentFocus, get=GetCurrentFocus, set=SetCurrentFocus)
|
|
%Property(name=Direction, get=GetDirection, set=SetDirection)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxNavigationKeyEvent& operator=(const wxNavigationKeyEvent&);
|
|
|
|
|
|
}; // end of class wxNavigationKeyEvent
|
|
|
|
|
|
class wxNotifyEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxNotifyEvent(
|
|
wxEventType eventType = wxEVT_NULL,
|
|
int id = 0
|
|
);
|
|
|
|
void Allow();
|
|
|
|
bool IsAllowed();
|
|
|
|
void Veto();
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxNotifyEvent& operator=(const wxNotifyEvent&);
|
|
|
|
|
|
}; // end of class wxNotifyEvent
|
|
|
|
|
|
class wxPaintEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxPaintEvent(
|
|
int id = 0
|
|
);
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxPaintEvent& operator=(const wxPaintEvent&);
|
|
|
|
|
|
}; // end of class wxPaintEvent
|
|
|
|
|
|
class wxPaletteChangedEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxPaletteChangedEvent(
|
|
wxWindowID winid = 0
|
|
);
|
|
|
|
void SetChangedWindow(
|
|
wxWindow * win
|
|
);
|
|
|
|
wxWindow * GetChangedWindow();
|
|
|
|
%Property(name=ChangedWindow, get=GetChangedWindow, set=SetChangedWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxPaletteChangedEvent& operator=(const wxPaletteChangedEvent&);
|
|
|
|
|
|
}; // end of class wxPaletteChangedEvent
|
|
|
|
|
|
class wxQueryNewPaletteEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxQueryNewPaletteEvent(
|
|
wxWindowID winid = 0
|
|
);
|
|
|
|
void SetPaletteRealized(
|
|
bool realized
|
|
);
|
|
|
|
bool GetPaletteRealized();
|
|
|
|
%Property(name=PaletteRealized, get=GetPaletteRealized, set=SetPaletteRealized)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxQueryNewPaletteEvent& operator=(const wxQueryNewPaletteEvent&);
|
|
|
|
|
|
}; // end of class wxQueryNewPaletteEvent
|
|
|
|
|
|
class wxScrollEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxScrollEvent(
|
|
wxEventType commandType = wxEVT_NULL,
|
|
int id = 0,
|
|
int pos = 0,
|
|
int orientation = 0
|
|
);
|
|
|
|
int GetOrientation();
|
|
|
|
int GetPosition();
|
|
|
|
void SetOrientation(
|
|
int orient
|
|
);
|
|
|
|
void SetPosition(
|
|
int pos
|
|
);
|
|
|
|
%Property(name=Orientation, get=GetOrientation, set=SetOrientation)
|
|
%Property(name=Position, get=GetPosition, set=SetPosition)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxScrollEvent& operator=(const wxScrollEvent&);
|
|
|
|
|
|
}; // end of class wxScrollEvent
|
|
|
|
|
|
class wxScrollWinEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxScrollWinEvent(
|
|
wxEventType commandType = wxEVT_NULL,
|
|
int pos = 0,
|
|
int orientation = 0
|
|
);
|
|
|
|
int GetOrientation();
|
|
|
|
int GetPosition();
|
|
|
|
void SetOrientation(
|
|
int orient
|
|
);
|
|
|
|
void SetPosition(
|
|
int pos
|
|
);
|
|
|
|
%Property(name=Orientation, get=GetOrientation, set=SetOrientation)
|
|
%Property(name=Position, get=GetPosition, set=SetPosition)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxScrollWinEvent& operator=(const wxScrollWinEvent&);
|
|
|
|
|
|
}; // end of class wxScrollWinEvent
|
|
|
|
|
|
class wxSetCursorEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxSetCursorEvent(
|
|
wxCoord x = 0,
|
|
wxCoord y = 0
|
|
);
|
|
|
|
const wxCursor & GetCursor();
|
|
|
|
wxCoord GetX();
|
|
|
|
wxCoord GetY();
|
|
|
|
bool HasCursor();
|
|
|
|
void SetCursor(
|
|
const wxCursor & cursor
|
|
);
|
|
|
|
%Property(name=Cursor, get=GetCursor, set=SetCursor)
|
|
%Property(name=X, get=GetX)
|
|
%Property(name=Y, get=GetY)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxSetCursorEvent& operator=(const wxSetCursorEvent&);
|
|
|
|
|
|
}; // end of class wxSetCursorEvent
|
|
|
|
|
|
class wxShowEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxShowEvent(
|
|
int winid = 0,
|
|
bool show = false
|
|
);
|
|
|
|
void SetShow(
|
|
bool show
|
|
);
|
|
|
|
bool IsShown();
|
|
|
|
%Property(name=Show, get=IsShown, set=SetShow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxShowEvent& operator=(const wxShowEvent&);
|
|
|
|
|
|
}; // end of class wxShowEvent
|
|
|
|
|
|
class wxSizeEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxSizeEvent(
|
|
const wxSize & sz,
|
|
int id = 0
|
|
);
|
|
|
|
wxSize GetSize();
|
|
|
|
void SetSize(
|
|
wxSize size
|
|
);
|
|
|
|
wxRect GetRect();
|
|
|
|
void SetRect(
|
|
wxRect rect
|
|
);
|
|
|
|
%Property(name=Rect, get=GetRect, set=SetRect)
|
|
%Property(name=Size, get=GetSize, set=SetSize)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxSizeEvent& operator=(const wxSizeEvent&);
|
|
|
|
|
|
}; // end of class wxSizeEvent
|
|
|
|
|
|
class wxSysColourChangedEvent : wxEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxSysColourChangedEvent();
|
|
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxSysColourChangedEvent& operator=(const wxSysColourChangedEvent&);
|
|
|
|
|
|
}; // end of class wxSysColourChangedEvent
|
|
|
|
|
|
class wxUpdateUIEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxUpdateUIEvent(
|
|
wxWindowID commandId = 0
|
|
);
|
|
|
|
void Check(
|
|
bool check
|
|
);
|
|
|
|
void Enable(
|
|
bool enable
|
|
);
|
|
|
|
bool GetChecked();
|
|
|
|
bool GetEnabled();
|
|
|
|
bool GetSetChecked();
|
|
|
|
bool GetSetEnabled();
|
|
|
|
bool GetSetShown();
|
|
|
|
bool GetSetText();
|
|
|
|
bool GetShown();
|
|
|
|
wxString GetText();
|
|
|
|
void SetText(
|
|
const wxString & text
|
|
);
|
|
|
|
void Show(
|
|
bool show
|
|
);
|
|
|
|
static
|
|
bool CanUpdate(
|
|
wxWindow * window
|
|
);
|
|
|
|
static
|
|
wxUpdateUIMode GetMode();
|
|
|
|
static
|
|
long GetUpdateInterval();
|
|
|
|
static
|
|
void ResetUpdateTime();
|
|
|
|
static
|
|
void SetMode(
|
|
wxUpdateUIMode mode
|
|
);
|
|
|
|
static
|
|
void SetUpdateInterval(
|
|
long updateInterval
|
|
);
|
|
|
|
%Property(name=Checked, get=GetChecked, set=Check)
|
|
%Property(name=Enabled, get=GetEnabled, set=Enable)
|
|
%Property(name=Shown, get=GetShown, set=Show)
|
|
%Property(name=Text, get=GetText, set=SetText)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxUpdateUIEvent& operator=(const wxUpdateUIEvent&);
|
|
|
|
|
|
}; // end of class wxUpdateUIEvent
|
|
|
|
|
|
class wxWindowCreateEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxWindowCreateEvent(
|
|
wxWindow * win = NULL
|
|
);
|
|
|
|
wxWindow * GetWindow();
|
|
|
|
%Property(name=Window, get=GetWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxWindowCreateEvent& operator=(const wxWindowCreateEvent&);
|
|
|
|
|
|
}; // end of class wxWindowCreateEvent
|
|
|
|
|
|
class wxWindowDestroyEvent : wxCommandEvent
|
|
{
|
|
%TypeHeaderCode
|
|
#include <wx/event.h>
|
|
%End
|
|
|
|
|
|
public:
|
|
wxWindowDestroyEvent(
|
|
wxWindow * win = NULL
|
|
);
|
|
|
|
wxWindow * GetWindow();
|
|
|
|
%Property(name=Window, get=GetWindow)
|
|
virtual wxEvent* Clone();
|
|
|
|
|
|
private:
|
|
wxWindowDestroyEvent& operator=(const wxWindowDestroyEvent&);
|
|
|
|
|
|
}; // end of class wxWindowDestroyEvent
|
|
|
|
|
|
enum wxEventPropagation
|
|
{
|
|
wxEVENT_PROPAGATE_NONE,
|
|
wxEVENT_PROPAGATE_MAX
|
|
};
|
|
|
|
enum wxEventCategory
|
|
{
|
|
wxEVT_CATEGORY_UI /PyName=wxEVT_CATEGORY_UI/,
|
|
wxEVT_CATEGORY_USER_INPUT /PyName=wxEVT_CATEGORY_USER_INPUT/,
|
|
wxEVT_CATEGORY_SOCKET /PyName=wxEVT_CATEGORY_SOCKET/,
|
|
wxEVT_CATEGORY_TIMER /PyName=wxEVT_CATEGORY_TIMER/,
|
|
wxEVT_CATEGORY_THREAD /PyName=wxEVT_CATEGORY_THREAD/,
|
|
wxEVT_CATEGORY_ALL /PyName=wxEVT_CATEGORY_ALL/
|
|
};
|
|
|
|
enum wxKeyCategoryFlags
|
|
{
|
|
WXK_CATEGORY_ARROW,
|
|
WXK_CATEGORY_PAGING,
|
|
WXK_CATEGORY_JUMP,
|
|
WXK_CATEGORY_TAB,
|
|
WXK_CATEGORY_CUT,
|
|
WXK_CATEGORY_NAVIGATION
|
|
};
|
|
|
|
enum wxUpdateUIMode
|
|
{
|
|
wxUPDATE_UI_PROCESS_ALL,
|
|
wxUPDATE_UI_PROCESS_SPECIFIED
|
|
};
|
|
|
|
enum wxIdleMode
|
|
{
|
|
wxIDLE_PROCESS_ALL,
|
|
wxIDLE_PROCESS_SPECIFIED
|
|
};
|
|
|
|
typedef int wxEventType;
|
|
|
|
wxEventType wxEVT_NULL /PyName=wxEVT_NULL/;
|
|
|
|
wxEventType wxEVT_ANY /PyName=wxEVT_ANY/;
|
|
|
|
wxEventType wxEVT_COMMAND_BUTTON_CLICKED /PyName=wxEVT_COMMAND_BUTTON_CLICKED/;
|
|
|
|
wxEventType wxEVT_COMMAND_CHECKBOX_CLICKED /PyName=wxEVT_COMMAND_CHECKBOX_CLICKED/;
|
|
|
|
wxEventType wxEVT_COMMAND_CHOICE_SELECTED /PyName=wxEVT_COMMAND_CHOICE_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_LISTBOX_SELECTED /PyName=wxEVT_COMMAND_LISTBOX_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_LISTBOX_DOUBLECLICKED /PyName=wxEVT_COMMAND_LISTBOX_DOUBLECLICKED/;
|
|
|
|
wxEventType wxEVT_COMMAND_CHECKLISTBOX_TOGGLED /PyName=wxEVT_COMMAND_CHECKLISTBOX_TOGGLED/;
|
|
|
|
wxEventType wxEVT_COMMAND_MENU_SELECTED /PyName=wxEVT_COMMAND_MENU_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_SLIDER_UPDATED /PyName=wxEVT_COMMAND_SLIDER_UPDATED/;
|
|
|
|
wxEventType wxEVT_COMMAND_RADIOBOX_SELECTED /PyName=wxEVT_COMMAND_RADIOBOX_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_RADIOBUTTON_SELECTED /PyName=wxEVT_COMMAND_RADIOBUTTON_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_SCROLLBAR_UPDATED /PyName=wxEVT_COMMAND_SCROLLBAR_UPDATED/;
|
|
|
|
wxEventType wxEVT_COMMAND_VLBOX_SELECTED /PyName=wxEVT_COMMAND_VLBOX_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_COMBOBOX_SELECTED /PyName=wxEVT_COMMAND_COMBOBOX_SELECTED/;
|
|
|
|
wxEventType wxEVT_COMMAND_TOOL_RCLICKED /PyName=wxEVT_COMMAND_TOOL_RCLICKED/;
|
|
|
|
wxEventType wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED /PyName=wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED/;
|
|
|
|
wxEventType wxEVT_COMMAND_TOOL_ENTER /PyName=wxEVT_COMMAND_TOOL_ENTER/;
|
|
|
|
wxEventType wxEVT_COMMAND_COMBOBOX_DROPDOWN /PyName=wxEVT_COMMAND_COMBOBOX_DROPDOWN/;
|
|
|
|
wxEventType wxEVT_COMMAND_COMBOBOX_CLOSEUP /PyName=wxEVT_COMMAND_COMBOBOX_CLOSEUP/;
|
|
|
|
wxEventType wxEVT_COMMAND_THREAD /PyName=wxEVT_COMMAND_THREAD/;
|
|
|
|
wxEventType wxEVT_LEFT_DOWN /PyName=wxEVT_LEFT_DOWN/;
|
|
|
|
wxEventType wxEVT_LEFT_UP /PyName=wxEVT_LEFT_UP/;
|
|
|
|
wxEventType wxEVT_MIDDLE_DOWN /PyName=wxEVT_MIDDLE_DOWN/;
|
|
|
|
wxEventType wxEVT_MIDDLE_UP /PyName=wxEVT_MIDDLE_UP/;
|
|
|
|
wxEventType wxEVT_RIGHT_DOWN /PyName=wxEVT_RIGHT_DOWN/;
|
|
|
|
wxEventType wxEVT_RIGHT_UP /PyName=wxEVT_RIGHT_UP/;
|
|
|
|
wxEventType wxEVT_MOTION /PyName=wxEVT_MOTION/;
|
|
|
|
wxEventType wxEVT_ENTER_WINDOW /PyName=wxEVT_ENTER_WINDOW/;
|
|
|
|
wxEventType wxEVT_LEAVE_WINDOW /PyName=wxEVT_LEAVE_WINDOW/;
|
|
|
|
wxEventType wxEVT_LEFT_DCLICK /PyName=wxEVT_LEFT_DCLICK/;
|
|
|
|
wxEventType wxEVT_MIDDLE_DCLICK /PyName=wxEVT_MIDDLE_DCLICK/;
|
|
|
|
wxEventType wxEVT_RIGHT_DCLICK /PyName=wxEVT_RIGHT_DCLICK/;
|
|
|
|
wxEventType wxEVT_SET_FOCUS /PyName=wxEVT_SET_FOCUS/;
|
|
|
|
wxEventType wxEVT_KILL_FOCUS /PyName=wxEVT_KILL_FOCUS/;
|
|
|
|
wxEventType wxEVT_CHILD_FOCUS /PyName=wxEVT_CHILD_FOCUS/;
|
|
|
|
wxEventType wxEVT_MOUSEWHEEL /PyName=wxEVT_MOUSEWHEEL/;
|
|
|
|
wxEventType wxEVT_AUX1_DOWN /PyName=wxEVT_AUX1_DOWN/;
|
|
|
|
wxEventType wxEVT_AUX1_UP /PyName=wxEVT_AUX1_UP/;
|
|
|
|
wxEventType wxEVT_AUX1_DCLICK /PyName=wxEVT_AUX1_DCLICK/;
|
|
|
|
wxEventType wxEVT_AUX2_DOWN /PyName=wxEVT_AUX2_DOWN/;
|
|
|
|
wxEventType wxEVT_AUX2_UP /PyName=wxEVT_AUX2_UP/;
|
|
|
|
wxEventType wxEVT_AUX2_DCLICK /PyName=wxEVT_AUX2_DCLICK/;
|
|
|
|
wxEventType wxEVT_CHAR /PyName=wxEVT_CHAR/;
|
|
|
|
wxEventType wxEVT_CHAR_HOOK /PyName=wxEVT_CHAR_HOOK/;
|
|
|
|
wxEventType wxEVT_NAVIGATION_KEY /PyName=wxEVT_NAVIGATION_KEY/;
|
|
|
|
wxEventType wxEVT_KEY_DOWN /PyName=wxEVT_KEY_DOWN/;
|
|
|
|
wxEventType wxEVT_KEY_UP /PyName=wxEVT_KEY_UP/;
|
|
|
|
wxEventType wxEVT_HOTKEY /PyName=wxEVT_HOTKEY/;
|
|
|
|
wxEventType wxEVT_SET_CURSOR /PyName=wxEVT_SET_CURSOR/;
|
|
|
|
wxEventType wxEVT_SCROLL_TOP /PyName=wxEVT_SCROLL_TOP/;
|
|
|
|
wxEventType wxEVT_SCROLL_BOTTOM /PyName=wxEVT_SCROLL_BOTTOM/;
|
|
|
|
wxEventType wxEVT_SCROLL_LINEUP /PyName=wxEVT_SCROLL_LINEUP/;
|
|
|
|
wxEventType wxEVT_SCROLL_LINEDOWN /PyName=wxEVT_SCROLL_LINEDOWN/;
|
|
|
|
wxEventType wxEVT_SCROLL_PAGEUP /PyName=wxEVT_SCROLL_PAGEUP/;
|
|
|
|
wxEventType wxEVT_SCROLL_PAGEDOWN /PyName=wxEVT_SCROLL_PAGEDOWN/;
|
|
|
|
wxEventType wxEVT_SCROLL_THUMBTRACK /PyName=wxEVT_SCROLL_THUMBTRACK/;
|
|
|
|
wxEventType wxEVT_SCROLL_THUMBRELEASE /PyName=wxEVT_SCROLL_THUMBRELEASE/;
|
|
|
|
wxEventType wxEVT_SCROLL_CHANGED /PyName=wxEVT_SCROLL_CHANGED/;
|
|
|
|
wxEventType wxEVT_SPIN_UP /PyName=wxEVT_SPIN_UP/;
|
|
|
|
wxEventType wxEVT_SPIN_DOWN /PyName=wxEVT_SPIN_DOWN/;
|
|
|
|
wxEventType wxEVT_SPIN /PyName=wxEVT_SPIN/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_TOP /PyName=wxEVT_SCROLLWIN_TOP/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_BOTTOM /PyName=wxEVT_SCROLLWIN_BOTTOM/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_LINEUP /PyName=wxEVT_SCROLLWIN_LINEUP/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_LINEDOWN /PyName=wxEVT_SCROLLWIN_LINEDOWN/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_PAGEUP /PyName=wxEVT_SCROLLWIN_PAGEUP/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_PAGEDOWN /PyName=wxEVT_SCROLLWIN_PAGEDOWN/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_THUMBTRACK /PyName=wxEVT_SCROLLWIN_THUMBTRACK/;
|
|
|
|
wxEventType wxEVT_SCROLLWIN_THUMBRELEASE /PyName=wxEVT_SCROLLWIN_THUMBRELEASE/;
|
|
|
|
wxEventType wxEVT_SIZE /PyName=wxEVT_SIZE/;
|
|
|
|
wxEventType wxEVT_MOVE /PyName=wxEVT_MOVE/;
|
|
|
|
wxEventType wxEVT_CLOSE_WINDOW /PyName=wxEVT_CLOSE_WINDOW/;
|
|
|
|
wxEventType wxEVT_END_SESSION /PyName=wxEVT_END_SESSION/;
|
|
|
|
wxEventType wxEVT_QUERY_END_SESSION /PyName=wxEVT_QUERY_END_SESSION/;
|
|
|
|
wxEventType wxEVT_ACTIVATE_APP /PyName=wxEVT_ACTIVATE_APP/;
|
|
|
|
wxEventType wxEVT_ACTIVATE /PyName=wxEVT_ACTIVATE/;
|
|
|
|
wxEventType wxEVT_CREATE /PyName=wxEVT_CREATE/;
|
|
|
|
wxEventType wxEVT_DESTROY /PyName=wxEVT_DESTROY/;
|
|
|
|
wxEventType wxEVT_SHOW /PyName=wxEVT_SHOW/;
|
|
|
|
wxEventType wxEVT_ICONIZE /PyName=wxEVT_ICONIZE/;
|
|
|
|
wxEventType wxEVT_MAXIMIZE /PyName=wxEVT_MAXIMIZE/;
|
|
|
|
wxEventType wxEVT_MOUSE_CAPTURE_CHANGED /PyName=wxEVT_MOUSE_CAPTURE_CHANGED/;
|
|
|
|
wxEventType wxEVT_MOUSE_CAPTURE_LOST /PyName=wxEVT_MOUSE_CAPTURE_LOST/;
|
|
|
|
wxEventType wxEVT_PAINT /PyName=wxEVT_PAINT/;
|
|
|
|
wxEventType wxEVT_ERASE_BACKGROUND /PyName=wxEVT_ERASE_BACKGROUND/;
|
|
|
|
wxEventType wxEVT_NC_PAINT /PyName=wxEVT_NC_PAINT/;
|
|
|
|
wxEventType wxEVT_MENU_OPEN /PyName=wxEVT_MENU_OPEN/;
|
|
|
|
wxEventType wxEVT_MENU_CLOSE /PyName=wxEVT_MENU_CLOSE/;
|
|
|
|
wxEventType wxEVT_MENU_HIGHLIGHT /PyName=wxEVT_MENU_HIGHLIGHT/;
|
|
|
|
wxEventType wxEVT_CONTEXT_MENU /PyName=wxEVT_CONTEXT_MENU/;
|
|
|
|
wxEventType wxEVT_SYS_COLOUR_CHANGED /PyName=wxEVT_SYS_COLOUR_CHANGED/;
|
|
|
|
wxEventType wxEVT_DISPLAY_CHANGED /PyName=wxEVT_DISPLAY_CHANGED/;
|
|
|
|
wxEventType wxEVT_QUERY_NEW_PALETTE /PyName=wxEVT_QUERY_NEW_PALETTE/;
|
|
|
|
wxEventType wxEVT_PALETTE_CHANGED /PyName=wxEVT_PALETTE_CHANGED/;
|
|
|
|
wxEventType wxEVT_JOY_BUTTON_DOWN /PyName=wxEVT_JOY_BUTTON_DOWN/;
|
|
|
|
wxEventType wxEVT_JOY_BUTTON_UP /PyName=wxEVT_JOY_BUTTON_UP/;
|
|
|
|
wxEventType wxEVT_JOY_MOVE /PyName=wxEVT_JOY_MOVE/;
|
|
|
|
wxEventType wxEVT_JOY_ZMOVE /PyName=wxEVT_JOY_ZMOVE/;
|
|
|
|
wxEventType wxEVT_DROP_FILES /PyName=wxEVT_DROP_FILES/;
|
|
|
|
wxEventType wxEVT_INIT_DIALOG /PyName=wxEVT_INIT_DIALOG/;
|
|
|
|
wxEventType wxEVT_IDLE /PyName=wxEVT_IDLE/;
|
|
|
|
wxEventType wxEVT_UPDATE_UI /PyName=wxEVT_UPDATE_UI/;
|
|
|
|
wxEventType wxEVT_SIZING /PyName=wxEVT_SIZING/;
|
|
|
|
wxEventType wxEVT_MOVING /PyName=wxEVT_MOVING/;
|
|
|
|
wxEventType wxEVT_MOVE_START /PyName=wxEVT_MOVE_START/;
|
|
|
|
wxEventType wxEVT_MOVE_END /PyName=wxEVT_MOVE_END/;
|
|
|
|
wxEventType wxEVT_HIBERNATE /PyName=wxEVT_HIBERNATE/;
|
|
|
|
wxEventType wxEVT_COMMAND_TEXT_COPY /PyName=wxEVT_COMMAND_TEXT_COPY/;
|
|
|
|
wxEventType wxEVT_COMMAND_TEXT_CUT /PyName=wxEVT_COMMAND_TEXT_CUT/;
|
|
|
|
wxEventType wxEVT_COMMAND_TEXT_PASTE /PyName=wxEVT_COMMAND_TEXT_PASTE/;
|
|
|
|
wxEventType wxEVT_COMMAND_LEFT_CLICK /PyName=wxEVT_COMMAND_LEFT_CLICK/;
|
|
|
|
wxEventType wxEVT_COMMAND_LEFT_DCLICK /PyName=wxEVT_COMMAND_LEFT_DCLICK/;
|
|
|
|
wxEventType wxEVT_COMMAND_RIGHT_CLICK /PyName=wxEVT_COMMAND_RIGHT_CLICK/;
|
|
|
|
wxEventType wxEVT_COMMAND_RIGHT_DCLICK /PyName=wxEVT_COMMAND_RIGHT_DCLICK/;
|
|
|
|
wxEventType wxEVT_COMMAND_SET_FOCUS /PyName=wxEVT_COMMAND_SET_FOCUS/;
|
|
|
|
wxEventType wxEVT_COMMAND_KILL_FOCUS /PyName=wxEVT_COMMAND_KILL_FOCUS/;
|
|
|
|
wxEventType wxEVT_COMMAND_ENTER /PyName=wxEVT_COMMAND_ENTER/;
|
|
|
|
wxEventType wxEVT_HELP /PyName=wxEVT_HELP/;
|
|
|
|
wxEventType wxEVT_DETAILED_HELP /PyName=wxEVT_DETAILED_HELP/;
|
|
|
|
wxEventType wxEVT_COMMAND_TEXT_UPDATED /PyName=wxEVT_COMMAND_TEXT_UPDATED/;
|
|
|
|
wxEventType wxEVT_COMMAND_TOOL_CLICKED /PyName=wxEVT_COMMAND_TOOL_CLICKED/;
|
|
|
|
wxEventType wxNewEventType();
|
|
|
|
void wxPostEvent(
|
|
wxEvtHandler * dest,
|
|
const wxEvent & event
|
|
);
|
|
|
|
void wxQueueEvent(
|
|
wxEvtHandler * dest,
|
|
wxEvent * event
|
|
);
|
|
|
|
%Extract(id=pycode)
|
|
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
# This code block was included from src/event_ex.py
|
|
|
|
class PyEventBinder(object):
|
|
"""
|
|
Instances of this class are used to bind specific events to event
|
|
handlers.
|
|
"""
|
|
def __init__(self, evtType, expectedIDs=0):
|
|
if expectedIDs not in [0, 1, 2]:
|
|
raise ValueError, "Invalid number of expectedIDs"
|
|
self.expectedIDs = expectedIDs
|
|
|
|
if isinstance(evtType, (list, tuple)):
|
|
self.evtType = list(evtType)
|
|
else:
|
|
self.evtType = [evtType]
|
|
|
|
|
|
def Bind(self, target, id1, id2, function):
|
|
"""Bind this set of event types to target using its COnnect() method."""
|
|
for et in self.evtType:
|
|
target.Connect(id1, id2, et, function)
|
|
|
|
|
|
def Unbind(self, target, id1, id2, handler=None):
|
|
"""Remove an event binding."""
|
|
success = 0
|
|
for et in self.evtType:
|
|
success += target.Disconnect(id1, id2, et, handler)
|
|
return success != 0
|
|
|
|
|
|
def _getEvtType(self):
|
|
"""
|
|
Make it easy to get to the default wxEventType typeID for this
|
|
event binder.
|
|
"""
|
|
return self.evtType[0]
|
|
typeId = property(_getEvtType)
|
|
|
|
|
|
|
|
def _EvtHandler_Bind(self, event, handler, source=None, id=wx.ID_ANY, id2=wx.ID_ANY):
|
|
"""
|
|
Bind an event to an event handler.
|
|
|
|
:param event: One of the EVT_* objects that specifies the
|
|
type of event to bind,
|
|
|
|
:param handler: A callable object to be invoked when the
|
|
event is delivered to self. Pass None to
|
|
disconnect an event handler.
|
|
|
|
:param source: Sometimes the event originates from a
|
|
different window than self, but you still
|
|
want to catch it in self. (For example, a
|
|
button event delivered to a frame.) By
|
|
passing the source of the event, the event
|
|
handling system is able to differentiate
|
|
between the same event type from different
|
|
controls.
|
|
|
|
:param id: Used to spcify the event source by ID instead
|
|
of instance.
|
|
|
|
:param id2: Used when it is desirable to bind a handler
|
|
to a range of IDs, such as with EVT_MENU_RANGE.
|
|
"""
|
|
if source is not None:
|
|
id = source.GetId()
|
|
event.Bind(self, id, id2, handler)
|
|
|
|
|
|
def _EvtHandler_Unbind(self, event, source=None, id=wx.ID_ANY, id2=wx.ID_ANY, handler=None):
|
|
"""
|
|
Disconnects the event handler binding for event from self.
|
|
Returns True if successful.
|
|
"""
|
|
if source is not None:
|
|
id = source.GetId()
|
|
return event.Unbind(self, id, id2, handler)
|
|
|
|
|
|
EvtHandler.Bind = _EvtHandler_Bind
|
|
EvtHandler.Unbind = _EvtHandler_Unbind
|
|
del _EvtHandler_Bind, _EvtHandler_Unbind
|
|
|
|
|
|
# Create some event binders
|
|
EVT_SIZE = wx.PyEventBinder( wxEVT_SIZE )
|
|
EVT_SIZING = wx.PyEventBinder( wxEVT_SIZING )
|
|
EVT_MOVE = wx.PyEventBinder( wxEVT_MOVE )
|
|
EVT_MOVING = wx.PyEventBinder( wxEVT_MOVING )
|
|
EVT_MOVE_START = wx.PyEventBinder( wxEVT_MOVE_START )
|
|
EVT_MOVE_END = wx.PyEventBinder( wxEVT_MOVE_END )
|
|
EVT_CLOSE = wx.PyEventBinder( wxEVT_CLOSE_WINDOW )
|
|
EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
|
|
EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
|
|
EVT_PAINT = wx.PyEventBinder( wxEVT_PAINT )
|
|
EVT_NC_PAINT = wx.PyEventBinder( wxEVT_NC_PAINT )
|
|
EVT_ERASE_BACKGROUND = wx.PyEventBinder( wxEVT_ERASE_BACKGROUND )
|
|
EVT_CHAR = wx.PyEventBinder( wxEVT_CHAR )
|
|
EVT_KEY_DOWN = wx.PyEventBinder( wxEVT_KEY_DOWN )
|
|
EVT_KEY_UP = wx.PyEventBinder( wxEVT_KEY_UP )
|
|
EVT_HOTKEY = wx.PyEventBinder( wxEVT_HOTKEY, 1)
|
|
EVT_CHAR_HOOK = wx.PyEventBinder( wxEVT_CHAR_HOOK )
|
|
EVT_MENU_OPEN = wx.PyEventBinder( wxEVT_MENU_OPEN )
|
|
EVT_MENU_CLOSE = wx.PyEventBinder( wxEVT_MENU_CLOSE )
|
|
EVT_MENU_HIGHLIGHT = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT, 1)
|
|
EVT_MENU_HIGHLIGHT_ALL = wx.PyEventBinder( wxEVT_MENU_HIGHLIGHT )
|
|
EVT_SET_FOCUS = wx.PyEventBinder( wxEVT_SET_FOCUS )
|
|
EVT_KILL_FOCUS = wx.PyEventBinder( wxEVT_KILL_FOCUS )
|
|
EVT_CHILD_FOCUS = wx.PyEventBinder( wxEVT_CHILD_FOCUS )
|
|
EVT_ACTIVATE = wx.PyEventBinder( wxEVT_ACTIVATE )
|
|
EVT_ACTIVATE_APP = wx.PyEventBinder( wxEVT_ACTIVATE_APP )
|
|
EVT_HIBERNATE = wx.PyEventBinder( wxEVT_HIBERNATE )
|
|
EVT_END_SESSION = wx.PyEventBinder( wxEVT_END_SESSION )
|
|
EVT_QUERY_END_SESSION = wx.PyEventBinder( wxEVT_QUERY_END_SESSION )
|
|
EVT_DROP_FILES = wx.PyEventBinder( wxEVT_DROP_FILES )
|
|
EVT_INIT_DIALOG = wx.PyEventBinder( wxEVT_INIT_DIALOG )
|
|
EVT_SYS_COLOUR_CHANGED = wx.PyEventBinder( wxEVT_SYS_COLOUR_CHANGED )
|
|
EVT_DISPLAY_CHANGED = wx.PyEventBinder( wxEVT_DISPLAY_CHANGED )
|
|
EVT_SHOW = wx.PyEventBinder( wxEVT_SHOW )
|
|
EVT_MAXIMIZE = wx.PyEventBinder( wxEVT_MAXIMIZE )
|
|
EVT_ICONIZE = wx.PyEventBinder( wxEVT_ICONIZE )
|
|
EVT_NAVIGATION_KEY = wx.PyEventBinder( wxEVT_NAVIGATION_KEY )
|
|
EVT_PALETTE_CHANGED = wx.PyEventBinder( wxEVT_PALETTE_CHANGED )
|
|
EVT_QUERY_NEW_PALETTE = wx.PyEventBinder( wxEVT_QUERY_NEW_PALETTE )
|
|
EVT_WINDOW_CREATE = wx.PyEventBinder( wxEVT_CREATE )
|
|
EVT_WINDOW_DESTROY = wx.PyEventBinder( wxEVT_DESTROY )
|
|
EVT_SET_CURSOR = wx.PyEventBinder( wxEVT_SET_CURSOR )
|
|
EVT_MOUSE_CAPTURE_CHANGED = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_CHANGED )
|
|
EVT_MOUSE_CAPTURE_LOST = wx.PyEventBinder( wxEVT_MOUSE_CAPTURE_LOST )
|
|
|
|
EVT_LEFT_DOWN = wx.PyEventBinder( wxEVT_LEFT_DOWN )
|
|
EVT_LEFT_UP = wx.PyEventBinder( wxEVT_LEFT_UP )
|
|
EVT_MIDDLE_DOWN = wx.PyEventBinder( wxEVT_MIDDLE_DOWN )
|
|
EVT_MIDDLE_UP = wx.PyEventBinder( wxEVT_MIDDLE_UP )
|
|
EVT_RIGHT_DOWN = wx.PyEventBinder( wxEVT_RIGHT_DOWN )
|
|
EVT_RIGHT_UP = wx.PyEventBinder( wxEVT_RIGHT_UP )
|
|
EVT_MOTION = wx.PyEventBinder( wxEVT_MOTION )
|
|
EVT_LEFT_DCLICK = wx.PyEventBinder( wxEVT_LEFT_DCLICK )
|
|
EVT_MIDDLE_DCLICK = wx.PyEventBinder( wxEVT_MIDDLE_DCLICK )
|
|
EVT_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_RIGHT_DCLICK )
|
|
EVT_LEAVE_WINDOW = wx.PyEventBinder( wxEVT_LEAVE_WINDOW )
|
|
EVT_ENTER_WINDOW = wx.PyEventBinder( wxEVT_ENTER_WINDOW )
|
|
EVT_MOUSEWHEEL = wx.PyEventBinder( wxEVT_MOUSEWHEEL )
|
|
EVT_MOUSE_AUX1_DOWN = wx.PyEventBinder( wxEVT_AUX1_DOWN )
|
|
EVT_MOUSE_AUX1_UP = wx.PyEventBinder( wxEVT_AUX1_UP )
|
|
EVT_MOUSE_AUX1_DCLICK = wx.PyEventBinder( wxEVT_AUX1_DCLICK )
|
|
EVT_MOUSE_AUX2_DOWN = wx.PyEventBinder( wxEVT_AUX2_DOWN )
|
|
EVT_MOUSE_AUX2_UP = wx.PyEventBinder( wxEVT_AUX2_UP )
|
|
EVT_MOUSE_AUX2_DCLICK = wx.PyEventBinder( wxEVT_AUX2_DCLICK )
|
|
|
|
EVT_MOUSE_EVENTS = wx.PyEventBinder([ wxEVT_LEFT_DOWN,
|
|
wxEVT_LEFT_UP,
|
|
wxEVT_MIDDLE_DOWN,
|
|
wxEVT_MIDDLE_UP,
|
|
wxEVT_RIGHT_DOWN,
|
|
wxEVT_RIGHT_UP,
|
|
wxEVT_MOTION,
|
|
wxEVT_LEFT_DCLICK,
|
|
wxEVT_MIDDLE_DCLICK,
|
|
wxEVT_RIGHT_DCLICK,
|
|
wxEVT_ENTER_WINDOW,
|
|
wxEVT_LEAVE_WINDOW,
|
|
wxEVT_MOUSEWHEEL,
|
|
wxEVT_AUX1_DOWN,
|
|
wxEVT_AUX1_UP,
|
|
wxEVT_AUX1_DCLICK,
|
|
wxEVT_AUX2_DOWN,
|
|
wxEVT_AUX2_UP,
|
|
wxEVT_AUX2_DCLICK,
|
|
])
|
|
|
|
|
|
# Scrolling from wxWindow (sent to wxScrolledWindow)
|
|
EVT_SCROLLWIN = wx.PyEventBinder([ wxEVT_SCROLLWIN_TOP,
|
|
wxEVT_SCROLLWIN_BOTTOM,
|
|
wxEVT_SCROLLWIN_LINEUP,
|
|
wxEVT_SCROLLWIN_LINEDOWN,
|
|
wxEVT_SCROLLWIN_PAGEUP,
|
|
wxEVT_SCROLLWIN_PAGEDOWN,
|
|
wxEVT_SCROLLWIN_THUMBTRACK,
|
|
wxEVT_SCROLLWIN_THUMBRELEASE,
|
|
])
|
|
|
|
EVT_SCROLLWIN_TOP = wx.PyEventBinder( wxEVT_SCROLLWIN_TOP )
|
|
EVT_SCROLLWIN_BOTTOM = wx.PyEventBinder( wxEVT_SCROLLWIN_BOTTOM )
|
|
EVT_SCROLLWIN_LINEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEUP )
|
|
EVT_SCROLLWIN_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_LINEDOWN )
|
|
EVT_SCROLLWIN_PAGEUP = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEUP )
|
|
EVT_SCROLLWIN_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLLWIN_PAGEDOWN )
|
|
EVT_SCROLLWIN_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBTRACK )
|
|
EVT_SCROLLWIN_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLLWIN_THUMBRELEASE )
|
|
|
|
# Scrolling from wx.Slider and wx.ScrollBar
|
|
EVT_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
|
|
wxEVT_SCROLL_BOTTOM,
|
|
wxEVT_SCROLL_LINEUP,
|
|
wxEVT_SCROLL_LINEDOWN,
|
|
wxEVT_SCROLL_PAGEUP,
|
|
wxEVT_SCROLL_PAGEDOWN,
|
|
wxEVT_SCROLL_THUMBTRACK,
|
|
wxEVT_SCROLL_THUMBRELEASE,
|
|
wxEVT_SCROLL_CHANGED,
|
|
])
|
|
|
|
EVT_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP )
|
|
EVT_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM )
|
|
EVT_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP )
|
|
EVT_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN )
|
|
EVT_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP )
|
|
EVT_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN )
|
|
EVT_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK )
|
|
EVT_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE )
|
|
EVT_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED )
|
|
EVT_SCROLL_ENDSCROLL = EVT_SCROLL_CHANGED
|
|
|
|
# Scrolling from wx.Slider and wx.ScrollBar, with an id
|
|
EVT_COMMAND_SCROLL = wx.PyEventBinder([ wxEVT_SCROLL_TOP,
|
|
wxEVT_SCROLL_BOTTOM,
|
|
wxEVT_SCROLL_LINEUP,
|
|
wxEVT_SCROLL_LINEDOWN,
|
|
wxEVT_SCROLL_PAGEUP,
|
|
wxEVT_SCROLL_PAGEDOWN,
|
|
wxEVT_SCROLL_THUMBTRACK,
|
|
wxEVT_SCROLL_THUMBRELEASE,
|
|
wxEVT_SCROLL_CHANGED,
|
|
], 1)
|
|
|
|
EVT_COMMAND_SCROLL_TOP = wx.PyEventBinder( wxEVT_SCROLL_TOP, 1)
|
|
EVT_COMMAND_SCROLL_BOTTOM = wx.PyEventBinder( wxEVT_SCROLL_BOTTOM, 1)
|
|
EVT_COMMAND_SCROLL_LINEUP = wx.PyEventBinder( wxEVT_SCROLL_LINEUP, 1)
|
|
EVT_COMMAND_SCROLL_LINEDOWN = wx.PyEventBinder( wxEVT_SCROLL_LINEDOWN, 1)
|
|
EVT_COMMAND_SCROLL_PAGEUP = wx.PyEventBinder( wxEVT_SCROLL_PAGEUP, 1)
|
|
EVT_COMMAND_SCROLL_PAGEDOWN = wx.PyEventBinder( wxEVT_SCROLL_PAGEDOWN, 1)
|
|
EVT_COMMAND_SCROLL_THUMBTRACK = wx.PyEventBinder( wxEVT_SCROLL_THUMBTRACK, 1)
|
|
EVT_COMMAND_SCROLL_THUMBRELEASE = wx.PyEventBinder( wxEVT_SCROLL_THUMBRELEASE, 1)
|
|
EVT_COMMAND_SCROLL_CHANGED = wx.PyEventBinder( wxEVT_SCROLL_CHANGED, 1)
|
|
EVT_COMMAND_SCROLL_ENDSCROLL = EVT_COMMAND_SCROLL_CHANGED
|
|
|
|
EVT_BUTTON = wx.PyEventBinder( wxEVT_COMMAND_BUTTON_CLICKED, 1)
|
|
EVT_CHECKBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKBOX_CLICKED, 1)
|
|
EVT_CHOICE = wx.PyEventBinder( wxEVT_COMMAND_CHOICE_SELECTED, 1)
|
|
EVT_LISTBOX = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_SELECTED, 1)
|
|
EVT_LISTBOX_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, 1)
|
|
EVT_MENU = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 1)
|
|
EVT_MENU_RANGE = wx.PyEventBinder( wxEVT_COMMAND_MENU_SELECTED, 2)
|
|
EVT_SLIDER = wx.PyEventBinder( wxEVT_COMMAND_SLIDER_UPDATED, 1)
|
|
EVT_RADIOBOX = wx.PyEventBinder( wxEVT_COMMAND_RADIOBOX_SELECTED, 1)
|
|
EVT_RADIOBUTTON = wx.PyEventBinder( wxEVT_COMMAND_RADIOBUTTON_SELECTED, 1)
|
|
|
|
EVT_SCROLLBAR = wx.PyEventBinder( wxEVT_COMMAND_SCROLLBAR_UPDATED, 1)
|
|
EVT_VLBOX = wx.PyEventBinder( wxEVT_COMMAND_VLBOX_SELECTED, 1)
|
|
EVT_COMBOBOX = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_SELECTED, 1)
|
|
EVT_TOOL = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 1)
|
|
EVT_TOOL_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_CLICKED, 2)
|
|
EVT_TOOL_RCLICKED = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 1)
|
|
EVT_TOOL_RCLICKED_RANGE = wx.PyEventBinder( wxEVT_COMMAND_TOOL_RCLICKED, 2)
|
|
EVT_TOOL_ENTER = wx.PyEventBinder( wxEVT_COMMAND_TOOL_ENTER, 1)
|
|
EVT_TOOL_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_TOOL_DROPDOWN_CLICKED, 1)
|
|
EVT_CHECKLISTBOX = wx.PyEventBinder( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, 1)
|
|
EVT_COMBOBOX_DROPDOWN = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_DROPDOWN , 1)
|
|
EVT_COMBOBOX_CLOSEUP = wx.PyEventBinder( wxEVT_COMMAND_COMBOBOX_CLOSEUP , 1)
|
|
|
|
EVT_COMMAND_LEFT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_CLICK, 1)
|
|
EVT_COMMAND_LEFT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_LEFT_DCLICK, 1)
|
|
EVT_COMMAND_RIGHT_CLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_CLICK, 1)
|
|
EVT_COMMAND_RIGHT_DCLICK = wx.PyEventBinder( wxEVT_COMMAND_RIGHT_DCLICK, 1)
|
|
EVT_COMMAND_SET_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_SET_FOCUS, 1)
|
|
EVT_COMMAND_KILL_FOCUS = wx.PyEventBinder( wxEVT_COMMAND_KILL_FOCUS, 1)
|
|
EVT_COMMAND_ENTER = wx.PyEventBinder( wxEVT_COMMAND_ENTER, 1)
|
|
|
|
EVT_IDLE = wx.PyEventBinder( wxEVT_IDLE )
|
|
|
|
EVT_UPDATE_UI = wx.PyEventBinder( wxEVT_UPDATE_UI, 1)
|
|
EVT_UPDATE_UI_RANGE = wx.PyEventBinder( wxEVT_UPDATE_UI, 2)
|
|
|
|
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 )
|
|
|
|
EVT_THREAD = wx.PyEventBinder( wxEVT_COMMAND_THREAD )
|
|
|
|
# End of included code block
|
|
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
|
|
|
%End
|
|
|
|
|
|
//---------------------------------------------------------------------------
|
|
|