X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6de6ca4c7458b3db985a146f63725f820ef4c11c..a7689c49fe02c0c065facf736ab28b19f5997b7c:/include/wx/treelist.h?ds=sidebyside diff --git a/include/wx/treelist.h b/include/wx/treelist.h index bb27f9d8f9..382be23b3a 100644 --- a/include/wx/treelist.h +++ b/include/wx/treelist.h @@ -3,7 +3,7 @@ // Purpose: wxTreeListCtrl class declaration. // Author: Vadim Zeitlin // Created: 2011-08-17 -// RCS-ID: $Id: wxhead.h,v 1.12 2010-04-22 12:44:51 zeitlin Exp $ +// RCS-ID: $Id$ // Copyright: (c) 2011 Vadim Zeitlin // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// @@ -47,6 +47,7 @@ enum wxTL_CHECKBOX = 0x0002, // Show checkboxes in the first column. wxTL_3STATE = 0x0004, // Allow 3rd state in checkboxes. wxTL_USER_3STATE = 0x0008, // Allow user to set 3rd state. + wxTL_NO_HEADER = 0x0010, // Column titles not visible. wxTL_DEFAULT_STYLE = wxTL_SINGLE, wxTL_STYLE_MASK = wxTL_SINGLE | @@ -453,9 +454,12 @@ private: // wxTreeListEvent: event generated by wxTreeListCtrl. // ---------------------------------------------------------------------------- -class wxTreeListEvent : public wxNotifyEvent +class WXDLLIMPEXP_ADV 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; } @@ -470,6 +474,14 @@ public: virtual wxEvent* Clone() const { return new wxTreeListEvent(*this); } private: + // Common part of all ctors. + void Init() + { + m_column = static_cast(-1); + + m_oldCheckedState = wxCHK_UNDETERMINED; + } + // Ctor is private, only wxTreeListCtrl can create events of this type. wxTreeListEvent(wxEventType evtType, wxTreeListCtrl* treelist, @@ -479,9 +491,7 @@ private: { SetEventObject(treelist); - m_column = static_cast(-1); - - m_oldCheckedState = wxCHK_UNDETERMINED; + Init(); } // Set the checkbox state before this event for ITEM_CHECKED events. @@ -505,7 +515,7 @@ private: friend class wxTreeListCtrl; - wxDECLARE_ABSTRACT_CLASS(wxTreeListEvent); + wxDECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxTreeListEvent); }; // Event types and event table macros.