Document show()/hide()'s behavior of the additional strong component reference

This commit is contained in:
Simon Hausmann 2023-08-25 15:50:26 +02:00 committed by Simon Hausmann
parent a98e07417e
commit 11128b3b7f
3 changed files with 31 additions and 16 deletions

View file

@ -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;
};
}
}