pub struct WindowSizeConstraints {
pub min_width: Option<PixelUnit>,
pub min_height: Option<PixelUnit>,
pub max_width: Option<PixelUnit>,
pub max_height: Option<PixelUnit>,
}Expand description
Window size constraints
Fields§
§min_width: Option<PixelUnit>The minimum width a window can be, If this is None, the window will have no minimum width (aside from reserved).
The default is None.
min_height: Option<PixelUnit>The minimum height a window can be, If this is None, the window will have no minimum height (aside from reserved).
The default is None.
max_width: Option<PixelUnit>The maximum width a window can be, If this is None, the window will have no maximum width (aside from reserved).
The default is None.
max_height: Option<PixelUnit>The maximum height a window can be, If this is None, the window will have no maximum height (aside from reserved).
The default is None.
Implementations§
Source§impl WindowSizeConstraints
impl WindowSizeConstraints
pub fn new( min_width: Option<PixelUnit>, min_height: Option<PixelUnit>, max_width: Option<PixelUnit>, max_height: Option<PixelUnit>, ) -> Self
Sourcepub fn min_size_physical<T: Pixel>(&self, scale_factor: f64) -> PhysicalSize<T>
pub fn min_size_physical<T: Pixel>(&self, scale_factor: f64) -> PhysicalSize<T>
Returns a physical size that represents the minimum constraints set and fallbacks to PixelUnit::MIN for unset values
Sourcepub fn min_size_logical<T: Pixel>(&self, scale_factor: f64) -> LogicalSize<T>
pub fn min_size_logical<T: Pixel>(&self, scale_factor: f64) -> LogicalSize<T>
Returns a logical size that represents the minimum constraints set and fallbacks to PixelUnit::MIN for unset values
Sourcepub fn max_size_physical<T: Pixel>(&self, scale_factor: f64) -> PhysicalSize<T>
pub fn max_size_physical<T: Pixel>(&self, scale_factor: f64) -> PhysicalSize<T>
Returns a physical size that represents the maximum constraints set and fallbacks to PixelUnit::MAX for unset values
Sourcepub fn max_size_logical<T: Pixel>(&self, scale_factor: f64) -> LogicalSize<T>
pub fn max_size_logical<T: Pixel>(&self, scale_factor: f64) -> LogicalSize<T>
Returns a logical size that represents the maximum constraints set and fallbacks to PixelUnit::MAX for unset values
Trait Implementations§
Source§impl Clone for WindowSizeConstraints
impl Clone for WindowSizeConstraints
Source§fn clone(&self) -> WindowSizeConstraints
fn clone(&self) -> WindowSizeConstraints
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more