- Declared in:
- ETTextProtocols.h
- Conforms to:
- NSObject
The ETText protocol is implemented by all objects in a structured text tree. It describes an abstract way of interacting with regions of structured text, which may or or may not have children.
Appends the string to the current text object.
Builds the style from the specified index in this text object. Returns the end of the range for which this style is valid.
Returns the character at the specified index in the text object. This method is NSString-compatible.
Replaces the characters in the specified range with a string. This method is compatible with the same method in NSString and will transform the tree as required to support the modification.
Replace this text node in its parent with the one given as the argument.
Sets custom attributes for a specified range. When sent to a leaf node, the range must cover the entire node. When sent to any other node, it will transform the tree as required to modify the specified range.
Sets a string representing the receiver.
The implementation must notify the parent using -[ETTextGroup childDidChange].
Splits the receiver at the specified index. The returned value is a new text tree containing all of the text before the index. The receiver contains only the elements after.
Visits the element and it's children using the specified visitor.
- Declared in:
- ETTextProtocols.h
- Conforms to:
- ETText
The ETTextGroup protocol is adopted by elements in an ETText tree that contain children.
Notify the object that one of its children changed. This may invalidate caches in the parent, or cause them to be regenerated.
- Declared in:
- ETTextProtocols.h
The visitor protocol is adopted by objects that wish to visit the text tree in character order. It can be used for exporting or transforming the text tree.
Sent after visiting a node and all of its children.
Sent when visiting a leaf node in the tree.