Class ActionTriggerItem

class ooodev.gui.menu.context.action_trigger_item.ActionTriggerItem(command_url, text, help_url='', sub_menu=None, image=None)[source]

Bases: BasePropertySet, BaseServiceInfo

Provides item.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(command_url, text, help_url='', sub_menu=None, image=None)[source]

Constructor.

Parameters:
  • command_url (str) – Contains the command URL for the menu entry.

  • text (str) – Contains the text of the menu entry.

  • help_url (str) – Contains the a URL that points to a help text.

  • sub_menu (XIndexContainer | None, optional) – Contains a sub menu. Defaults to None.

  • image (XBitmap | None) –

acquire()
Return type:

None

addPropertyChangeListener(listener, prop_name='')[source]

Adds an XPropertyChangeListener to the specified property.

An empty name registers the listener to all bound properties. If the property is not bound, the behavior is not specified.

It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • listener (com.sun.star.beans.XPropertyChangeListener) –

  • prop_name (str) –

addVetoableChangeListener(listener, prop_name='')[source]

Adds an XVetoableChangeListener to the specified property with the name PropertyName.

An empty name registers the listener to all constrained properties. If the property is not constrained, the behavior is not specified.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • listener (com.sun.star.beans.XVetoableChangeListener) –

  • prop_name (str) –

getImplementationName()[source]

Provides the implementation name of the service implementation.

Return type:

str

getPropertySetInfo()[source]

Gets the complete information of the properties provided by this object.

Returns:

Property set info.

Return type:

XPropertySetInfo

getPropertyValue(name)[source]

Gets a property value.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

Any

Parameters:

name (str) –

getSupportedServiceNames()[source]

Provides the supported service names of the implementation, including also indirect service names.

Return type:

Tuple[str]

is_separator()[source]

Gets if the item is a separator.

Returns:

False

Return type:

bool

queryInterface(a_type)
Return type:

Any

Parameters:

a_type (Any) –

release()
Return type:

None

removePropertyChangeListener(listener, prop_name='')[source]

removes an XPropertyChangeListener from the listener list.

It is a noop if the listener is not registered.

It is suggested to allow multiple registration of the same listener, thus for each time a listener is added, it has to be removed.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • listener (com.sun.star.beans.XPropertyChangeListener) –

  • prop_name (str) –

removeVetoableChangeListener(listener, prop_name='')[source]

removes an XVetoableChangeListener from the listener list.

It is a noop if the listener is not registered.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • listener (com.sun.star.beans.XVetoableChangeListener) –

  • prop_name (str) –

setPropertyValue(name, value)[source]

Sets the value of the property with the specified name.

If it is a bound property the value will be changed before the change event is fired. If it is a constrained property a vetoable event is fired before the property value can be changed.

Raises:
  • com.sun.star.beans.UnknownPropertyExceptionUnknownPropertyException

  • com.sun.star.beans.PropertyVetoExceptionPropertyVetoException

  • com.sun.star.lang.IllegalArgumentExceptionIllegalArgumentException

  • com.sun.star.lang.WrappedTargetExceptionWrappedTargetException

Return type:

None

Parameters:
  • name (str) –

  • value (Any) –

supportsService(name)[source]

Tests whether the specified service is supported, i.e.

implemented by the implementation.

Return type:

bool

Parameters:

name (str) –

property CommandURL: str

Command URL

Return type:

str

property HelpURL: str

Help URL

Return type:

str

property Image: XBitmap | None
Return type:

XBitmap | None

property SubContainer: XIndexContainer | None

Sub Container

Return type:

XIndexContainer | None

property Text: str
Return type:

str