Add component-factory type to Slint language

Add a type "component-factory" to the Slint language.
This commit is contained in:
Tobias Hunger 2023-06-08 17:26:52 +02:00 committed by Olivier Goffart
parent ad2c98937f
commit 2840886d28
14 changed files with 40 additions and 9 deletions

View file

@ -232,6 +232,7 @@ fn to_eval_value<'cx>(
| Type::Function { .. }
| Type::Model
| Type::Callback { .. }
| Type::ComponentFactory { .. }
| Type::Easing
| Type::PathData
| Type::LayoutCache

View file

@ -188,6 +188,7 @@ The follow table summarizes the entire mapping:
| enumeration | `enum` of the same name | The values are converted to CamelCase |
| array | [`ModelRc`] | Arrays are represented as models, so that their contents can change dynamically. |
| `Point` | [`LogicalPosition`] | A struct with `x` and `y` fields, representing logical coordinates. |
| `component-factory` | [`ComponentFactory`] | A factory for components that can be added at runtime. |
For user defined structures in the .slint, an extra struct is generated.
For example, if the `.slint` contains