CommandManager#

class caris.ui.CommandManager#

A command manager.

register_command()#

object register_command(tuple args, dict kwds) :

Registers a command.

Args:

command_id (int): The command identifier.

Keyword Args:
  • command_id (int): The command identifier, specified either here, or as the first argument. Value must be between 50000 and 50999.

  • can_execute (Callable[[], bool]): Function that determines if the command can be executed with signature can_execute() -> bool

  • execute (Callable[[], None]): Function that executes the command with signature execute().

  • is_active (Callable[[], bool]): Function that indicates if a command is active with the signature is_active() -> bool

register_process_command((CommandManager)self, (object)command_id, (str)file_path) None :#

Registers a command to run a specific process file.

Parameters:
  • command_id (int) – The command identifier. Value must be between 50000 and 50999.

  • file_path (str) – The full file path the process to run.