Command — The base class for the actions performed on the document.
class Command (RefCountedWrappedObjectSernaApi::RefCountedWrappedObject) : # construct/copy/destruct __init__() __init__(SernaApiBase *) __del__() # public member functions None execute() None unexecute() bool isExecuted() const SString info(unsigned int) const unsigned short getUdata() const None setUdata(unsigned) GroveCommand asGroveCommand() const Command firstChild() const Command lastChild() const Command getChild(int) const int countChildren() const None appendChild(const Command &) None removeAllChildren() Command nextSibling() const Command prevSibling() const Command parent() const Command root() const None remove() None insertBefore(const Command &) None insertAfter(const Command &) None removeGroup(const Command &) int siblingIndex() const SString getTreelocString(const Command & = Command()) const Command getByTreelocString(const SString &) const None doExecute() None doUnexecute()
Command
public member functionsExecute the command.
Un-execute (undo) the command.
Returns TRUE if command is already executed.
SString info(unsigned int argIndex) const
Additional command info, as seen in undo/redo list. For null value of argIndex the info string itself is returned; non-zero values are used to access optional arguments. When there is no argument for any given index, null string is returned.
Get custom user data on the command.
Set custom user data on the command.
GroveCommand asGroveCommand() const
If the current command was created by the GroveEditor, it may be of GroveCommand type. GroveCommands contain some additional information such as current position, etc.
Command firstChild() const
Command lastChild() const
Command getChild(int n) const
Command nextSibling() const
Command prevSibling() const
Command parent() const
Command root() const
SString getTreelocString(const Command & = Command()) const
Command getByTreelocString(const SString & ) const
Allows to redefine behaviour of original command. Used only when Command was constructed w/o arguments. THESE FUNCTIONS SHOULD NEVER BE CALLED DIRECTLY. USE execute() AND unexecute() INSTEAD.
Allows to redefine behaviour of original command. Used only when Command was constructed w/o arguments. THESE FUNCTIONS SHOULD NEVER BE CALLED DIRECTLY. USE execute() AND unexecute() INSTEAD.