nanome.api.ui.menu module¶
-
class
Menu
(index=0, title='title')[source]¶ Bases:
nanome._internal.ui.models._Menu
Represents a menu for a plugin-
find_content
(content_id)[source]¶ - Finds a piece of content by its content ID.
Parameters: content_id ( int
) – the ID of the content to findReturns: The UI content on this menu matching the ID Return type: UIBase
-
get_all_content
()[source]¶ - Gets all content from this menu
Returns: A list of all UI content on this menu Return type: list
<UIBase
>
-
get_all_nodes
()[source]¶ - Gets all LayoutNodes from this menu
Returns: A list of all LayoutNodes on this menu Return type: list
<LayoutNode
>
-
index
¶ - The index of the menu.Used to determine a menu’s identity.Menus with the same index will replace one another when updated.
Type: int
-
io
= <nanome.api.ui.io.menu_io.MenuIO object>¶
-
register_closed_callback
(func)[source]¶ - Registers a function to be called when the menu’s close button is pressed.
Parameters: func (method ( Menu
) -> None) – called the menu is closed
-
root
¶ - The hierarchical root LayoutNode of the menu
Type: LayoutNode
-