pub struct Workspace {
pub tag: Option<TagId>,
pub margin: Margins,
pub margin_multiplier: f32,
pub gutters: Vec<Gutter>,
pub avoid: Vec<Xyhw>,
pub xyhw: Xyhw,
pub xyhw_avoided: Xyhw,
pub id: WorkspaceId,
}
Expand description
Information for workspaces (screen divisions).
Fields§
§tag: Option<TagId>
§margin: Margins
§margin_multiplier: f32
§gutters: Vec<Gutter>
§avoid: Vec<Xyhw>
§xyhw: Xyhw
§xyhw_avoided: Xyhw
§id: WorkspaceId
ID of workspace. Starts with 1.
Implementations§
Source§impl Workspace
impl Workspace
pub fn new(bbox: BBox, id: usize) -> Self
pub fn load_config(&mut self, config: &impl Config)
pub fn get_gutters_for_theme(&mut self, config: &impl Config) -> Vec<Gutter>
pub fn show_tag(&mut self, tag: &TagId)
pub const fn contains_point(&self, x: i32, y: i32) -> bool
pub fn has_tag(&self, tag: &TagId) -> bool
Sourcepub fn is_displaying<H: Handle>(&self, window: &Window<H>) -> bool
pub fn is_displaying<H: Handle>(&self, window: &Window<H>) -> bool
Returns true if the workspace is displays a given window.
Sourcepub fn is_managed<H: Handle>(&self, window: &Window<H>) -> bool
pub fn is_managed<H: Handle>(&self, window: &Window<H>) -> bool
Returns true if the workspace is to update the locations info of this window.
pub fn y(&self) -> i32
pub fn height(&self) -> i32
pub fn center_halfed(&self) -> Xyhw
pub fn update_avoided_areas(&mut self)
Sourcepub fn set_margin_multiplier(&mut self, margin_multiplier: f32)
pub fn set_margin_multiplier(&mut self, margin_multiplier: f32)
Set the tag model’s margin multiplier.
Sourcepub const fn margin_multiplier(&self) -> f32
pub const fn margin_multiplier(&self) -> f32
Get a reference to the tag model’s margin multiplier.
pub fn rect(&self) -> Rect
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Workspace
impl<'de> Deserialize<'de> for Workspace
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
Auto Trait Implementations§
impl Freeze for Workspace
impl RefUnwindSafe for Workspace
impl Send for Workspace
impl Sync for Workspace
impl Unpin for Workspace
impl UnwindSafe for Workspace
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more