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:
Francesco Montorsi
2008-12-27 13:40:49 +00:00
parent f775771ab4
commit e47859daeb
4 changed files with 11 additions and 10 deletions

View File

@@ -152,25 +152,27 @@ private:
class WXDLLIMPEXP_BASE wxTimerEvent : public wxEvent
{
public:
wxTimerEvent()
: wxEvent(wxID_ANY, wxEVT_TIMER) { m_timer=NULL; }
wxTimerEvent(wxTimer& timer)
: wxEvent(timer.GetId(), wxEVT_TIMER),
m_timer(timer)
m_timer(&timer)
{
SetEventObject(timer.GetOwner());
}
// accessors
int GetInterval() const { return m_timer.GetInterval(); }
wxTimer& GetTimer() const { return m_timer; }
int GetInterval() const { return m_timer->GetInterval(); }
wxTimer& GetTimer() const { return *m_timer; }
// implement the base class pure virtual
virtual wxEvent *Clone() const { return new wxTimerEvent(*this); }
private:
wxTimer& m_timer;
wxTimer* m_timer;
DECLARE_ABSTRACT_CLASS(wxTimerEvent)
DECLARE_NO_ASSIGN_CLASS(wxTimerEvent)
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTimerEvent)
};
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);