Class BuilderItem
Bases:
Item
Class that represents a popup item for the popup menu builder.
- Parameters:
text (str) –
command (str | Command) –
style (int | MenuItemStyleEnum) –
checked (bool) –
enabled (bool) –
default (bool) –
help_text (str) –
help_command (str) –
tip_help_text (str) –
shortcut (str) –
module (ModuleNamesKind | str | None) –
submenu (List[Item] | None) –
Constructor
- Parameters:
text (str, optional) – Text.
command (str, Command, optional) – Command.
style (int, MenuItemStyleEnum, optional) – Style. Defaults to
0
.checked (bool, optional) – Check state. Defaults to
False
.enabled (bool, optional) – Enable State. Defaults to
True
.default (bool, optional) – Specifies if entry is default. Defaults to
False
.help_text (str, optional) – Help Text.
help_command (str, optional) – Help command.
tip_help_text (str, optional) – Tip Help Text.
shortcut (str, optional) – Shortcut.
module (Any, optional) – Module. Defaults to
None
.submenu (List[Item] | None) –
- Return type:
None
Hint
MenuItemStyleEnum
is an enum and can be imported fromooo.dyn.awt.menu_item_style
.ModuleNamesKind
is an enum and can be imported fromooodev.utils.kind.module_names_kind
.Command
can be imported fromooodev.gui.menu.common.command
.
Adds a new popup item to the submenu.
- Parameters:
text (str, optional) – Text.
command (str, optional) – Command.
style (int, MenuItemStyleEnum, optional) – Style. Defaults to
0
.checked (bool, optional) – Check state. Defaults to
False
.enabled (bool, optional) – Enable State. Defaults to
True
.default (bool, optional) – Specifies if entry is default. Defaults to
False
.help_text (str, optional) – Help Text.
help_command (str, optional) – Help command.
tip_help_text (str, optional) – Tip Help Text.
shortcut (str, optional) – Shortcut.
module (Any, optional) – Module. Defaults to
None
.
- Returns:
The new popup item.
- Return type:
Hint
MenuItemStyleEnum
is an enum and can be imported fromooo.dyn.awt.menu_item_style
.ModuleNamesKind
is an enum and can be imported fromooodev.utils.kind.module_names_kind
.Command
can be imported fromooodev.gui.menu.common.command
.
Adds a new separator to the submenu.
- Returns:
The new separator.
- Return type:
Inserts a new popup item to the submenu.
- Parameters:
idx (int) – Index.
text (str, optional) – Text.
command (str, Command, optional) – Command.
style (int, MenuItemStyleEnum, optional) – Style. Defaults to
0
.checked (bool, optional) – Check state. Defaults to
False
.enabled (bool, optional) – Enable State. Defaults to
True
.default (bool, optional) – Specifies if entry is default. Defaults to
False
.help_text (str, optional) – Help Text.
help_command (str, optional) – Help command.
tip_help_text (str, optional) – Tip Help Text.
shortcut (str, optional) – Shortcut.
module (Any, optional) – Module. Defaults to
None
.
- Returns:
The new popup item.
- Return type:
Hint
MenuItemStyleEnum
is an enum and can be imported fromooo.dyn.awt.menu_item_style
.ModuleNamesKind
is an enum and can be imported fromooodev.utils.kind.module_names_kind
.Command
can be imported fromooodev.gui.menu.common.command
.
Adds a new separator to the submenu.
- Returns:
The new separator.
- Return type:
- Parameters:
idx (int) –
- Return type:
Dict
[str
,Any
]
Gets/Sets Check state.
- Return type:
bool
Gets/Sets Command.
- Return type:
str | Command
Gets/Sets if entry is default.
- Return type:
bool
Gets/Sets Enable State.
- Return type:
bool
Gets/Sets Help command.
- Return type:
str
Gets/Sets Help Text.
- Return type:
str
Gets if item is a separator.
- Return type:
bool
Gets/Sets Module.
- Return type:
Any
Gets/Sets Shortcut.
- Return type:
str
Gets/Sets Style.
- Return type:
int
Gets Submenu.
Gets/Sets Text.
- Return type:
str
Gets/Sets Tip Help Text.
- Return type:
str