Class PopupItem

class ooodev.gui.menu.popup.PopupItem(text, menu_id, command, style, checked, enabled, default, help_command, help_text, tip_help_text, shortcut, index=-1, data=None)[source]

Class for individual menu item

Parameters:
  • text (str) –

  • menu_id (int) –

  • command (str) –

  • style (int) –

  • checked (bool) –

  • enabled (bool) –

  • default (bool) –

  • help_command (str) –

  • help_text (str) –

  • tip_help_text (str) –

  • shortcut (str) –

  • index (int) –

  • data (Any) –

__init__(text, menu_id, command, style, checked, enabled, default, help_command, help_text, tip_help_text, shortcut, index=-1, data=None)
Parameters:
  • text (str) –

  • menu_id (int) –

  • command (str) –

  • style (int) –

  • checked (bool) –

  • enabled (bool) –

  • default (bool) –

  • help_command (str) –

  • help_text (str) –

  • tip_help_text (str) –

  • shortcut (str) –

  • index (int) –

  • data (Any | None) –

Return type:

None

is_separator()[source]

Check if item is separator

Return type:

bool

checked: bool

Menu check state.

command: str

Menu Command.

data: Any = None

Data associated with menu item. Defaults to None.

default: bool

Specifies if menu is default item.

enabled: bool

Menu enable state.

help_command: str

Help command.

help_text: str

Help text.

index: int = -1

Menu index, Defaults to -1.

menu_id: int

Menu ID.

shortcut: str

One or more shortcuts separated by semicolon.

style: int

Menu Style.

text: str

Menu Text.

tip_help_text: str

Tip help text.