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
|
||||
{
|
||||
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&);
|
||||
|
@@ -278,10 +278,10 @@ class WXDLLIMPEXP_FWD_CORE wxTreeCtrlBase;
|
||||
class WXDLLIMPEXP_CORE wxTreeEvent : public wxNotifyEvent
|
||||
{
|
||||
public:
|
||||
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||
wxTreeEvent(wxEventType commandType,
|
||||
wxTreeCtrlBase *tree,
|
||||
const wxTreeItemId &item = wxTreeItemId());
|
||||
wxTreeEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
|
||||
wxTreeEvent(const wxTreeEvent& event);
|
||||
|
||||
virtual wxEvent *Clone() const { return new wxTreeEvent(*this); }
|
||||
|
@@ -39,7 +39,7 @@
|
||||
// wxWin macros
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxTimerEvent, wxEvent)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTimerEvent, wxEvent)
|
||||
|
||||
// ============================================================================
|
||||
// wxTimerBase implementation
|
||||
|
@@ -59,8 +59,7 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_TREE_ITEM_MENU)
|
||||
// Tree event
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxTreeEvent, wxNotifyEvent)
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxTreeEvent, wxNotifyEvent)
|
||||
|
||||
wxTreeEvent::wxTreeEvent(wxEventType commandType,
|
||||
wxTreeCtrlBase *tree,
|
||||
|
Reference in New Issue
Block a user