mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
ItemVTable::init(...): Take an ItemRc so that the itan can know where in the Item Tree it is located
This commit is contained in:
parent
a866c6cf57
commit
d47d52bf52
23 changed files with 86 additions and 71 deletions
|
@ -728,14 +728,12 @@ inline LayoutInfo LayoutInfo::merge(const LayoutInfo &other) const
|
|||
|
||||
namespace private_api {
|
||||
|
||||
template<typename Component, typename ItemArray>
|
||||
static void register_component(const std::optional<slint::Window> &maybe_window, Component *c,
|
||||
ItemArray items)
|
||||
inline static void register_component(const vtable::VRc<ComponentVTable> *c,
|
||||
const std::optional<slint::Window> &maybe_window)
|
||||
{
|
||||
const cbindgen_private::WindowAdapterRcOpaque *window_ptr =
|
||||
maybe_window.has_value() ? &maybe_window->window_handle().handle() : nullptr;
|
||||
cbindgen_private::slint_register_component(
|
||||
vtable::VRef<ComponentVTable> { &Component::static_vtable, c }, items, window_ptr);
|
||||
cbindgen_private::slint_register_component(c, window_ptr);
|
||||
}
|
||||
|
||||
inline SharedVector<float> solve_box_layout(const cbindgen_private::BoxLayoutData &data,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue