GroveBatchCommand — The class for binding several commands into a single command.
class GroveBatchCommand : public GroveCommandSernaApi::GroveCommand { public: // construct/copy/destruct GroveBatchCommand(); ~GroveBatchCommand(); // public member functions GrovePos pos() const; void setFlags(CommandFlags) ; CommandFlags flags() const; bool executeAndAdd(const Command &, bool = true) ; void setValidationContext(const GroveNode &) ; GroveNode validationContext() const; void setSuggestedPos(const GrovePos &) ; void setInfo(const SString &) ; };
Batch command allows to combine multiple commands returned by the GroveEditor so they will look as a single command in the Undo/Redo list. Use appendChild() function to add commands. Note that BatchCommands CANNOT be nested.
GroveBatchCommand
public member functionsGrovePos pos() const;
Returns suggested cursor position after command execution.
Sets command flags as above.
Returns command flags.
Executes command and adds to BatchCommand. If command execution fails, then FALSE is returned.
Explicitly sets new validation context. By default it uses context from the last child command.
GroveNode validationContext() const;
Returns validation context for this command (root of the subtree which should be re-validated after command execution)
Explicitly sets cursor position after command execution.
Set batch command info string.