ooodev.adapter.ui.context_menu_interceptor module

class ooodev.adapter.ui.context_menu_interceptor.ContextMenuInterceptor(trigger_args=None)[source]

Bases: AdapterBase, XContextMenuInterceptor

This interface enables the object to be registered as interceptor to change context menus or prevent them from being executed.

Parameters:
  • args (Any) –

  • kwargs (Any) –

Return type:

Any

__init__(trigger_args=None)[source]

Constructor:

Parameters:

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

Return type:

None

is_menu_entry(element)[source]

Gets if whether the element is a menu element.

Return type:

bool

Parameters:

element (Any) –

is_menu_separator(element)[source]

Gets if whether the element is a menu separator.

Return type:

bool

Parameters:

element (Any) –

notifyContextMenuExecute(event)[source]

notifies the interceptor about the request to execute a ContextMenu.

The interceptor has to decide whether the menu should be executed with or without being modified or may ignore the call.

Return type:

ContextMenuInterceptorAction

Parameters:

event (com.sun.star.ui.ContextMenuExecuteEvent) –