ooodev.adapter.beans.vetoable_change_implement module
- class ooodev.adapter.beans.vetoable_change_implement.VetoableChangeImplement(component, trigger_args=None, cb=None)[source]
Bases:
object
Class for managing Vetoable Change Events.
This class can be used to extend a class that already implements or uses
com.sun.star.beans.XPropertySet
in some way.- Parameters:
component (XPropertySet) –
trigger_args (GenericArgs | None) –
cb (ListenerEventCallbackT | None) –
- __init__(component, trigger_args=None, cb=None)[source]
Constructor
- Parameters:
component (XPropertySet) – UNO Component that implements
com.sun.star.beans.XPropertySet
.trigger_args (GenericArgs, optional) – Args that are passed to events when they are triggered.
cb (ListenerEventCallbackT | None, optional) – Callback that is invoked when an event is added or removed.
- Return type:
None
- add_event_vetoable_change(name, cb)[source]
Adds a listener for an event.
Event is invoked when property is changed.
The callback
EventArgs.event_data
will contain acom.sun.star.beans.PropertyChangeEvent
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None
- add_event_vetoable_change_events_disposing(name, cb)[source]
Adds a listener for an event.
Event is invoked when the property listener is about to be disposed.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.lang.EventObject
struct.- Parameters:
name (str) – Property Name
cb (EventArgsCallbackT) – Callback
- Return type:
None