Using #component_id::item_tree for it does not work because the
public component id is not the right one, we need the one from
the current item tree which is not known at compile time
(could be several if the component is re-used accross item trees)
Also disable the code that sets the focus to the focued element for anything
but the window component: before, the setup code was only run for the
non-sub component, but now it is run for every sub component, and we
don't want to set the focus to anything that has a forward focus property
Otherwise this uses the trick of
InnnerCompo::item_tree()[self.tree_index] to retrieve the index of the
first children. This eliminates the tree_index_of_first_child member.
There are two test failures left:
One of them because accessing from within repeaters is not implemented
yet.
The second one because the self.tree_index of sub-components is not
calculated quite correctly yet when calling `init()`.
* Move the C++ elements back into private_api (despite being generated), so that struct_name_to_tokens can generate the right name in re_exports
* When generating the llr_Expression::Struct for the path elements, make sure
that all fields are filled out, to avoid an empty value expression in Expression::Struct
in the Rust generator. Since we don't generate tuples but a named struct, we must provide all fields.
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.
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.
two problems
- For the interpreter, properly handle the case of an alias to a global
- For the rust generator, we can't return a reference to a property held
in a global, so we must 'inline' the get_xx funciton on sub-components
I used a `#[cfg(..)]` instead of a feature flag because then it is enabled
for both the compiler and the lib at the same time, and since it is only a debug stuff
it does not need to be enabled within the project. So one must enable it with
`RUSTFLAGS='--cfg sixtyfps_debug_property'`
After commit becb4574c1 we'll
make sure not to set the plugin application attribute when initializing
the Qt backend. Unfortunately in the generated struct the NativeStyleMetrics field
is placed and initialized before the m_window. The Default::default() impl
calls `ensure_initialized()` with `from_qt_backend = false` because we don't
know what backend is being used. Since due to the ordering this is the first
call to `ensure_initialized()`, we'll end up setting the plugin application
attribute.
This patch fixes that by ensuring that the m_window field always comes first,
which is initialized with a call into the run-time library, which in turn
delegates to the backend. That'll be the Qt backend and we'll initialize
the application object correctly.
For the MCU port, we need to proccess the image to save them in the binary
in a convenient format.
This patch start this work by trying to anaylyze what format should an image
be using, and saving it as a texture in the binary.
The current graphical backend and the C++ frontend are not yet supported
This will allow later to be able to operate on the binding despite the
element is borrowed.
Since the Binding itself is in a RefCell, the analysis don't need to
be anymore.
To do this change, a small change in the binding_analysis logic was required
which means that we will now detect binding loop if a binding was causing
two binding loop. (before, only one binding loop was detected)