Allow setting colours and font of wxTreeListCtrl.
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
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#if wxUSE_TREELISTCTRL
|
#if wxUSE_TREELISTCTRL
|
||||||
|
|
||||||
|
#include "wx/compositewin.h"
|
||||||
#include "wx/containr.h"
|
#include "wx/containr.h"
|
||||||
#include "wx/headercol.h"
|
#include "wx/headercol.h"
|
||||||
#include "wx/itemid.h"
|
#include "wx/itemid.h"
|
||||||
@@ -88,7 +89,8 @@ extern WXDLLIMPEXP_DATA_ADV(const wxTreeListItem) wxTLI_LAST;
|
|||||||
// with wxDataViewCtrl directly but doing this makes your unportable to possible
|
// with wxDataViewCtrl directly but doing this makes your unportable to possible
|
||||||
// future non-wxDataViewCtrl-based implementations of this class.
|
// future non-wxDataViewCtrl-based implementations of this class.
|
||||||
|
|
||||||
class WXDLLIMPEXP_ADV wxTreeListCtrl : public wxNavigationEnabled<wxWindow>,
|
class WXDLLIMPEXP_ADV wxTreeListCtrl
|
||||||
|
: public wxCompositeWindow< wxNavigationEnabled<wxWindow> >,
|
||||||
public wxWithImages
|
public wxWithImages
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -324,6 +326,9 @@ private:
|
|||||||
// Common part of all ctors.
|
// Common part of all ctors.
|
||||||
void Init();
|
void Init();
|
||||||
|
|
||||||
|
// Pure virtual method inherited from wxCompositeWindow.
|
||||||
|
virtual wxWindowList GetCompositeWindowParts() const;
|
||||||
|
|
||||||
// Implementation of AppendColumn().
|
// Implementation of AppendColumn().
|
||||||
int DoInsertColumn(const wxString& title,
|
int DoInsertColumn(const wxString& title,
|
||||||
int pos, // May be -1 meaning "append".
|
int pos, // May be -1 meaning "append".
|
||||||
|
@@ -1022,6 +1022,13 @@ wxTreeListCtrl::~wxTreeListCtrl()
|
|||||||
m_model->DecRef();
|
m_model->DecRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
wxWindowList wxTreeListCtrl::GetCompositeWindowParts() const
|
||||||
|
{
|
||||||
|
wxWindowList parts;
|
||||||
|
parts.push_back(m_view);
|
||||||
|
return parts;
|
||||||
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Columns
|
// Columns
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user