ooodev.adapter.awt.spin_events module
- class ooodev.adapter.awt.spin_events.SpinEvents(trigger_args=None, cb=None, listener=None, subscriber=None)[source]
Bases:
object
Class for managing Spin Events.
This class is usually inherited by control classes that implement
com.sun.star.awt.XSpinListener
.- Parameters:
trigger_args (GenericArgs | None) –
cb (ListenerEventCallbackT | None) –
listener (SpinListener | None) –
subscriber (XSpinField | None) –
- __init__(trigger_args=None, cb=None, listener=None, subscriber=None)[source]
Constructor
- Parameters:
trigger_args (GenericArgs, optional) – Args that are passed to events when they are triggered. This only applies if the listener is not passed.
cb (ListenerEventCallbackT | None, optional) – Callback that is invoked when an event is added or removed.
listener (SpinListener | None, optional) – Listener that is used to manage events.
subscriber (XSpinField, optional) – An UNO object that implements the
XSpinField
interface. If passed in then this instance listener is automatically added to it.
- Return type:
None
- add_event_down(cb)[source]
Adds a listener for an event.
Event is invoked when the spin field is spun down.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.awt.SpinEvent
struct.- Return type:
None
- Parameters:
cb (Any) –
- add_event_first(cb)[source]
Adds a listener for an event.
Event is invoked when the spin field is set to the lower value.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.awt.SpinEvent
struct.- Return type:
None
- Parameters:
cb (Any) –
- add_event_last(cb)[source]
Adds a listener for an event.
Event is invoked when the spin field is set to the upper value.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.awt.SpinEvent
struct.- Return type:
None
- Parameters:
cb (Any) –
- add_event_spin_events_disposing(cb)[source]
Adds a listener for an event.
Event is invoked when the broadcaster is about to be disposed.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.lang.EventObject
struct.- Return type:
None
- Parameters:
cb (Any) –
- add_event_up(cb)[source]
Adds a listener for an event.
Event is invoked when the spin field is spun up.
The callback
EventArgs.event_data
will contain a UNOcom.sun.star.awt.SpinEvent
struct.- Return type:
None
- Parameters:
cb (Any) –
- remove_event_down(cb)[source]
Removes a listener for an event
- Return type:
None
- Parameters:
cb (Any) –
- remove_event_first(cb)[source]
Removes a listener for an event
- Return type:
None
- Parameters:
cb (Any) –
- remove_event_last(cb)[source]
Removes a listener for an event
- Return type:
None
- Parameters:
cb (Any) –
- remove_event_spin_events_disposing(cb)[source]
Removes a listener for an event
- Return type:
None
- Parameters:
cb (Any) –
- remove_event_up(cb)[source]
Removes a listener for an event
- Return type:
None
- Parameters:
cb (Any) –
- property events_listener_spin: SpinListener
Returns listener
- Return type:
- ooodev.adapter.awt.spin_events.on_lazy_cb(source, event)[source]
Callback that is invoked when an event is added or removed.
This method is generally used to add the listener to the component in a lazy manner. This means this callback will only be called once in the lifetime of the component.
- Parameters:
source (Any) – Expected to be an instance of SpinEvents that is a partial class of a component based class.
event (ListenerEventArgs) – Event arguments.
- Return type:
None
Warning
This method is intended for internal use only.