wxTreeEvent::Clone() support [patch #1061198].

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2004-11-10 19:24:22 +00:00
parent 2549081bd9
commit 0cd936a4fb
2 changed files with 15 additions and 1 deletions

View File

@ -244,6 +244,9 @@ class WXDLLEXPORT wxTreeEvent : public wxNotifyEvent
{
public:
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
wxTreeEvent(const wxTreeEvent & event);
virtual wxEvent *Clone() const { return new wxTreeEvent(*this); }
// accessors
// get the item on which the operation was performed or the newly
@ -294,7 +297,7 @@ private:
friend class WXDLLEXPORT wxTreeCtrl;
friend class WXDLLEXPORT wxGenericTreeCtrl;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxTreeEvent)
DECLARE_DYNAMIC_CLASS(wxTreeEvent)
};
typedef void (wxEvtHandler::*wxTreeEventFunction)(wxTreeEvent&);

View File

@ -78,5 +78,16 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
m_editCancelled = false;
}
wxTreeEvent::wxTreeEvent(const wxTreeEvent & event)
: wxNotifyEvent(event)
{
m_evtKey = event.m_evtKey;
m_item = event.m_item;
m_itemOld = event.m_itemOld;
m_pointDrag = event.m_pointDrag;
m_label = event.m_label;
m_editCancelled = event.m_editCancelled;
}
#endif // wxUSE_TREECTRL