pub struct SplitLayout {
pub sizes: Rc<RefCell<HashMap<RNode, Size>>>,
pub stacked: Rc<Cell<bool>>,
pub fraction: Rc<Cell<f64>>,
}Expand description
Native split (docs/split.md): the two pane frames are native-owned (an NSSplitView’s, a
GtkPaned’s, a QSplitter’s), so Day lays each pane’s content within the size the toolkit
last reported via Event::FrameChanged, the InspectorLayout contract. The fallback
before the first report divides the host bounds by the bound fraction along the axis.
Fields§
§sizes: Rc<RefCell<HashMap<RNode, Size>>>§stacked: Rc<Cell<bool>>Stacked (true) or side by side, as last patched; shared with the piece.
fraction: Rc<Cell<f64>>The first pane’s share, as last patched; shared with the piece.
Trait Implementations§
Source§impl Layout for SplitLayout
impl Layout for SplitLayout
fn measure( &self, _cx: &mut dyn LayoutOps, _children: &[RNode], p: Proposal, ) -> Size
fn place(&self, cx: &mut dyn LayoutOps, children: &[RNode], bounds: Rect)
Source§fn baseline(
&self,
_cx: &mut dyn LayoutOps,
_children: &[RNode],
_size: Size,
) -> Option<f64>
fn baseline( &self, _cx: &mut dyn LayoutOps, _children: &[RNode], _size: Size, ) -> Option<f64>
Where this node’s own first text baseline falls, measured from the top of a box of
size (docs/baseline.md). None (the default) means the node has no baseline to
offer, so a baseline-aligned parent falls back to box alignment for it. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for SplitLayout
impl !Send for SplitLayout
impl !Sync for SplitLayout
impl !UnwindSafe for SplitLayout
impl Freeze for SplitLayout
impl Unpin for SplitLayout
impl UnsafeUnpin for SplitLayout
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
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more