Function event_ctx

ooodev.events.lo_events.event_ctx(*args, source=None, trigger_args=None, lo_observe=False)[source]

Event context manager.

This manager adds and removes events.

Parameters:
  • args (EventArg, Tuple[str, EventCallback], optional) – One or more EventArgs to add.

  • source (Any, optional) – Source can be class or any object.

  • trigger_args (GenericArgs, optional) – Args that are passed to events when they are triggered.

  • lo_observe (bool) –

Yields:

Generator[EventObserver, None, None] – events

Return type:

Generator[EventObserver, None, None]