wijjit.layout.engine.ElementNode
- class wijjit.layout.engine.ElementNode(element, width='auto', height='auto')[source]
Layout node wrapping a single Element.
- Parameters:
- Variables:
element (
Element) – The wrapped element
Methods
__init__(element[, width, height])assign_bounds(x, y, width, height)Assign bounds to this node and its element.
Calculate size constraints based on element content.
Return the wrapped element and any nested children.
get_height_for_width(width)Re-measure the wrapped element against its settled width.
- calculate_constraints()[source]
Calculate size constraints based on element content.
For now, uses simple heuristics. Elements can override this by providing their own size hints.
- Returns:
Calculated constraints
- Return type:
- collect_elements()[source]
Return the wrapped element and any nested children.
- Returns:
List containing the element and any nested children it contains
- Return type:
listofElement
Notes
If the element has a collect_child_elements() method (e.g., TabbedPanel), those nested elements are also included for focus/mouse event routing.