Name

GroveBatchCommand — The class for binding several commands into a single command.

Synopsis

class GroveBatchCommand (GroveCommandSernaApi::GroveCommand) :
  # construct/copy/destruct
  __init__()
  __del__()

  # public member functions

  GrovePos pos() const
  None setFlags(CommandFlags) 
  CommandFlags flags() const
  bool executeAndAdd(const Command &, bool = true) 
  None setValidationContext(const GroveNode &) 
  GroveNode validationContext() const
  None setSuggestedPos(const GrovePos &) 
  None setInfo(const SString &) 

Description

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 construct/copy/destruct

  1. __init__()


  2. __del__()


GroveBatchCommand public member functions

  1. GrovePos pos() const

    Returns suggested cursor position after command execution.


  2. None setFlags(CommandFlags f)

    Sets command flags as above.


  3. CommandFlags flags() const

    Returns command flags.


  4. bool executeAndAdd(const Command & command, bool refuseNull = true)

    Executes command and adds to BatchCommand. If command execution fails, then FALSE is returned.


  5. None setValidationContext(const GroveNode & node)

    Explicitly sets new validation context. By default it uses context from the last child command.


  6. GroveNode validationContext() const

    Returns validation context for this command (root of the subtree which should be re-validated after command execution)


  7. None setSuggestedPos(const GrovePos & pos)

    Explicitly sets cursor position after command execution.


  8. None setInfo(const SString & s)

    Set batch command info string.