## Layout
- inequality
- var.suggest_value()
- var.add_edit_variable
GridLayout {
row1+...rown = grid.height (REQUIRED)
col1+...+coln = grid.width (REQUIRED)
row1=row2=...grid.height / n (WEAK)
col1=col2=...grid.height / n (WEAK)
}
render() {
self.layout()
}
layout() {
// visit all nodes, add constraint
();
}
add_layout_constraint(&self) {
}
1. layout(size)
each child . add_layout_constraint()
2. draw
-
## entrypoint draw methods
```rs
axis.draw_to_ctx(size, ctx)
axis.draw_to_png(size, path)
axis.draw_to_pdf(size, path)
```
## internal nodes draw methods
```
axis.render(ctx)
axis.layout(solver)
```
## Protrusion
- Does every widget have protrusion? Y
- Can a user manually align protrusions? Y
-
A Protrusion is a property of a widget, not a property of a grid.
This means we can have a protrusion without a grid.
For example, the root widget can be an axis with a title in its top protrusion.