nanome.api.ui.layout_node module¶
-
class
LayoutNode
(name='node')[source]¶ Bases:
nanome._internal.ui.models._LayoutNode
Class for hierarchical UI objects representing part of a Nanome menu.Layout nodes are used to create menus, by defining where one UI element should be placed relative to another.One LayoutNode can contain one interactive UI element as well as any number of child Layout Nodes.Parameters: name ( str
) – Name of the node, used to identify it and find it later-
class
LayoutTypes
¶ Bases:
enum.IntEnum
Orientation modes for Layout Nodes.To be used with ui.LayoutNode().layout_orientation-
horizontal
= 1¶
-
vertical
= 0¶
-
-
class
PaddingTypes
¶ Bases:
enum.IntEnum
UI padding types.To be used with ui.LayoutNode().padding_type-
fixed
= 0¶
-
ratio
= 1¶
-
-
class
SizingTypes
¶ Bases:
enum.IntEnum
Ways in which a Layout Node can be sized within a UI layout.To be used with ui.LayoutNode().sizing_type-
expand
= 0¶
-
fixed
= 1¶
-
ratio
= 2¶
-
-
children
¶
-
content
¶
-
enabled
¶ - Defines if layout node is visible.If disabled, it will not influence the menu layout.
Type: bool
-
find_node
(name, recursively=True)[source]¶ - Checks child nodes for a node of the matching name.If “recursively” is True, this also checks all descending nodes.
Parameters: name (str) – Name of the node to find. Returns: LayoutNode with matching name Return type: LayoutNode
-
io
= <nanome.api.ui.io.layout_node_io.LayoutNodeIO object>¶
-
layer
¶ - The node layer. A node on layer 0 and another on layer 1 will be on different layouts, possibly overlapping
Type: int
-
layout_orientation
¶ - Defines if children node should be arranged vertically or horizontally
Type: LayoutOrientation
-
padding
¶
-
padding_type
¶ - The padding type of the LayoutNode.
Type: PaddingTypes
-
parent
¶
-
sizing_type
¶ - Defines how the node size in the layout should be calculated
Type: SizingTypes
-
sizing_value
¶ - Size of the node in its layout.Behavior is different depending of
sizing_type
Type: float
-
class