Class MenuItemSub
- class ooodev.gui.menu.item.MenuItemSub(*, menu, data, owner, app='', lo_inst=None)[source]
Bases:
MenuItem
Menu Item
- Parameters:
menu (Menu) –
data (Tuple[Tuple[PropertyValue, ...], ...]) –
owner (IndexAccessComp) –
app (str | Service) –
lo_inst (LoInst | None) –
- __init__(*, menu, data, owner, app='', lo_inst=None)[source]
Constructor
- Parameters:
data (Tuple[Tuple[PropertyValue, ...], ...]) – UNO Object containing menu item properties.
owner (IndexAccessComp) – Parent menu.
app (str | Service, optional) – Name LibreOffice module. Defaults to “”.
lo_inst (LoInst | None, optional) – Lo Instance. Defaults to Current Lo Instance.
menu (Menu) –
- execute(in_thread=False)
Execute menu item
- Return type:
bool
- Parameters:
in_thread (bool) –
- get_dispatch()
Get dispatch object.
If the menu item is disabled, this method will return None.
- Return type:
DispatchComp | None
- is_enabled()
Check if menu item is enabled
- Return type:
bool
- property app: str
Get app
- Return type:
str
- property command: str
Get/Set command
- Return type:
str
- property data: Tuple[Tuple[PropertyValue, ...], ...]
Get menu data
- Return type:
Tuple
[Tuple
[PropertyValue
,...
],...
]
- property data_dict: Dict[str, Any]
Get menu data as dictionary
- Return type:
Dict
[str
,Any
]
- property help_url: str
Get/Set help text
- Return type:
str
- property item_kind: MenuItemKind
Get item kind.
- Returns:
MenuItemKind.ITEM_SUBMENU
.- Return type:
Hint
MenuItemKind
is an enum and can be imported fromooodev.gui.menu.item.menu_item_kind
.
- property label: str
Get/Set label
- Return type:
str
- property menu_type: int
Get menu type.
- Returns:
Menu type.
0
forMenuItem
,1
forMenuItemSep
.- Return type:
int
- property style: ItemStyleKind
Get/Set style
Hint
ItemStyleKind
is an enum and can be imported fromooodev.utils.kind.item_style_kind
.
- Return type: