pub struct SemanticsNode {
pub id: WidgetId,
pub parent: Option<WidgetId>,
pub children: Vec<WidgetId>,
pub role: Role,
pub label: Option<String>,
pub value: Option<String>,
pub bounds: Rect,
pub focusable: bool,
pub disabled: bool,
pub focused: bool,
pub pressable: bool,
}Expand description
One node of the projected tree, in the form a backend reads.
id, parent and children name projected nodes only, so the backend can
build a tree whose nodes all carry a role. children is the list the
projection reports: the children of an unprojected widget attach to the
nearest projected ancestor.
Fields§
§id: WidgetIdThe id of the widget this node projects.
parent: Option<WidgetId>The id of the nearest projected ancestor, or None for the root.
children: Vec<WidgetId>The ids of the projected children, in paint order.
role: RoleThe kind of control the node represents.
label: Option<String>The accessible name.
value: Option<String>The current value.
bounds: RectThe node’s absolute rectangle in logical pixels, as the last layout pass left it.
focusable: boolWhether the node can take the keyboard focus.
disabled: boolWhether the node is disabled.
focused: boolWhether the node holds the keyboard focus.
pressable: boolWhether a press on the node runs a handler, so the backend can offer the press action.