ooodev.adapter.awt.top_window_listener module

class ooodev.adapter.awt.top_window_listener.TopWindowListener(trigger_args=None, add_listener=True)[source]

Bases: AdapterBase, XTopWindowListener

Makes it possible to receive window events.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(trigger_args=None, add_listener=True)[source]

Constructor:

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

  • add_listener (bool, optional) – If True listener is automatically added. Default True.

Return type:

None

disposing(event)[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:

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

windowActivated(event)[source]

Event is invoked when a window is activated.

Return type:

None

Parameters:

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

windowClosed(event)[source]

Event is invoked when a window has been closed.

Return type:

None

Parameters:

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

windowClosing(event)[source]

Event is invoked when a window is in the process of being closed.

The close operation can be overridden at this point.

Return type:

None

Parameters:

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

windowDeactivated(event)[source]

Event is invoked when a window is deactivated.

Return type:

None

Parameters:

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

windowMinimized(event)[source]

Event is invoked when a window is iconified.

Return type:

None

Parameters:

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

windowNormalized(event)[source]

Event is invoked when a window is deiconified.

Return type:

None

Parameters:

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

windowOpened(event)[source]

Event is is invoked when a window has been opened.

Return type:

None

Parameters:

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

property toolkit: XExtendedToolkit | None

Gets the toolkit instance if it was created in the constructor by setting the add_listener parameter to True.

Returns:

Toolkit instance.

Return type:

XExtendedToolkit

New in version 0.13.6.