1. wxHtmlHelpController and related classes
2. the C++ versions of wxSizer and firends, Python versions are 'depreciated' 3. wxPyEvent and wxPyCommandEvent, event classes that can carry some python objects through the event system and safely come back out again. 4. wxGridSizer and wxFlexGridSizer 5. wxValidator 6. wxPyOnDemandOutputWindow 7. several tweaks, fixes and additions of missing methods, etc. 8. and probably several other things I am forgetting since CVS was down so long... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -147,6 +147,21 @@ public:
|
||||
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
// class wxNavigationKeyEvent : public wxCommandEvent {
|
||||
// public:
|
||||
// wxNavigationKeyEvent();
|
||||
|
||||
// bool GetDirection();
|
||||
// void SetDirection(bool bForward);
|
||||
// bool IsWindowChange();
|
||||
// void SetWindowChange(bool bIs);
|
||||
// wxWindow* GetCurrentFocus();
|
||||
// void SetCurrentFocus(wxWindow *win);
|
||||
// };
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxMoveEvent: public wxEvent {
|
||||
@@ -298,18 +313,6 @@ public:
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxPyEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxPyEvent(wxEventType commandType = wxEVT_NULL, PyObject* userData = Py_None);
|
||||
~wxPyEvent();
|
||||
|
||||
void SetUserData(PyObject* userData);
|
||||
PyObject* GetUserData();
|
||||
};
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
class wxNotifyEvent : public wxCommandEvent {
|
||||
public:
|
||||
@@ -317,6 +320,124 @@ public:
|
||||
void Veto();
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
// This one can be derived from in Python and passed through the event
|
||||
// system without loosing anything so long as the Python data is saved with
|
||||
// SetPyData...
|
||||
|
||||
%{
|
||||
class wxPyEvent : public wxEvent {
|
||||
DECLARE_DYNAMIC_CLASS(wxPyEvent)
|
||||
public:
|
||||
wxPyEvent(int id=0, PyObject* userData = Py_None)
|
||||
: wxEvent(id) {
|
||||
m_userData = userData;
|
||||
Py_INCREF(m_userData);
|
||||
}
|
||||
|
||||
~wxPyEvent() {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_userData);
|
||||
wxPySaveThread(doSave);
|
||||
}
|
||||
|
||||
void SetPyData(PyObject* userData) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_userData);
|
||||
m_userData = userData;
|
||||
Py_INCREF(m_userData);
|
||||
wxPySaveThread(doSave);
|
||||
}
|
||||
|
||||
PyObject* GetPyData() const {
|
||||
Py_INCREF(m_userData);
|
||||
return m_userData;
|
||||
}
|
||||
|
||||
// This one is so the event object can be Cloned...
|
||||
void CopyObject(wxObject& dest) const {
|
||||
wxEvent::CopyObject(dest);
|
||||
((wxPyEvent*)&dest)->SetPyData(m_userData);
|
||||
}
|
||||
|
||||
private:
|
||||
PyObject* m_userData;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPyEvent, wxEvent)
|
||||
|
||||
%}
|
||||
|
||||
|
||||
class wxPyEvent : public wxEvent {
|
||||
public:
|
||||
wxPyEvent(int id=0, PyObject* userData = Py_None);
|
||||
~wxPyEvent();
|
||||
|
||||
void SetPyData(PyObject* userData);
|
||||
PyObject* GetPyData();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Same for this one except it is a wxCommandEvent and so will get passed up the
|
||||
// containment heirarchy.
|
||||
|
||||
%{
|
||||
class wxPyCommandEvent : public wxCommandEvent {
|
||||
DECLARE_DYNAMIC_CLASS(wxPyCommandEvent)
|
||||
public:
|
||||
wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0, PyObject* userData = Py_None)
|
||||
: wxCommandEvent(commandType, id) {
|
||||
m_userData = userData;
|
||||
Py_INCREF(m_userData);
|
||||
}
|
||||
|
||||
~wxPyCommandEvent() {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_userData);
|
||||
wxPySaveThread(doSave);
|
||||
}
|
||||
|
||||
void SetPyData(PyObject* userData) {
|
||||
bool doSave = wxPyRestoreThread();
|
||||
Py_DECREF(m_userData);
|
||||
m_userData = userData;
|
||||
Py_INCREF(m_userData);
|
||||
wxPySaveThread(doSave);
|
||||
}
|
||||
|
||||
PyObject* GetPyData() const {
|
||||
Py_INCREF(m_userData);
|
||||
return m_userData;
|
||||
}
|
||||
|
||||
// This one is so the event object can be Cloned...
|
||||
void CopyObject(wxObject& dest) const {
|
||||
wxCommandEvent::CopyObject(dest);
|
||||
((wxPyCommandEvent*)&dest)->SetPyData(m_userData);
|
||||
}
|
||||
|
||||
private:
|
||||
PyObject* m_userData;
|
||||
};
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxPyCommandEvent, wxCommandEvent)
|
||||
|
||||
%}
|
||||
|
||||
|
||||
class wxPyCommandEvent : public wxCommandEvent {
|
||||
public:
|
||||
wxPyCommandEvent(wxEventType commandType = wxEVT_NULL, int id=0, PyObject* userData = Py_None);
|
||||
~wxPyCommandEvent();
|
||||
|
||||
void SetPyData(PyObject* userData);
|
||||
PyObject* GetPyData();
|
||||
};
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
|
Reference in New Issue
Block a user