Access the properties in the parent component of a repeated element

This required some refactoring of the EvaluationContext structure to include the parent context
This commit is contained in:
Olivier Goffart 2020-06-22 14:38:38 +02:00
parent 53e61629ca
commit f8b7989c0b
16 changed files with 249 additions and 101 deletions

View file

@ -72,6 +72,14 @@ constexpr inline ItemTreeNode<uint8_t> make_dyn_node(std::uintptr_t offset)
using internal::sixtyfps_visit_item_tree;
template<typename Component>
EvaluationContext evaluation_context_for_root_component(Component *component) {
return EvaluationContext{
VRef<ComponentVTable> { &Component::component_type, component},
nullptr,
};
}
// layouts:
using internal::Slice;
using internal::solve_grid_layout;