Class Windowο
Defined in File slint.h
Class Documentationο
-
class slint::Windowο
This class represents a window towards the windowing system, thatβs used to render the scene of a component. It provides API to control windowing system specific aspects such as the position on the screen.
Public Functions
-
~Window() = defaultο
Destroys this window. Window instances are explicitly shared and reference counted. If this window instance is the last one referencing the window towards the windowing system, then it will also become hidden and destroyed.
-
inline void show()ο
Registers the window with the windowing system in order to make it visible on the screen.
-
inline void hide()ο
De-registers the window from the windowing system, therefore hiding it.
-
template<typename F>
inline std::optional<SetRenderingNotifierError> set_rendering_notifier(F &&callback) constο 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 returns the error code as value in the std::optional.
-
template<typename F>
inline void on_close_requested(F &&callback) constο This function allows registering a callback thatβs invoked when the user tries to close a window. The callback has to return a CloseRequestResponse.
-
inline void request_redraw() constο
This function issues a request to the windowing system to redraw the contents of the window.
-
~Window() = defaultο