1#ifndef FEATURE_TOC_TOCCTRLMODEL_H
2#define FEATURE_TOC_TOCCTRLMODEL_H
9#include <wx/dataview.h>
11#include "tmlayerproperties.h"
26 void GetAllChildRecursive(TocCtrlModelNodePtrArray& node_array,
TocCtrlModelNode* startnode =
nullptr);
29 bool IsContainer()
const;
33 TocCtrlModelNodePtrArray& GetChildren();
39 unsigned int GetChildCount()
const;
47 TocCtrlModelNodePtrArray m_Children;
61 bool IsChecked(
const wxDataViewItem& item)
const;
62 void SetChecked(
const wxDataViewItem& item,
bool check =
true);
74 void Delete(
const wxDataViewItem& item);
78 virtual void GetValue(wxVariant& variant,
const wxDataViewItem& item,
unsigned int col)
const wxOVERRIDE;
80 virtual bool SetValue(
const wxVariant& variant,
const wxDataViewItem& item,
unsigned int col) wxOVERRIDE;
82 virtual bool IsEnabled(
const wxDataViewItem& item,
unsigned int col)
const wxOVERRIDE;
84 virtual wxDataViewItem GetParent(
const wxDataViewItem& item)
const wxOVERRIDE;
86 wxDataViewItem GetRoot()
const;
88 virtual bool IsContainer(
const wxDataViewItem& item)
const wxOVERRIDE;
90 virtual unsigned int GetChildren(
const wxDataViewItem& parent, wxDataViewItemArray& array)
const wxOVERRIDE;
92 virtual unsigned int GetColumnCount()
const wxOVERRIDE;
93 virtual wxString GetColumnType(
unsigned int)
const wxOVERRIDE;
96 static TocCtrlModelNode* ConvertFromDataViewItem(
const wxDataViewItem& item);
100 wxImageList m_ImageList;
Node for TocCtrlModel.
Definition tocctrlmodel.h:20
Model for TocCtrl.
Definition tocctrlmodel.h:53
wxString NodeGetTitle(TocCtrlModelNode *node)
Definition tocctrlmodel.cpp:299
TocCtrlModelNode * NodeAdd(TocCtrlModelNode *parent, tmLayerProperties *layerprop)
Definition tocctrlmodel.cpp:254
bool NodeMove(wxDataViewItemArray &selectedItems, TocCtrlModelNode *destination, int proposedIndex=wxNOT_FOUND)
Definition tocctrlmodel.cpp:325
TocCtrlModel()
TocCtrlModel.
Definition tocctrlmodel.cpp:82
bool NodeSetTitle(TocCtrlModelNode *node, const wxString &title)
Definition tocctrlmodel.cpp:310
Storing object of layer type.
Definition tmlayerproperties.h:47