pub struct Strategy { /* private fields */ }Expand description
A configured layout strategy, decoupled from panel content. Clone and reuse across different panel sets.
Implementations§
Source§impl Strategy
impl Strategy
Sourcepub fn from_kind(kind: StrategyKind) -> Self
pub fn from_kind(kind: StrategyKind) -> Self
Wrap an existing StrategyKind.
Sourcepub fn kind(&self) -> &StrategyKind
pub fn kind(&self) -> &StrategyKind
Access the inner strategy kind.
Sourcepub fn with_panels(
self,
panels: impl IntoIterator<Item = impl Into<Arc<str>>>,
) -> BoundStrategy
pub fn with_panels( self, panels: impl IntoIterator<Item = impl Into<Arc<str>>>, ) -> BoundStrategy
Bind panels to this strategy. Works for all non-dashboard strategies.
Dashboard strategies with spans must use DashboardStrategy::with_cards.
Sourcepub fn master_stack() -> MasterStackStrategy
pub fn master_stack() -> MasterStackStrategy
Master-stack strategy: one master panel with a vertical stack.
Sourcepub fn centered_master() -> CenteredMasterStrategy
pub fn centered_master() -> CenteredMasterStrategy
Centered-master strategy: master panel centered between two side stacks.
Sourcepub fn deck() -> DeckStrategy
pub fn deck() -> DeckStrategy
Deck strategy: master panel with one-at-a-time stack.
Sourcepub fn monocle() -> ActivePanelStrategy
pub fn monocle() -> ActivePanelStrategy
Monocle strategy: full-screen single panel.
Sourcepub fn tabbed() -> ActivePanelStrategy
pub fn tabbed() -> ActivePanelStrategy
Tabbed strategy: tab bar above content panels.
Sourcepub fn stacked() -> ActivePanelStrategy
pub fn stacked() -> ActivePanelStrategy
Stacked strategy: title bars stacked vertically above content.
Sourcepub fn scrollable() -> WindowStrategy
pub fn scrollable() -> WindowStrategy
Scrollable strategy: window showing N adjacent panels.
Sourcepub fn dwindle() -> BinarySplitStrategy
pub fn dwindle() -> BinarySplitStrategy
Dwindle strategy: recursive binary split without spiral.
Sourcepub fn spiral() -> BinarySplitStrategy
pub fn spiral() -> BinarySplitStrategy
Spiral strategy: recursive binary split with spiral.
Sourcepub fn split() -> SplitStrategy
pub fn split() -> SplitStrategy
Split strategy: two panels with configurable ratio.
Sourcepub fn dashboard() -> DashboardStrategy
pub fn dashboard() -> DashboardStrategy
Dashboard strategy: CSS-grid layout with per-card column spans.
Sidebar strategy: fixed-width sidebar with grow content.
Sourcepub fn holy_grail() -> HolyGrailStrategy
pub fn holy_grail() -> HolyGrailStrategy
Holy-grail strategy: header, footer, left sidebar, main, right sidebar.