mirror of
https://github.com/slint-ui/slint.git
synced 2025-08-04 02:39:28 +00:00
Add is_visible to NodeJS and C++ Window types (#1816)
Amends commit 82278a5742
This commit is contained in:
parent
405b9deb2d
commit
e9db914fb1
10 changed files with 104 additions and 2 deletions
|
@ -113,6 +113,7 @@ public:
|
|||
|
||||
void show() const { slint_windowrc_show(&inner); }
|
||||
void hide() const { slint_windowrc_hide(&inner); }
|
||||
bool is_visible() const { return slint_windowrc_is_visible(&inner); }
|
||||
|
||||
float scale_factor() const { return slint_windowrc_get_scale_factor(&inner); }
|
||||
void set_scale_factor(float value) const { slint_windowrc_set_scale_factor(&inner, value); }
|
||||
|
@ -406,6 +407,10 @@ public:
|
|||
/// De-registers the window from the windowing system, therefore hiding it.
|
||||
void hide() { inner.hide(); }
|
||||
|
||||
/// Returns the visibility state of the window. This function can return false even if you
|
||||
/// previously called show() on it, for example if the user minimized the window.
|
||||
bool is_visible() const { return inner.is_visible(); }
|
||||
|
||||
/// This function allows registering a callback that's invoked during the different phases of
|
||||
/// rendering. This allows custom rendering on top or below of the scene.
|
||||
/// On success, the function returns a std::optional without value. On error, the function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue