plushie/widget/window
Window widget builder.
Types
Option type for window properties.
pub type Opt {
Title(String)
Size(Float, Float)
Width(length.Length)
Height(length.Length)
Position(Float, Float)
MinSize(Float, Float)
MaxSize(Float, Float)
Maximized(Bool)
Fullscreen(Bool)
Visible(Bool)
Resizable(Bool)
Closeable(Bool)
Minimizable(Bool)
Decorations(Bool)
Transparent(Bool)
Blur(Bool)
Level(WindowLevel)
ExitOnCloseRequest(Bool)
ScaleFactor(Float)
WindowTheme(theme.Theme)
A11y(a11y.A11y)
}
Constructors
-
Title(String) -
Size(Float, Float) -
Width(length.Length) -
Height(length.Length) -
Position(Float, Float) -
MinSize(Float, Float) -
MaxSize(Float, Float) -
Maximized(Bool) -
Fullscreen(Bool) -
Visible(Bool) -
Resizable(Bool) -
Closeable(Bool) -
Minimizable(Bool) -
Decorations(Bool) -
Transparent(Bool) -
Blur(Bool) -
Level(WindowLevel) -
ExitOnCloseRequest(Bool) -
ScaleFactor(Float) -
WindowTheme(theme.Theme) -
A11y(a11y.A11y)
pub type WindowLevel {
Normal
AlwaysOnTop
AlwaysOnBottom
}
Constructors
-
Normal -
AlwaysOnTop -
AlwaysOnBottom
Values
pub fn exit_on_close_request(w: Window, e: Bool) -> Window
Set whether to exit when close is requested.
pub fn position(w: Window, x: Float, y: Float) -> Window
Set the window position in screen coordinates.
pub fn scale_factor(w: Window, factor: Float) -> Window
Set the DPI scale factor for this window. Overrides the global scale factor from settings. Useful for per-window zoom levels.
pub fn size(w: Window, width: Float, height: Float) -> Window
Set the initial window size in pixels.
pub fn theme(w: Window, t: theme.Theme) -> Window
Set the per-window theme. Overrides the app-level theme from settings
for this window only. Accepts built-in themes (e.g. theme.Dark,
theme.Nord) or custom palettes via theme.custom().