ooodev.adapter.frame.notifying_dispatch_partial module

class ooodev.adapter.frame.notifying_dispatch_partial.NotifyingDispatchPartial(component, interface=com.sun.star.frame.XNotifyingDispatch)[source]

Bases: DispatchPartial

Class for managing Status Events.

Parameters:
  • component (XNotifyingDispatch) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.frame.XNotifyingDispatch)[source]

Constructor

Parameters:
  • subscriber (XNotifyingDispatch) – An UNO object that implements the XNotifyingDispatch interface.

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

  • component (XNotifyingDispatch) –

  • interface (UnoInterface | None) –

Return type:

None

dispatch_with_notification(*args, url, cb)[source]

Do the same like XDispatch.dispatch() but notifies listener in every case.

Should be used if result must be known.

The call back event_data will contain a UNO com.sun.star.frame.DispatchResultEvent struct.

Parameters:
  • url (URL) – Specifies full parsed URL describes the feature which should be dispatched (executed).

  • args (PropertyValue, optional) – Optional arguments for this request.

  • cb (EventArgsCallbackT) – Callback that is invoked when an event is dispatched.

Return type:

None

Note

The Callback, cb, is only a one-time event for each call to this method. If needed you can use the same callback for multiple calls to this method.

Return type:

None

Parameters:
  • args (PropertyValue) –

  • url (com.sun.star.util.URL) –

  • cb (Any) –