]> git.saurik.com Git - wxWidgets.git/commitdiff
Allow setting colours and font of wxTreeListCtrl.
authorVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 Sep 2011 21:15:24 +0000 (21:15 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Thu, 8 Sep 2011 21:15:24 +0000 (21:15 +0000)
Use wxCompositeWindow<> to propagate changes of colours and font to
wxDataViewCtrl that wxTreeListCtrl uses internally.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@69028 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/treelist.h
src/generic/treelist.cpp

index dee836d209be6ff74ee75b7552962dc7a2e12faa..1f013e8a3705e1ebb91e06affe35447a8d78044b 100644 (file)
@@ -15,6 +15,7 @@
 
 #if wxUSE_TREELISTCTRL
 
+#include "wx/compositewin.h"
 #include "wx/containr.h"
 #include "wx/headercol.h"
 #include "wx/itemid.h"
@@ -88,8 +89,9 @@ extern WXDLLIMPEXP_DATA_ADV(const wxTreeListItem) wxTLI_LAST;
 // with wxDataViewCtrl directly but doing this makes your unportable to possible
 // future non-wxDataViewCtrl-based implementations of this class.
 
-class WXDLLIMPEXP_ADV wxTreeListCtrl : public wxNavigationEnabled<wxWindow>,
-                                       public wxWithImages
+class WXDLLIMPEXP_ADV wxTreeListCtrl
+    : public wxCompositeWindow< wxNavigationEnabled<wxWindow> >,
+      public wxWithImages
 {
 public:
     // Constructors and such
@@ -324,6 +326,9 @@ private:
     // Common part of all ctors.
     void Init();
 
+    // Pure virtual method inherited from wxCompositeWindow.
+    virtual wxWindowList GetCompositeWindowParts() const;
+
     // Implementation of AppendColumn().
     int DoInsertColumn(const wxString& title,
                        int pos,     // May be -1 meaning "append".
index 2bcfaeb48b21da22bd5a21890aed2d32ac65c1f5..cad5cca2e35c98a0af4799f15ad729a8d754dc1e 100644 (file)
@@ -1022,6 +1022,13 @@ wxTreeListCtrl::~wxTreeListCtrl()
         m_model->DecRef();
 }
 
+wxWindowList wxTreeListCtrl::GetCompositeWindowParts() const
+{
+    wxWindowList parts;
+    parts.push_back(m_view);
+    return parts;
+}
+
 // ----------------------------------------------------------------------------
 // Columns
 // ----------------------------------------------------------------------------