API reference - Class LayerPropertiesIteratorNotation used in Ruby API documentation Description: Layer properties iterator This iterator provides a flat view for the layers in the layer tree if used with the next method. In this mode it will descend into the hierarchy and deliver node by node as a linear (flat) sequence. The iterator can also be used to navigate through the node hierarchy using next_sibling, down_first_child, parent etc. The iterator also plays an important role for manipulating the layer properties tree, i.e. by specifying insertion points in the tree for the LayoutView class. Public constructors
Public methods
Detailed description[const] bool !=(const LayerPropertiesIterator other)Description: Inequality
[const] bool <(const LayerPropertiesIterator other)Description: Comparison
[const] bool ==(const LayerPropertiesIterator other)Description: Equality
Returns true, if self and other point to the same layer properties node. Caution: this does not imply that both layer properties nodes sit in the same tab. Just their position in the tree is compared. [const] void assign(const LayerPropertiesIterator other)Description: Assign the contents of another object to self This method assigns the contents of another object to self. This is a deep copy that does not only copy the reference but the actual content. [const] bool at_end?Description: At-the-end property This predicate is true if the iterator is at the end of either all elements or at the end of the child list (if down_last_child or down_first_child is used to iterate). [const] bool at_top?Description: At-the-top property This predicate is true if there is no parent node above the node addressed by self. [const] unsigned int child_indexDescription: Returns the index of the child within the parent This method returns the index of that the properties node the iterator points to in the list of children of it's parent. If the element does not have a parent, the index of the element in the global list is returned. void createDescription: Ensures the C++ object is created Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created. [const] const LayerPropertiesNode ptr currentDescription: Returns a const reference to the layer properties node that self points to void destroyDescription: Explicitly destroy the object Explicitly destroy the object on C++ side if it was owned by the Ruby interpreter. Subsequent access to this object will throw an exception. If the object is not owned by Ruby, this method will do nothing. [const] bool destroyed?Description: Returns a value indicating whether the object was already destroyed This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself. void down_first_childDescription: Move to the first child This method moves to the first child of the current element. If there is no child, at_end? will be true. Even then, the iterator is sitting at the the child level and up can be used to move back. void down_last_childDescription: Move to the last child This method moves behind the last child of the current element. at_end? will be true then. Even then, the iterator points to the child level and up can be used to move back. Despite the name, the iterator does not address the last child, but the position after that child. To actually get the iterator for the last child, use down_last_child and next_sibling(-1). [const] LayerPropertiesIterator dupDescription: Creates a copy of self [const] LayerPropertiesIterator first_childDescription: Returns the iterator pointing to the first child If there is no children, the iterator will be a valid insert point but not point to any valid element. It will report at_end? = true. [const] bool is_const_object?Description: Returns a value indicating whether the reference is a const reference This method returns true, if self is a const reference. In that case, only const methods may be called on self. [const] bool is_null?Description: "is null" predicate This predicate is true if the iterator is "null". Such an iterator can be created with the default constructor or by moving a top-level iterator up. [const] LayerPropertiesIterator last_childDescription: Returns the iterator pointing behind the last child The iterator will be a valid insert point but not point to any valid element. It will report at_end? = true. Despite the name, the iterator does not address the last child, but the position after that child. To actually get the iterator for the last child, use last_child and call next_sibling(-1) on that iterator. [static] LayerPropertiesIterator newDescription: Creates a new object of this class LayerPropertiesIterator nextDescription: Increment operator The iterator will be incremented to point to the next layer entry. It will descend into the hierarchy to address child nodes if there are any. void next_sibling(int n)Description: Move to the next sibling by a given distance The iterator is moved to the nth next sibling of the current element. Use negative distances to move backward. [const] unsigned int num_siblingsDescription: Return the number of siblings The count includes the current element. More precisely, this property delivers the number of children of the current node's parent. [const] LayerPropertiesIterator parentDescription: Returns the iterator pointing to the parent node This method will return an iterator pointing to the parent element. If there is no parent, the returned iterator will be a null iterator. void to_sibling(unsigned int n)Description: Move to the sibling with the given index The iterator is moved to the nth sibling by selecting the nth child in the current node's parent. LayerPropertiesIterator upDescription: Move up The iterator is moved to point to the current element's parent. If the current element does not have a parent, the iterator will become a null iterator. |