pub struct SplitPaneScope { /* private fields */ }Expand description
A SplitPane and its builder.
Implementations§
Source§impl SplitPaneScope
impl SplitPaneScope
pub fn min(self, dp: f32) -> Self
pub fn max(self, dp: f32) -> Self
pub fn collapsible(self, collapsible: bool) -> Self
Sourcepub fn collapse_below(self, dp: f32) -> Self
pub fn collapse_below(self, dp: f32) -> Self
The split pane’s own width in dp below which it shows one pane at a time, the one
selected_index names. At or above it the panes are never stacked, and the design
system still decides between two columns and a side pane laid over the body.
Without it the line is the size class’s: stacked below 600 dp. 0 is the same as not calling this. The width is measured on the Renderer, so crossing the line sends the Host nothing. A negative or non-finite width is reported as a protocol error and the split pane is drawn as if it had none.
Sourcepub fn selected_index(self, index: usize) -> Self
pub fn selected_index(self, index: usize) -> Self
Which pane shows when only one fits: 0 the side pane, 1 the body.
pub fn on_change(self, handler: impl FnMut(f32) + 'static) -> Self
pub fn on_dismiss(self, handler: impl FnMut() + 'static) -> Self
Source§impl SplitPaneScope
impl SplitPaneScope
Sourcepub fn on_motion_finished(
self,
handler: impl FnMut(MotionFinished) + 'static,
) -> Self
pub fn on_motion_finished( self, handler: impl FnMut(MotionFinished) + 'static, ) -> Self
Runs once when this node’s size motion comes to rest, with the size it settled
at in dp. The node needs Modifier::motion for its size to move; without it
nothing is reported. A run interrupted by a newer size is not reported, only
the one that settles, and under reduced motion it arrives in the frame the
size changes in.