Commit graph

20 commits

Author SHA1 Message Date
Tobias Hunger
e6b24bceec [reorg]: Set up and populate the internal directory
Move "internal" crates into the `internal` directory. This first batch
includes most of sixtyfps_runtime but leaves the rendering backends
alone for now.

pre-commit applied some cleanups to the moved files:
 - Consistent newline at end of file policy
 - trimming trailing whitespace
 - Formatting Cargo.toml files.
2022-01-31 16:00:50 +01:00
Olivier Goffart
0259c0dc9b Give a return type to llr::Expression::ExtraBuiltinFunctionCall
Some code in the C++ generator needs the type of such expressions
2022-01-19 10:02:23 +01:00
Simon Hausmann
9f43b54fa6 Simplify llr::Expression::Condition
Remove the `Option` of the `false_expr` since it's always constructed as
`Some`.
2022-01-14 15:49:09 +01:00
Olivier Goffart
d3a9437309 Support for writing in the model with the [] syntax 2022-01-14 13:38:25 +01:00
Simon Hausmann
f23b789a80 Fix Rust compilation of array indexing
Pass the array indexing through the llr.
2022-01-14 13:38:25 +01:00
Simon Hausmann
5f97a3c39f Move EvaluationContext from the rust generator into the llr
For re-use in the C++ generator
2022-01-14 09:40:03 +01:00
Simon Hausmann
c92957d6b0 Re-run cargo fmt 2022-01-12 16:22:35 +01:00
Olivier Goffart
23219938e9 Apply suggestions from code review
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2022-01-12 16:22:35 +01:00
Olivier Goffart
c23d151d6d LLR: handle setup_code
Used to initialize the fonts and the initial focus
2022-01-12 16:22:35 +01:00
Olivier Goffart
ab584da8ce Another fix to llr::Expression::ty
To make sure the generated code does the correct casts
2022-01-12 16:22:35 +01:00
Olivier Goffart
7d134a6460 LLR: fix visiting code blocks
Fixes issues with return statements
2022-01-12 16:22:35 +01:00
Olivier Goffart
0ea844a6dc LLR: Handle the Dialog properly
The cells needs to be stored in an intermediate mutable array
2022-01-12 16:22:35 +01:00
Simon Hausmann
31471fcf89 Complete path support in the llr / rust generator
This patch takes care of the lowering of events/coordinates arrays as
path data, which originates from a `commands: ...` string of SVG path
commands.

In order to minimize the path specific code in the generator, the
compile_paths now generates a Vec<Expression> for the events and
coordinates.
2022-01-12 16:22:35 +01:00
Olivier Goffart
8b15fc5ae4 LLR: Support for box layout with repeater 2022-01-12 16:22:35 +01:00
Olivier Goffart
07ea17fe71 LLR: Fix the repeater indices 2022-01-12 16:22:35 +01:00
Simon Hausmann
9e61d4168b Fix build of Paths with path elements with rust/llr
A `Path` with `MoveTo`/`LineTo`/etc. sub-elements now maps to an Expression::PathData of type
Type::PathData.

The llr lowering creates an Array of Type::PathElement, which is casted to PathData.

This only covers the element case. The compiled path events are still todo.
2022-01-12 16:22:35 +01:00
Olivier Goffart
a11714fefb LLR: More work
Fix animations and public fields and callbacks
2022-01-12 16:22:35 +01:00
Olivier Goffart
24b01057d0 Add the orientation in llr::Expression::BoxLayoutCellDataArray 2022-01-12 16:22:35 +01:00
Olivier Goffart
d395e92f3f More work on LLR
generate the actual tree and support a bunch more of expressions
2022-01-12 16:22:35 +01:00
Olivier Goffart
53c3e6a279 WIP: introduce the new llr module (Low Level Representation)
The main thing here is that the Component are in different data structure
depending on whether they are sub-component global component or repeated component

Then the properties at are the right place and there will be no more lookup
in the base. The PropertyReference knows how to access which property via which
element and such.

The idea is that it will be easier to lower from this representation than
what we currently do in each language backend.

This commit is still WIP, it is far from finished
2022-01-12 16:22:35 +01:00