|
FDOSTUI
FreeDOS Text User Interface
|
treeitem widget class More...
#include <treeitem.hpp>
Public Member Functions | |
| treeitem (unsigned char const *i_str, void *const io_user_data=0) | |
| constructor - create a tree item More... | |
| bool | add (unsigned char const *i_str, void *const io_user_data=0) |
| add a child item to the tree More... | |
| bool | add (treeitem *const io_item) |
| add a tree item (sibling) to tree More... | |
| treeitem *const | next () const |
| returns the next item More... | |
| treeitem *const | prev () const |
| returns the previous item More... | |
| virtual | ~treeitem () |
| destructor | |
Static Public Member Functions | |
| static void | set_links (treeitem *const io_item, treeitem *const io_parent, treeitem *const io_prev, unsigned int const i_level) |
| sets linkage between tree items More... | |
Protected Attributes | |
| unsigned int | m_open:1 |
| unsigned char * | m_text |
| unsigned int | m_len |
| int | m_pos_y |
| void * | m_user_data |
| struct array | m_child |
| treeitem * | m_parent |
| treeitem * | m_next |
| treeitem * | m_prev |
| unsigned int | m_level |
Private Member Functions | |
| treeitem (const treeitem &) | |
| treeitem & | operator= (treeitem const &) |
Friends | |
| class | tree |
treeitem widget class
A tree item, which consists of a label and possible children. A tree item can be connected to other tree items to form a hierarchy.
Internal links such as m_parent, m_next and m_prev are deferred. Once a tree has been created or modified, the links are set through a call to ::set_links. The tree class does this automatically when a root tree item is attached.
| treeitem::treeitem | ( | unsigned char const * | i_str, |
| void *const | io_user_data = 0 |
||
| ) |
constructor - create a tree item
| [in] | i_str | label of item |
| [in,out] | io_user_data | user defined data for signal |
| bool treeitem::add | ( | unsigned char const * | i_str, |
| void *const | io_user_data = 0 |
||
| ) |
add a child item to the tree
| [in] | i_str | label of item |
| [in,out] | io_user_data | user defined data for signal |
| bool treeitem::add | ( | treeitem *const | io_item | ) |
add a tree item (sibling) to tree
| [in,out] | io_item | item to add |
io_item will become owned by the tree. It must not already be in the tree or anyother tree.
| treeitem *const treeitem::next | ( | ) | const |
returns the next item
| treeitem *const treeitem::prev | ( | ) | const |
returns the previous item
|
static |
sets linkage between tree items
| [in,out] | io_item | tree item to link |
| [in,out] | io_parent | parent of tree item |
| [in,out] | io_prev | tree item the precedes io_item |
| [in] | i_level | level of tree item (0...N) |
Internal links such as m_parent, m_next and m_prev are deferred. This routine will establish the relationship between tree items.
|
protected |
array of child tree items
|
protected |
length of m_text
|
protected |
level/depth of tree item
|
protected |
next item
|
protected |
indicator if item is open or closed
|
protected |
parent
|
protected |
y position of tree item
|
protected |
previous item
|
protected |
label text
|
protected |
user data
1.8.14