fix wxTimerEvent and wxTreeCtrl to use IMPLEMENT_DYNAMIC_CLASS macro
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57588 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -152,25 +152,27 @@ private:
|
|||||||
class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent
|
class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
wxTimerEvent()
|
||||||
|
: wxEvent(wxID_ANY, wxEVT_TIMER) { m_timer=NULL; }
|
||||||
|
|
||||||
wxTimerEvent(wxTimer& timer)
|
wxTimerEvent(wxTimer& timer)
|
||||||
: wxEvent(timer.GetId(), wxEVT_TIMER),
|
: wxEvent(timer.GetId(), wxEVT_TIMER),
|
||||||
m_timer(timer)
|
m_timer(&timer)
|
||||||
{
|
{
|
||||||
SetEventObject(timer.GetOwner());
|
SetEventObject(timer.GetOwner());
|
||||||
}
|
}
|
||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
int GetInterval() const { return m_timer.GetInterval(); }
|
int GetInterval() const { return m_timer->GetInterval(); }
|
||||||
wxTimer& GetTimer() const { return m_timer; }
|
wxTimer& GetTimer() const { return *m_timer; }
|
||||||
|
|
||||||
// implement the base class pure virtual
|
// implement the base class pure virtual
|
||||||
virtual wxEvent *Clone() const { return new wxTimerEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxTimerEvent(*this); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
wxTimer& m_timer;
|
wxTimer* m_timer;
|
||||||
|
|
||||||
DECLARE_ABSTRACT_CLASS(wxTimerEvent)
|
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTimerEvent)
|
||||||
DECLARE_NO_ASSIGN_CLASS(wxTimerEvent)
|
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
|
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
|
||||||
|
@@ -278,10 +278,10 @@ class WXDLLIMPEXP_FWD_CORE wxTreeCtrlBase;
|
|||||||
class WXDLLIMPEXP_CORE wxTreeEvent : public wxNotifyEvent
|
class WXDLLIMPEXP_CORE wxTreeEvent : public wxNotifyEvent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||||
wxTreeEvent(wxEventType commandType,
|
wxTreeEvent(wxEventType commandType,
|
||||||
wxTreeCtrlBase *tree,
|
wxTreeCtrlBase *tree,
|
||||||
const wxTreeItemId &item = wxTreeItemId());
|
const wxTreeItemId &item = wxTreeItemId());
|
||||||
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
|
||||||
wxTreeEvent(const wxTreeEvent& event);
|
wxTreeEvent(const wxTreeEvent& event);
|
||||||
|
|
||||||
virtual wxEvent *Clone() const { return new wxTreeEvent(*this); }
|
virtual wxEvent *Clone() const { return new wxTreeEvent(*this); }
|
||||||
|
@@ -39,7 +39,7 @@
|
|||||||
// wxWin macros
|
// wxWin macros
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS(wxTimerEvent, wxEvent)
|
IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent)
|
||||||
|
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
// wxTimerBase implementation
|
// wxTimerBase implementation
|
||||||
|
@@ -59,8 +59,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU)
|
|||||||
// Tree event
|
// Tree event
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
IMPLEMENT_ABSTRACT_CLASS(wxTreeEvent, wxNotifyEvent)
|
IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
|
||||||
|
|
||||||
|
|
||||||
wxTreeEvent::wxTreeEvent(wxEventType commandType,
|
wxTreeEvent::wxTreeEvent(wxEventType commandType,
|
||||||
wxTreeCtrlBase *tree,
|
wxTreeCtrlBase *tree,
|
||||||
|
Reference in New Issue
Block a user