The specified range is removed from the text flow.
Note: The edit manager is responsible for copying the text scrap to the clipboard. Undoing a cut operation does not restore the original clipboard state.
An ApplyFormatOperation applies the leaf format to the text in the specified range (no change is made if the specified range is a single point). It applies the paragraph format to any paragraphs at least partially within the range (or a single paragraph if the range is a single point). And it applies the container format to any containers at least partially within the range (or a single container if the range is a single point).
The formats of any containers at least partially within the range are updated.
If the range of this operation is a point, then a single container is updated.
If
If the range of this operation is a point, or if
The formats of any paragraphs at least partially within the range are updated.
If the range of this operation is a point, then a single paragraph is updated.
If
An UndefineFormatOperation undefines properties set in the leaf format to the text in the specified range (no change is made if the specified range is a single point). It undefines properties set in the paragraph format to any paragraphs at least partially within the range (or a single paragraph if the range is a single point). And it undefines properties set in the container format to any containers at least partially within the range (or a single container if the range is a single point).
The formats of any containers at least partially within the range are updated.
If the range of this operation is a point, then a single container is updated.
If
If the range of this operation is a point, or if
The formats of any paragraphs at least partially within the range are updated.
If the range of this operation is a point, then a single paragraph is updated.
If
This function is called by the edit manager, when necessary.
If
This operation applies one or more formats to a flow element.
If
If the
Operations are transformations of a text flow. An Operation class defines the logic for performing and undoing the transformation. Operations are executed by an edit manager. Most applications do not need to create or manage operations directly (unless implementing a custom edit manager).
When an operation is performed, the edit manager dispatches an Operation object within the FlowOperationEvent object. You can query this Operation object to decide whether or not to allow the operation, to decide whether to perform some other operation as well, or to update related user-interface elements.
This method must be overridden in derived classes. The base class method does nothing.
You should not call
This method must be overridden in derived classes. The base class method does nothing.
You should not call
This method must be overridden in derived classes. The base class method does nothing.
You should not call
A generation of 0 indicates that the operation did not complete.
A generation of 0 indicates that the operation did not complete.
Some delete operations, for example, a sequence of backspace keystrokes, can be fruitfully merged into one operation so that undoing the operation reverses the entire sequence.
The operation creates a new paragraph containing the text from the specified position to the end of the paragraph. If a range of text is specified, the text in the range is deleted first.
This operation undefines one or more formats to a flow element.
If
This operation moves a consecutive number of children of source into the destination context. Also, if moving the children leaves the source element with no children, then source will be removed. The removal is done recursively such that if source's parent becomes empty from the removal of source, it too will be deleted, and on up the parent chain.
If the
This method must be overridden in derived classes. The base class method does nothing.
You should not call
This function is called by the edit manager, when necessary.
If the
If the
The specified range is replaced by the new content.
Note: The edit manager is responsible for copying the contents of the clipboard.
Note: The operation is responsible for copying the text scrap to the clipboard. Undonig a copy operation does not restore the original clipboard state.
The CompositeOperation class provides a grouping mechanism for combining multiple FlowOperations into a single atomic operation. Grouping operations allows them to be undone and redone as a unit. For example, several single character inserts followed by several backspaces can be undone together as if they were a single operation. Grouping also provides a mechanism for representing complex operations. For example, a replace operation that modifies more than one text ranges can be represented and managed as a single composite operation.
Note: It can be more efficient to merge individual atomic operations rather than to combine separate operations into a group. For example, several sequential character inserts can easily be represented as a single insert operation, and undoing or redoing that single operation is more efficient than undoing or redoing a group of insert operations.
The new operation must operate on the same TextFlow object as the other operations in the list.