mirror of
https://github.com/slint-ui/slint.git
synced 2025-10-01 06:11:16 +00:00
Cpp: Give each generated component a ComponentWindow
That's a counted reference to the window in the run-time and avoids the need to do the parent->parent->window dance.
This commit is contained in:
parent
f9ced44188
commit
54ee7b3556
4 changed files with 45 additions and 30 deletions
|
@ -77,7 +77,10 @@ class ComponentWindow
|
|||
public:
|
||||
ComponentWindow() { cbindgen_private::sixtyfps_component_window_init(&inner); }
|
||||
~ComponentWindow() { cbindgen_private::sixtyfps_component_window_drop(&inner); }
|
||||
ComponentWindow(const ComponentWindow &) = delete;
|
||||
ComponentWindow(const ComponentWindow &other)
|
||||
{
|
||||
cbindgen_private::sixtyfps_component_window_clone(&other.inner, &inner);
|
||||
}
|
||||
ComponentWindow(ComponentWindow &&) = delete;
|
||||
ComponentWindow &operator=(const ComponentWindow &) = delete;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue