Public Member Functions

# wxDataViewTreeStore Class Reference
[wxDataViewCtrl Related Classes]

`#include <wx/dataview.h>`

Inheritance diagram for wxDataViewTreeStore:
[legend]

## Detailed Description

wxDataViewTreeStore is a specialised wxDataViewModel for storing simple trees very much like wxTreeCtrl does and it offers a similar API.

This class actually stores the entire tree and the values (therefore its name) and implements all virtual methods from the base class so it can be used directly without having to derive any class from it, but it is mostly used from within wxDataViewTreeCtrl.

##

Library: wxAdvanced
Category: wxDataViewCtrl Related Classes

## Public Member Functions
| wxDataViewTreeStore ()
| Constructor.
virtual | ~wxDataViewTreeStore ()
| Destructor.
wxDataViewItem | AppendContainer (const wxDataViewItem &parent, const wxString &text, const wxIcon &icon=wxNullIcon, const wxIcon &expanded=wxNullIcon, wxClientData *data=NULL)
| Append a container.
wxDataViewItem | AppendItem (const wxDataViewItem &parent, const wxString &text, const wxIcon &icon=wxNullIcon, wxClientData *data=NULL)
| Append an item.
void | DeleteAllItems ()
| Delete all item in the model.
void | DeleteChildren (const wxDataViewItem &item)
| Delete all children of the item, but not the item itself.
void | DeleteItem (const wxDataViewItem &item)
| Delete this item.
int | GetChildCount (const wxDataViewItem &parent) const
| Return the number of children of item.
wxClientData * | GetItemData (const wxDataViewItem &item) const
| Returns the client data associated with the item.
const wxIcon & | GetItemExpandedIcon (const wxDataViewItem &item) const
| Returns the icon to display in expanded containers.
const wxIcon & | GetItemIcon (const wxDataViewItem &item) const
| Returns the icon of the item.
wxString | GetItemText (const wxDataViewItem &item) const
| Returns the text of the item.
wxDataViewItem | GetNthChild (const wxDataViewItem &parent, unsigned int pos) const
| Returns the nth child item of item.
wxDataViewItem | InsertContainer (const wxDataViewItem &parent, const wxDataViewItem &previous, const wxString &text, const wxIcon &icon=wxNullIcon, const wxIcon &expanded=wxNullIcon, wxClientData *data=NULL)
| Inserts a container after previous.
wxDataViewItem | InsertItem (const wxDataViewItem &parent, const wxDataViewItem &previous, const wxString &text, const wxIcon &icon=wxNullIcon, wxClientData *data=NULL)
| Inserts an item after previous.
wxDataViewItem | PrependContainer (const wxDataViewItem &parent, const wxString &text, const wxIcon &icon=wxNullIcon, const wxIcon &expanded=wxNullIcon, wxClientData *data=NULL)
| Inserts a container before the first child item or parent.
wxDataViewItem | PrependItem (const wxDataViewItem &parent, const wxString &text, const wxIcon &icon=wxNullIcon, wxClientData *data=NULL)
| Inserts an item before the first child item or parent.
void | SetItemData (const wxDataViewItem &item, wxClientData *data)
| Sets the client data associated with the item.
void | SetItemExpandedIcon (const wxDataViewItem &item, const wxIcon &icon)
| Sets the expanded icon for the item.
void | SetItemIcon (const wxDataViewItem &item, const wxIcon &icon)
| Sets the icon for the item.

List of all members.

## Constructor & Destructor Documentation

wxDataViewTreeStore::wxDataViewTreeStore | ( |  | ) |

Constructor.

Creates the invisible root node internally.

virtual wxDataViewTreeStore::~wxDataViewTreeStore | ( |  | ) | `[virtual]`

Destructor.

## Member Function Documentation

wxDataViewItem wxDataViewTreeStore::AppendContainer | ( | const wxDataViewItem & | parent,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | const wxIcon & | expanded = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Append a container.

wxDataViewItem wxDataViewTreeStore::AppendItem | ( | const wxDataViewItem & | parent,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Append an item.

void wxDataViewTreeStore::DeleteAllItems | ( |  | ) |

Delete all item in the model.

void wxDataViewTreeStore::DeleteChildren | ( | const wxDataViewItem & | item | ) |

Delete all children of the item, but not the item itself.

void wxDataViewTreeStore::DeleteItem | ( | const wxDataViewItem & | item | ) |

Delete this item.

int wxDataViewTreeStore::GetChildCount | ( | const wxDataViewItem & | parent | ) | const

Return the number of children of item.

wxClientData* wxDataViewTreeStore::GetItemData | ( | const wxDataViewItem & | item | ) | const

Returns the client data associated with the item.

const wxIcon& wxDataViewTreeStore::GetItemExpandedIcon | ( | const wxDataViewItem & | item | ) | const

Returns the icon to display in expanded containers.

const wxIcon& wxDataViewTreeStore::GetItemIcon | ( | const wxDataViewItem & | item | ) | const

Returns the icon of the item.

wxString wxDataViewTreeStore::GetItemText | ( | const wxDataViewItem & | item | ) | const

Returns the text of the item.

wxDataViewItem wxDataViewTreeStore::GetNthChild | ( | const wxDataViewItem & | parent,
|  | unsigned int | pos |
| ) |  |  | const

Returns the nth child item of item.

wxDataViewItem wxDataViewTreeStore::InsertContainer | ( | const wxDataViewItem & | parent,
|  | const wxDataViewItem & | previous,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | const wxIcon & | expanded = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Inserts a container after previous.

wxDataViewItem wxDataViewTreeStore::InsertItem | ( | const wxDataViewItem & | parent,
|  | const wxDataViewItem & | previous,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Inserts an item after previous.

wxDataViewItem wxDataViewTreeStore::PrependContainer | ( | const wxDataViewItem & | parent,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | const wxIcon & | expanded = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Inserts a container before the first child item or parent.

wxDataViewItem wxDataViewTreeStore::PrependItem | ( | const wxDataViewItem & | parent,
|  | const wxString & | text,
|  | const wxIcon & | icon = `wxNullIcon`,
|  | wxClientData * | data = `NULL` |
| ) |  |  |

Inserts an item before the first child item or parent.

void wxDataViewTreeStore::SetItemData | ( | const wxDataViewItem & | item,
|  | wxClientData * | data |
| ) |  |  |

Sets the client data associated with the item.

void wxDataViewTreeStore::SetItemExpandedIcon | ( | const wxDataViewItem & | item,
|  | const wxIcon & | icon |
| ) |  |  |

Sets the expanded icon for the item.

void wxDataViewTreeStore::SetItemIcon | ( | const wxDataViewItem & | item,
|  | const wxIcon & | icon |
| ) |  |  |

Sets the icon for the item.

|  | [ top ]