Struct leftwm_core::models::Xyhw
source · pub struct Xyhw { /* private fields */ }Expand description
Struct containing min/max width and height and window placement. x,y from top left.
Implementations§
source§impl Xyhw
impl Xyhw
pub const fn x(&self) -> i32
pub const fn y(&self) -> i32
pub const fn h(&self) -> i32
pub const fn w(&self) -> i32
pub const fn minw(&self) -> i32
pub const fn maxw(&self) -> i32
pub const fn minh(&self) -> i32
pub const fn maxh(&self) -> i32
pub fn clear_minmax(&mut self)
pub fn set_x(&mut self, value: i32)
pub fn set_y(&mut self, value: i32)
pub fn set_h(&mut self, value: i32)
pub fn set_w(&mut self, value: i32)
pub fn set_minw(&mut self, value: i32)
pub fn set_maxw(&mut self, value: i32)
pub fn set_minh(&mut self, value: i32)
pub fn set_maxh(&mut self, value: i32)
pub const fn contains_point(&self, x: i32, y: i32) -> bool
pub const fn contains_xyhw(&self, other: &Self) -> bool
pub const fn volume(&self) -> u64
sourcepub const fn without(&self, other: &Self) -> Self
pub const fn without(&self, other: &Self) -> Self
Trim a Xyhw out of another Xyhw so that they don’t overlap.
pub fn center_halfed(&self) -> Self
pub fn center_relative(&mut self, outer: Self, border: i32)
pub const fn center(&self) -> (i32, i32)
Trait Implementations§
source§impl<'de> Deserialize<'de> for Xyhw
impl<'de> Deserialize<'de> for Xyhw
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl From<Xyhw> for XyhwChange
impl From<Xyhw> for XyhwChange
source§impl From<XyhwBuilder> for Xyhw
impl From<XyhwBuilder> for Xyhw
source§fn from(xywh: XyhwBuilder) -> Self
fn from(xywh: XyhwBuilder) -> Self
Converts to this type from the input type.