ooodev.adapter.awt.size_struct_generic_comp module

class ooodev.adapter.awt.size_struct_generic_comp.SizeStructGenericComp(component, unit, prop_name, event_provider=None)[source]

Bases: StructBase[Size], Generic[_T]

Generic Size Struct.

This class raises an event before and after a property is changed if it has been passed an event provider.

The event raised before the property is changed is called generic_com_sun_star_awt_Size_changing. The event raised after the property is changed is called generic_com_sun_star_awt_Size_changed.

The event args for before the property is changed is of type KeyValCancelArgs. The event args for after the property is changed is of type KeyValArgs.

__init__(component, unit, prop_name, event_provider=None)[source]

Constructor

Parameters:
  • component (Size) – Size.

  • unit (Type[UnitT]) – Unit Type.

  • prop_name (str) – Property Name. This value is assigned to the prop_name of event_data.

  • event_provider (EventsT, optional) – Event Provider.

Return type:

None

property height: _T

Gets/Sets the the Height.

When setting the value can be a int in 1/100th mm units or a UnitT measurement unit.

Returns:

UnitT measurement unit.

Return type:

_T

property width: _T

Gets/Sets the Width.

When setting the value can be a int in 1/100th mm units or a UnitT measurement unit.

Returns:

UnitT measurement unit.

Return type:

_T