|
Crazy Eddie's GUI System
0.8.4
|
Adds name to the Element class, including name path traversal. More...
Inheritance diagram for CEGUI::NamedElement:
Collaboration diagram for CEGUI::NamedElement:Public Member Functions | |
| NamedElement (const String &name="") | |
| Constructor. | |
| virtual | ~NamedElement () |
| Destructor. | |
| virtual void | setName (const String &name) |
| Renames the element. | |
| const String & | getName () const |
| Return a String object holding the name of this Element. | |
| String | getNamePath () const |
| Return a String object that describes the name path for this Element. | |
| bool | isChild (const String &name_path) const |
| Checks whether given name path references a NamedElement that is attached to this Element. | |
| bool | isChildRecursive (const String &name) const |
| returns whether at least one window with the given name is attached to this Window or any of it's children as a child. | |
| bool | isAncestor (const String &name) const |
| Return true if the specified element name is a name of some ancestor of this Element. | |
| NamedElement * | getChildElement (const String &name_path) const |
| Return the attached child element that the given name path references. | |
| NamedElement * | getChildElementRecursive (const String &name) const |
| Find the first child with the given name, recursively and breadth-first. | |
| void | removeChild (const String &name_path) |
| Remove the Element referenced by the given name path from this Element's child list. | |
Static Public Attributes | |
| static const String | EventNamespace |
| Namespace for global events. | |
| static const String | EventNameChanged |
Protected Member Functions | |
| virtual void | addChild_impl (Element *element) |
| virtual NamedElement * | getChildByNamePath_impl (const String &name_path) const |
| Retrieves a child at name_path or 0 if none such exists. | |
| virtual NamedElement * | getChildByNameRecursive_impl (const String &name) const |
| Finds a child by name or 0 if none such exists. | |
| void | addNamedElementProperties () |
| Add standard CEGUI::NamedElement properties. | |
| virtual void | onNameChanged (NamedElementEventArgs &e) |
| Handler called when the element's name changes. | |
Protected Attributes | |
| String | d_name |
| The name of the element, unique in the parent of this element. | |
Adds name to the Element class, including name path traversal.
| CEGUI::NamedElement::NamedElement | ( | const String & | name = "" | ) |
Constructor.
| name | The initial name this element will have |
| virtual void CEGUI::NamedElement::addChild_impl | ( | Element * | element | ) | [protected, virtual] |
Add given element to child list at an appropriate position.
Reimplemented from CEGUI::Element.
Reimplemented in CEGUI::Window, CEGUI::ScrollablePane, CEGUI::TabControl, CEGUI::GridLayoutContainer, CEGUI::LayoutContainer, CEGUI::LayoutCell, and CEGUI::GroupBox.
| NamedElement* CEGUI::NamedElement::getChildElement | ( | const String & | name_path | ) | const |
Return the attached child element that the given name path references.
| name_path | String object holding the name path of the child element to return. |
| UnknownObjectException | thrown if name_path does not reference an Element attached to this Element. |
| NamedElement* CEGUI::NamedElement::getChildElementRecursive | ( | const String & | name | ) | const |
| bool CEGUI::NamedElement::isAncestor | ( | const String & | name | ) | const |
Return true if the specified element name is a name of some ancestor of this Element.
| name | String object holding the name to check for. |
| bool CEGUI::NamedElement::isChild | ( | const String & | name_path | ) | const |
Checks whether given name path references a NamedElement that is attached to this Element.
| name_path | String object holding the name path of the child element to test. |
| bool CEGUI::NamedElement::isChildRecursive | ( | const String & | name | ) | const |
returns whether at least one window with the given name is attached to this Window or any of it's children as a child.
| ID | uint ID code to look for. |
| virtual void CEGUI::NamedElement::onNameChanged | ( | NamedElementEventArgs & | e | ) | [protected, virtual] |
Handler called when the element's name changes.
| e | NamedElementEventArgs object whose 'element' pointer field is set to the element that triggered the event. For this event the trigger element is always 'this'. |
| void CEGUI::NamedElement::removeChild | ( | const String & | name_path | ) |
| virtual void CEGUI::NamedElement::setName | ( | const String & | name | ) | [virtual] |
Renames the element.
| name | String object holding the new name for the element. |
| AlreadyExistsException | thrown if an element named name already exists in the parent of this element. |
const String CEGUI::NamedElement::EventNameChanged [static] |
Event fired when the Element name has changed. Handlers are passed a const NamedElementEventArgs reference with NamedElementEventArgs::element set to the Element whose name was changed.