ToolMap
Loading...
Searching...
No Matches
TocCtrlModel Class Reference

Model for TocCtrl. More...

#include <tocctrlmodel.h>

Inheritance diagram for TocCtrlModel:

Public Member Functions

 TocCtrlModel ()
 TocCtrlModel.
 
bool IsChecked (const wxDataViewItem &item) const
 
void SetChecked (const wxDataViewItem &item, bool check=true)
 
wxString NodeGetTitle (TocCtrlModelNode *node)
 
bool NodeSetTitle (TocCtrlModelNode *node, const wxString &title)
 
TocCtrlModelNodeNodeAdd (TocCtrlModelNode *parent, tmLayerProperties *layerprop)
 
TocCtrlModelNodeNodeInsert (TocCtrlModelNode *parent, tmLayerProperties *layerprop, int index=0)
 
bool NodeMove (wxDataViewItemArray &selectedItems, TocCtrlModelNode *destination, int proposedIndex=wxNOT_FOUND)
 
void NodeRecursiveAdd (TocCtrlModelNode *parent, TocCtrlModelNode *start)
 
void NodeRecursiveRemove (TocCtrlModelNode *start)
 
void Delete (const wxDataViewItem &item)
 
void Clear ()
 
virtual void GetValue (wxVariant &variant, const wxDataViewItem &item, unsigned int col) const wxOVERRIDE
 
virtual bool SetValue (const wxVariant &variant, const wxDataViewItem &item, unsigned int col) wxOVERRIDE
 
virtual bool IsEnabled (const wxDataViewItem &item, unsigned int col) const wxOVERRIDE
 
virtual wxDataViewItem GetParent (const wxDataViewItem &item) const wxOVERRIDE
 
wxDataViewItem GetRoot () const
 
virtual bool IsContainer (const wxDataViewItem &item) const wxOVERRIDE
 
virtual unsigned int GetChildren (const wxDataViewItem &parent, wxDataViewItemArray &array) const wxOVERRIDE
 
virtual unsigned int GetColumnCount () const wxOVERRIDE
 
virtual wxString GetColumnType (unsigned int) const wxOVERRIDE
 

Static Public Member Functions

static wxDataViewItem ConvertFromNode (const TocCtrlModelNode *node)
 
static TocCtrlModelNodeConvertFromDataViewItem (const wxDataViewItem &item)
 

Detailed Description

Model for TocCtrl.

Member Function Documentation

◆ NodeAdd()

TocCtrlModelNode * TocCtrlModel::NodeAdd ( TocCtrlModelNode parent,
tmLayerProperties layerprop 
)

Append an item

Parameters
parent(must be a container)
layerpropa tmLayerProperties object containing all the required data
Returns
the newly TocCtrlModelNode or a null pointer in case of error

◆ NodeGetTitle()

wxString TocCtrlModel::NodeGetTitle ( TocCtrlModelNode node)

Get The node text / title

Parameters
node
Returns
the text for nodes and group

◆ NodeMove()

bool TocCtrlModel::NodeMove ( wxDataViewItemArray &  selectedItems,
TocCtrlModelNode destination,
int  proposedIndex = wxNOT_FOUND 
)

Move nodes to destination.

Parameters
selectedItems
destination
proposedIndexwxNOT_FOUND means move to the end, otherwise try to move to the specified index of the destination container
Returns
allways true

◆ NodeSetTitle()

bool TocCtrlModel::NodeSetTitle ( TocCtrlModelNode node,
const wxString &  title 
)

Set node text / title

Parameters
node
title
Returns
true for Container, false otherwise. It makes no sense to change item title!

The documentation for this class was generated from the following files: