Struct gabelstaplerwm::wm::client::TagStack
[−]
[src]
pub struct TagStack { /* fields omitted */ }
An organized set of known tagsets.
Allows for simple addressing of tagstes (and their layouts) Tagsets are added and removed using API calls and are adressed using 8-bit unsigned integers. Thus, 256 different tagsets can be managed at any point in time. A small history of capped size is kept, determining the tagset currently displayed by the window manager.
Methods
impl TagStack
[src]
fn setup(&mut self, vec: Vec<TagSet>, viewed: u8)
Setup a tag stack from a vector of tag sets and the index of the initially viewed tagset in the vector.
fn is_clean(&self) -> bool
Check whether the TagStack
is in a default state.
fn current_index(&self) -> Option<&u8>
Get the current tag set's index
Returns None
if the history stack is empty
fn current(&self) -> Option<&TagSet>
Get the current tag set by reference.
Returns None
if the history stack is empty
fn current_mut(&mut self) -> Option<&mut TagSet>
Get the current tag set by mutable reference.
Returns None
if the history stack is empty
fn push(&mut self, new_index: u8)
Set the currently viewed tagset by index.
fn add(&mut self, index: u8, value: TagSet) -> bool
Add a new tagset to the set.
fn remove(&mut self, index: u8) -> bool
Remove a tagset from the set.
fn view_prev(&mut self) -> bool
Switch to previously shown tagset, using the history stack.
Ensure a set of tags is set as hidden when present in the current tagset.
If there is no current tagset, ensure the set of hidden tags to be empty.
Get an immutable reference to the set of currently hidden tags on this tag stack.