Minimum/maximum dimensions for windows in win32 api

This commit is contained in:
Aceeri 2015-11-09 01:42:54 -08:00
parent 5ca4e89dd4
commit 78eb4a5990
5 changed files with 98 additions and 13 deletions

View file

@ -52,6 +52,24 @@ impl<'a> WindowBuilder<'a> {
self.window.dimensions = Some((width, height));
self
}
/// Sets a minimum dimension size for the window
///
/// Width and height are in pixels.
#[inline]
pub fn with_min_dimensions(mut self, width: u32, height: u32) -> WindowBuilder<'a> {
self.window.min_dimensions = Some((width, height));
self
}
/// Sets a maximum dimension size for the window
///
/// Width and height are in pixels.
#[inline]
pub fn with_max_dimensions(mut self, width: u32, height: u32) -> WindowBuilder<'a> {
self.window.max_dimensions = Some((width, height));
self
}
/// Requests a specific title for the window.
#[inline]