ooodev.adapter.awt.toolkit_partial module

class ooodev.adapter.awt.toolkit_partial.ToolkitPartial(component, interface=com.sun.star.awt.XToolkit)[source]

Bases: object

Partial class for XToolkit.

Parameters:
  • component (XToolkit) –

  • interface (UnoInterface | None) –

__init__(component, interface=com.sun.star.awt.XToolkit)[source]

Constructor

Parameters:
  • component (XToolkit) – UNO Component that implements com.sun.star.awt.XToolkit interface.

  • interface (UnoInterface, optional) – The interface to be validated. Defaults to XToolkit.

Return type:

None

create_region()[source]

Creates a region.

Return type:

XRegion

create_screen_compatible_device(width, height)[source]

Creates a virtual device that is compatible with the screen.

Return type:

XDevice

Parameters:
  • width (int) –

  • height (int) –

create_window(descriptor)[source]

Creates a new window using the given descriptor.

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

XWindowPeer

Parameters:

descriptor (com.sun.star.awt.WindowDescriptor) –

create_windows(*descriptors)[source]

Gets a sequence of windows which are newly created using the given descriptors.

Raises:

com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

Return type:

Tuple[XWindowPeer, ...]

Parameters:

descriptors (com.sun.star.awt.WindowDescriptor) –

get_desktop_window()[source]

Gets the desktop window.

Return type:

XWindowPeer

get_work_area()[source]

For LibreOffice versions < 4.1, this method just returned an empty rectangle.

After that, it started returning a valid value.

Return type:

Rectangle