From b2f8e75a0aaa3a4f54599483cd1c67287b91ea29 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Thu, 10 Nov 2005 11:24:19 +0000 Subject: [PATCH] add Clone() to wxXXXbookEvent and copy ctor to wxBookCtrlBaseEvent git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36147 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/bookctrl.h | 15 +++++++++++---- include/wx/notebook.h | 9 ++++++++- include/wx/treebook.h | 9 ++++++++- 3 files changed, 27 insertions(+), 6 deletions(-) diff --git a/include/wx/bookctrl.h b/include/wx/bookctrl.h index 9b4f51632b..171366205f 100644 --- a/include/wx/bookctrl.h +++ b/include/wx/bookctrl.h @@ -249,10 +249,17 @@ public: wxBookCtrlBaseEvent(wxEventType commandType = wxEVT_NULL, int winid = 0, int nSel = -1, int nOldSel = -1) : wxNotifyEvent(commandType, winid) - { - m_nSel = nSel; - m_nOldSel = nOldSel; - } + { + m_nSel = nSel; + m_nOldSel = nOldSel; + } + + wxBookCtrlBaseEvent(const wxBookCtrlBaseEvent& event) + : wxNotifyEvent(event) + { + m_nSel = event.m_nSel; + m_nOldSel = event.m_nOldSel; + } // accessors // the currently selected page (-1 if none) diff --git a/include/wx/notebook.h b/include/wx/notebook.h index 74fcc220cc..7f6b719f63 100644 --- a/include/wx/notebook.h +++ b/include/wx/notebook.h @@ -115,8 +115,15 @@ public: { } + wxNotebookEvent(const wxNotebookEvent& event) + : wxBookCtrlBaseEvent(event) + { + } + + virtual wxEvent *Clone() const { return new wxNotebookEvent(*this); } + private: - DECLARE_DYNAMIC_CLASS_NO_COPY(wxNotebookEvent) + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxNotebookEvent) }; BEGIN_DECLARE_EVENT_TYPES() diff --git a/include/wx/treebook.h b/include/wx/treebook.h index 0b414e2ba9..fc3fa7731e 100644 --- a/include/wx/treebook.h +++ b/include/wx/treebook.h @@ -240,8 +240,15 @@ public: { } + wxTreebookEvent(const wxTreebookEvent& event) + : wxBookCtrlBaseEvent(event) + { + } + + virtual wxEvent *Clone() const { return new wxTreebookEvent(*this); } + private: - DECLARE_DYNAMIC_CLASS_NO_COPY(wxTreebookEvent) + DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTreebookEvent) }; extern WXDLLIMPEXP_CORE const wxEventType wxEVT_COMMAND_TREEBOOK_PAGE_CHANGED; -- 2.45.2