Keyboard input, text input elements
This commit is contained in:
@@ -48,6 +48,7 @@ pub struct HitTarget {
|
||||
pub path: LayoutPath,
|
||||
pub element_id: Option<ElementId>,
|
||||
pub rect: Rect,
|
||||
pub focusable: bool,
|
||||
pub cursor: CursorIcon,
|
||||
}
|
||||
|
||||
@@ -57,6 +58,7 @@ pub struct LayoutNode {
|
||||
pub element_id: Option<ElementId>,
|
||||
pub rect: Rect,
|
||||
pub pointer_events: bool,
|
||||
pub focusable: bool,
|
||||
pub cursor: CursorIcon,
|
||||
pub prepared_text: Option<PreparedText>,
|
||||
pub children: Vec<LayoutNode>,
|
||||
@@ -184,6 +186,7 @@ fn layout_element(
|
||||
element_id: element.id,
|
||||
rect,
|
||||
pointer_events: element.style.pointer_events,
|
||||
focusable: element.style.focusable,
|
||||
cursor,
|
||||
prepared_text: None,
|
||||
children: Vec::new(),
|
||||
@@ -330,6 +333,7 @@ fn hit_path_node(node: &LayoutNode, point: crate::scene::Point) -> Option<Vec<Hi
|
||||
path: node.path.clone(),
|
||||
element_id: node.element_id,
|
||||
rect: node.rect,
|
||||
focusable: node.focusable,
|
||||
cursor: node.cursor,
|
||||
});
|
||||
}
|
||||
@@ -342,6 +346,7 @@ fn hit_path_node(node: &LayoutNode, point: crate::scene::Point) -> Option<Vec<Hi
|
||||
path: node.path.clone(),
|
||||
element_id: node.element_id,
|
||||
rect: node.rect,
|
||||
focusable: node.focusable,
|
||||
cursor: node.cursor,
|
||||
}]);
|
||||
}
|
||||
@@ -373,6 +378,7 @@ fn text_hit_test_node(node: &LayoutNode, point: crate::scene::Point) -> Option<T
|
||||
path: node.path.clone(),
|
||||
element_id: node.element_id,
|
||||
rect: node.rect,
|
||||
focusable: node.focusable,
|
||||
cursor: node.cursor,
|
||||
},
|
||||
byte_offset: prepared_text.byte_offset_for_position(point),
|
||||
|
||||
Reference in New Issue
Block a user