ooodev.adapter.awt.enhanced_mouse_click_handler module

class ooodev.adapter.awt.enhanced_mouse_click_handler.EnhancedMouseClickHandler(trigger_args=None, subscriber=None)[source]

Bases: AdapterBase, XEnhancedMouseClickHandler

Makes it possible to receive enhanced events from the mouse.

since

OOo 2.0

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(trigger_args=None, subscriber=None)[source]

Constructor:

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

  • subscriber (XEnhancedMouseClickBroadcaster, optional) – An UNO object that implements the XEnhancedMouseClickBroadcaster interface. If passed in then this listener instance is automatically added to it.

Return type:

None

disposing(Source)[source]

Gets called when the broadcaster is about to be disposed.

All listeners and all other objects, which reference the broadcaster should release the reference to the source. No method should be invoked anymore on this object ( including XComponent.removeEventListener() ).

This method is called for every listener registration of derived listener interfaced, not only for registrations at XComponent.

Return type:

None

Parameters:

Source (com.sun.star.lang.EventObject) –

mousePressed(e)[source]

Event is invoked when a mouse button has been pressed on a window.

Note

When mousePressed event is invoked it will contain a CancelEventArgs instance as the trigger event. When the event is triggered the CancelEventArgs.cancel can be set to True to cancel the action. Also if canceled the CancelEventArgs.handled can be set to True to indicate that the action should be performed. The CancelEventArgs.event_data will contain the original com.sun.star.awt.EnhancedMouseEvent that triggered the update.

Return type:

bool

Parameters:

e (com.sun.star.awt.EnhancedMouseEvent) –

mouseReleased(e)[source]

Event is invoked when a mouse button has been released on a window.

Note

When mouseReleased event is invoked it will contain a CancelEventArgs instance as the trigger event. When the event is triggered the CancelEventArgs.cancel can be set to True to cancel the action. Also if canceled the CancelEventArgs.handled can be set to True to indicate that the action should be performed. The CancelEventArgs.event_data will contain the original com.sun.star.awt.EnhancedMouseEvent that triggered the update.

Return type:

bool

Parameters:

e (com.sun.star.awt.EnhancedMouseEvent) –