Trait rich_sdl2_rust::window::ConfigExt
source · pub trait ConfigExt {
Show 15 methods
// Required methods
fn max_size(&self) -> Size;
fn min_size(&self) -> Size;
fn size(&self) -> Size;
fn opacity(&self) -> Opacity;
fn pos(&self) -> Point;
fn title(&self) -> &str;
fn set_max_size(&self, max_size: Size);
fn set_min_size(&self, min_size: Size);
fn set_size(&self, size: Size);
fn set_opacity(&self, opacity: Opacity) -> Result<()>;
fn set_pos(&self, pos: Position);
fn set_title(&self, title: &str);
fn set_resizable(&self, resizable: bool);
fn add_frame(&self);
fn remove_frame(&self);
}
Expand description
An extension for Window
to configure its properties.
Required Methods§
sourcefn set_max_size(&self, max_size: Size)
fn set_max_size(&self, max_size: Size)
Sets the maximum size of the window.
sourcefn set_min_size(&self, min_size: Size)
fn set_min_size(&self, min_size: Size)
Sets the minimum size of the window.
sourcefn set_opacity(&self, opacity: Opacity) -> Result<()>
fn set_opacity(&self, opacity: Opacity) -> Result<()>
Sets the opacity of the window.
§Errors
Returns Err
if setting the opacity of window is unsupported.
sourcefn set_resizable(&self, resizable: bool)
fn set_resizable(&self, resizable: bool)
Sets whether the window is resizable.
sourcefn remove_frame(&self)
fn remove_frame(&self)
Removes a frame from the window.