class wxTreeListEvent : public wxNotifyEvent
{
public:
+ // Default ctor is provided for wxRTTI needs only but should never be used.
+ wxTreeListEvent() { Init(); }
+
// The item affected by the event. Valid for all events except
// column-specific ones such as COLUMN_SORTED.
wxTreeListItem GetItem() const { return m_item; }
virtual wxEvent* Clone() const { return new wxTreeListEvent(*this); }
private:
+ // Common part of all ctors.
+ void Init()
+ {
+ m_column = static_cast<unsigned>(-1);
+
+ m_oldCheckedState = wxCHK_UNDETERMINED;
+ }
+
// Ctor is private, only wxTreeListCtrl can create events of this type.
wxTreeListEvent(wxEventType evtType,
wxTreeListCtrl* treelist,
{
SetEventObject(treelist);
- m_column = static_cast<unsigned>(-1);
-
- m_oldCheckedState = wxCHK_UNDETERMINED;
+ Init();
}
// Set the checkbox state before this event for ITEM_CHECKED events.
friend class wxTreeListCtrl;
- wxDECLARE_ABSTRACT_CLASS(wxTreeListEvent);
+ wxDECLARE_DYNAMIC_CLASS(wxTreeListEvent);
};
// Event types and event table macros.
// wxTreeListEvent implementation
// ============================================================================
-wxIMPLEMENT_ABSTRACT_CLASS(wxTreeListEvent, wxNotifyEvent)
+wxIMPLEMENT_DYNAMIC_CLASS(wxTreeListEvent, wxNotifyEvent)
#define wxDEFINE_TREELIST_EVENT(name) \
wxDEFINE_EVENT(wxEVT_COMMAND_TREELIST_##name, wxTreeListEvent)