#include <tree_item.h>
Public Member Functions | |
| virtual const Common::String | getName () const |
| virtual bool | isEquals (const Common::String &name, int maxLen=0) const |
| virtual int | compareTo (const Common::String &name, int maxLen=0) const |
| virtual void | viewChange () |
| TreeItem * | getParent () const |
| Game * | getGame () |
| const Game * | getGame () const |
| Gfx::VisualItem * | getView () |
| TreeItem * | getNextSibling () const |
| TreeItem * | getPriorSibling () const |
| TreeItem * | getLastSibling () |
| TreeItem * | getFirstChild () const |
| TreeItem * | getLastChild () const |
| TreeItem * | scan (TreeItem *item) const |
| TreeItem * | findChildInstanceOf (const ClassDef &classDef) const |
| TreeItem * | findNextInstanceOf (const ClassDef &classDef, TreeItem *startItem) const |
| void | addUnder (TreeItem *newParent) |
| void | addChild (TreeItem *child) |
| void | setParent (TreeItem *newParent) |
| void | addSibling (TreeItem *item) |
| void | moveUnder (TreeItem *newParent) |
| void | destroyAll () |
| int | destroyChildren () |
| void | detach () |
| void | attach (TreeItem *item) |
| NamedItem * | findByName (const Common::String &name) |
Public Member Functions inherited from Ultima::Shared::BaseObject | |
| virtual ::Ultima::Shared::ClassDef | getType () const |
| bool | isInstanceOf (const ClassDef &classDef) const |
Public Attributes | |
| CLASSDEF | |
Additional Inherited Members | |
Static Public Member Functions inherited from Ultima::Shared::BaseObject | |
| ::Ultima::Shared::ClassDef | type () |
This implements the base for objects can form a class hierarchy, with parents, children, and siblings that messages can be passed around.
|
inlinevirtual |
Gets the name of the item, if any
Reimplemented in Ultima::Shared::NamedItem.
|
inlinevirtual |
Returns true if the item's name matches a passed name
|
inlinevirtual |
Compares the name of the item to a passed name
|
inlinevirtual |
Called when the view changes
|
inline |
Get the parent for the given item
| Game* Ultima::Shared::TreeItem::getGame | ( | ) |
Jumps up through the parents to find the root game
| const Game* Ultima::Shared::TreeItem::getGame | ( | ) | const |
Jumps up through the parents to find the root game
| Gfx::VisualItem* Ultima::Shared::TreeItem::getView | ( | ) |
Returns the currently active game view
|
inline |
Get the next sibling
|
inline |
Get the prior sibling
| TreeItem* Ultima::Shared::TreeItem::getLastSibling | ( | ) |
Get the last sibling of this sibling
|
inline |
Get the first child of the item, if any
| TreeItem* Ultima::Shared::TreeItem::getLastChild | ( | ) | const |
Get the last child of the item, if any
Given all the recursive children of the tree item, gives the next item in sequence to the passed starting item
Find the first child item that is of a given type
| TreeItem* Ultima::Shared::TreeItem::findNextInstanceOf | ( | const ClassDef & | classDef, |
| TreeItem * | startItem | ||
| ) | const |
Find the next sibling item that is of the given type
| void Ultima::Shared::TreeItem::addUnder | ( | TreeItem * | newParent | ) |
Adds the item under another tree item
| void Ultima::Shared::TreeItem::addChild | ( | TreeItem * | child | ) |
Adds a new child under this one
| void Ultima::Shared::TreeItem::setParent | ( | TreeItem * | newParent | ) |
Sets the parent for the item
| void Ultima::Shared::TreeItem::addSibling | ( | TreeItem * | item | ) |
Adds the item as a sibling of another item
| void Ultima::Shared::TreeItem::moveUnder | ( | TreeItem * | newParent | ) |
Moves the tree item to be under another parent
| void Ultima::Shared::TreeItem::destroyAll | ( | ) |
Destroys both the item as well as any of it's children
| int Ultima::Shared::TreeItem::destroyChildren | ( | ) |
Destroys all child tree items under this one.
| void Ultima::Shared::TreeItem::detach | ( | ) |
Detach the tree item from any other associated tree items
| void Ultima::Shared::TreeItem::attach | ( | TreeItem * | item | ) |
Attaches a tree item to a new node
| NamedItem* Ultima::Shared::TreeItem::findByName | ( | const Common::String & | name | ) |
Finds a tree item by name
| name | Name to find |