pub struct Layout {
pub show: BTreeMap<String, Show>,
pub order: BTreeMap<String, Vec<String>>,
pub chat_list: ChatList,
}Expand description
What the interface shows: the modes and orders that differ from the defaults.
Fields§
§show: BTreeMap<String, Show>Element id → how it is shown.
order: BTreeMap<String, Vec<String>>Region id → element ids in the order wanted. Ids a region doesn’t have are skipped; those it has but the list doesn’t name follow, in their default order.
chat_list: ChatListThe chat list’s sections and view.
Implementations§
Source§impl Layout
impl Layout
pub fn is_default(&self) -> bool
Sourcepub fn show(&self, id: &str) -> Show
pub fn show(&self, id: &str) -> Show
How element (or plugin view) id is shown. Unknown ids are shown.
Sourcepub fn visible(&self, id: &str, hovered: bool) -> bool
pub fn visible(&self, id: &str, hovered: bool) -> bool
Whether id is drawn now (hovered: the pointer is on what it belongs to).
Sourcepub fn set_show(&mut self, id: &str, mode: Show)
pub fn set_show(&mut self, id: &str, mode: Show)
Set how id is shown; back to the default stores nothing.
Sourcepub fn arrange(&self, region: &str, extra: &[String]) -> Vec<String>
pub fn arrange(&self, region: &str, extra: &[String]) -> Vec<String>
Region region’s elements in order: byob’s own (in ELEMENTS order) and then
extra (plugin views drawn there, as found), arranged by the stored order. Hidden
ones are included; ask Self::show.
Sourcepub fn set_order(&mut self, region: &str, ids: Vec<String>)
pub fn set_order(&mut self, region: &str, ids: Vec<String>)
Put region region in this order (see Self::order); the default order stores nothing.