ooodev.adapter.awt.control_partial module

class ooodev.adapter.awt.control_partial.ControlPartial(component, interface=com.sun.star.awt.XControl)[source]

Bases: object

Partial Class for XControl.

Parameters:
  • component (XControl) –

  • interface (UnoInterface | None) –

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

Constructor

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

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

Return type:

None

add_event_listener(listener)[source]

Adds an event listener to the component.

Parameters:

listener (XEventListener) – The event listener to be added.

Return type:

None

create_peer(toolkit, parent)[source]

Creates a child window on the screen.

If the parent is None, then the desktop window of the toolkit is the parent.

Return type:

None

Parameters:
  • toolkit (com.sun.star.awt.XToolkit) –

  • parent (com.sun.star.awt.XWindowPeer) –

dispose()[source]

Disposes the component.

Return type:

None

get_context()[source]

Gets the context of the control.

Return type:

XInterface

get_model()[source]

Gets the model for this control.

Return type:

XControlModel

get_peer()[source]

Gets the peer which was previously created or set.

Return type:

XWindowPeer

get_view()[source]

Gets the view of this control.

Return type:

XView

is_design_mode()[source]

Returns True if the control is in design mode, False otherwise.

Return type:

bool

is_transparent()[source]

Returns True if the control is transparent, False otherwise.

Return type:

bool

remove_event_listener(listener)[source]

Removes an event listener from the component.

Parameters:

listener (XEventListener) – The event listener to be removed.

Return type:

None

set_context(ctx)[source]

Sets the context of the control.

Return type:

None

Parameters:

ctx (com.sun.star.uno.XInterface) –

set_design_mode(on)[source]

Sets the design mode for use in a design editor.

Normally the control will be painted directly without a peer.

Return type:

None

Parameters:

on (bool) –

set_model(model)[source]

Sets a model for the control.

Return type:

bool

Parameters:

model (com.sun.star.awt.XControlModel) –