mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 10:50:00 +00:00
Document show()/hide()'s behavior of the additional strong component reference
This commit is contained in:
parent
a98e07417e
commit
11128b3b7f
3 changed files with 31 additions and 16 deletions
|
@ -254,9 +254,15 @@ public:
|
|||
/// system, then it will also become hidden and destroyed.
|
||||
~Window() = default;
|
||||
|
||||
/// Registers the window with the windowing system in order to make it visible on the screen.
|
||||
/// Shows the window on the screen. An additional strong reference on the
|
||||
/// associated component is maintained while the window is visible.
|
||||
///
|
||||
/// Call hide() to make the window invisible again, and drop the additional
|
||||
/// strong reference.
|
||||
void show() { inner.show(); }
|
||||
/// De-registers the window from the windowing system, therefore hiding it.
|
||||
/// Hides the window, so that it is not visible anymore. The additional strong
|
||||
/// reference on the associated component, that was created when show() was called, is
|
||||
/// dropped.
|
||||
void hide() { inner.hide(); }
|
||||
|
||||
/// Returns the visibility state of the window. This function can return false even if you
|
||||
|
@ -494,4 +500,4 @@ private:
|
|||
private_api::WindowAdapterRc inner;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue