Rename ComponentVTable to ItemTreeVTable

and their related name.
Also move the component module in the item_Tree module
register_component -> register_item_tree
ComponentItemTree -> ItemTreeNodeArray

For #3323

Rationale from that issue:

Right now, we use the term `component` in the Slint language and in the compiler to be a a tree of elements that can be used as an element in a .slint file.

The term is also currently used in the runtime as a tree of runtime Items that are allocated together. (declared in ComponentVTable)

But there are no 1 to 1 mapping between a `component` in the slint language, and a runtime Component.
(for example, the items behind a `if` or `for` or `PopupMenu` are in a different runtime component. And `component` declared in Slint are often inlined)

So we should rename the internal runtime `Component` to  `ItemTree`

The currently public `slint::ComponentHandle` wraps the "root" of the ItemTree, but that's ok because it is generated from a .slint `component`,  so it doesn't change name
This commit is contained in:
Olivier Goffart 2023-10-07 12:11:33 +02:00 committed by Olivier Goffart
parent 186c3ef3cb
commit 852b4d906d
37 changed files with 641 additions and 690 deletions

View file

@ -538,7 +538,7 @@ class ComponentInstance : vtable::Dyn
ComponentInstance &operator=(ComponentInstance &) = delete;
friend class ComponentDefinition;
// ComponentHandle<ComponentInstance> is in fact a VRc<ComponentVTable, ErasedComponentBox>
// ComponentHandle<ComponentInstance> is in fact a VRc<ItemTreeVTable, ErasedComponentBox>
const cbindgen_private::ErasedComponentBox *inner() const
{
slint::private_api::assert_main_thread();