pub enum Arrangement {
ListDetail {
tabbed: bool,
share: Share,
},
SidebarContent {
share: Share,
},
}Expand description
How a screen is laid out.
Two, and the second is not a variant of the first. goingson is list-detail, Balanced Breakfast is sidebar plus content, and neither app has a third. The tab group is a modifier rather than a member, because goingson uses it inside the same content region rather than instead of one.
This exists at all because the router has to be able to express a screen rather than only a control. Discovering the arrangement layer missing after the renderers exist is a redesign; naming two now is a morning.
§Why the share rides here
e0fd485e. A share is per-arrangement: how much a sidebar takes and how
much a list side takes are different questions, and this enum is the only
thing that knows which one is being asked. Geometry would have had to invent
a channel to be told.
list_detail and
sidebar_content build these with the default
shares, so a screen that has no opinion does not have to have one.
Variants§
ListDetail
A list that chooses what the detail beside it shows.
Fields
tabbed: boolWhether the detail side is a Region::TabGroup.
How much of the width the list side takes.
SidebarContent
Navigation down the side, content filling the rest.
Fields
How much of the width the sidebar takes.
Implementations§
Source§impl Arrangement
impl Arrangement
Sourcepub const fn list_detail(tabbed: bool) -> Self
pub const fn list_detail(tabbed: bool) -> Self
A list and a detail beside it, at the default share.
A sidebar and content beside it, at the default share.
How much of the width the first region takes.
The same arrangement, at this share.
Trait Implementations§
Source§impl Clone for Arrangement
impl Clone for Arrangement
Source§fn clone(&self) -> Arrangement
fn clone(&self) -> Arrangement
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more