[−][src]Struct druid::widget::Split
A container containing two other widgets, splitting the area either horizontally or vertically.
Implementations
impl<T> Split<T>
[src]
pub fn columns(
child1: impl Widget<T> + 'static,
child2: impl Widget<T> + 'static
) -> Self
[src]
child1: impl Widget<T> + 'static,
child2: impl Widget<T> + 'static
) -> Self
Create a new split panel, with the horizontal axis split in two by a vertical bar. The children are laid out left and right.
pub fn rows(
child1: impl Widget<T> + 'static,
child2: impl Widget<T> + 'static
) -> Self
[src]
child1: impl Widget<T> + 'static,
child2: impl Widget<T> + 'static
) -> Self
Create a new split panel, with the vertical axis split in two by a horizontal bar. The children are laid out up and down.
pub fn split_point(self, split_point: f64) -> Self
[src]
Builder-style method to set the split point as a fraction of the split axis.
The value must be between 0.0
and 1.0
, inclusive.
The default split point is 0.5
.
pub fn min_size(self, min_size: f64) -> Self
[src]
Builder-style method to set the minimum size for both sides of the split axis.
The value must be greater than or equal to 0.0
.
The value will be rounded up to the nearest integer.
pub fn bar_size(self, bar_size: f64) -> Self
[src]
Builder-style method to set the size of the splitter bar.
The value must be positive or zero.
The value will be rounded up to the nearest integer.
The default splitter bar size is 6.0
.
pub fn min_bar_area(self, min_bar_area: f64) -> Self
[src]
Builder-style method to set the minimum size of the splitter bar area.
The minimum splitter bar area defines the minimum size of the area where mouse hit detection is done for the splitter bar. The final area is either this or the splitter bar size, whichever is greater.
This can be useful when you want to use a very narrow visual splitter bar, but don't want to sacrifice user experience by making it hard to click on.
The value must be positive or zero.
The value will be rounded up to the nearest integer.
The default minimum splitter bar area is 6.0
.
pub fn draggable(self, draggable: bool) -> Self
[src]
Builder-style method to set whether the split point can be changed by dragging.
pub fn solid_bar(self, solid: bool) -> Self
[src]
Builder-style method to set whether the splitter bar is drawn as a solid rectangle.
If this is false
(the default), the bar will be drawn as two parallel lines.
Trait Implementations
impl<T: Data> Widget<T> for Split<T>
[src]
fn event(&mut self, ctx: &mut EventCtx, event: &Event, data: &mut T, env: &Env)
[src]
fn lifecycle(
&mut self,
ctx: &mut LifeCycleCtx,
event: &LifeCycle,
data: &T,
env: &Env
)
[src]
&mut self,
ctx: &mut LifeCycleCtx,
event: &LifeCycle,
data: &T,
env: &Env
)
fn update(&mut self, ctx: &mut UpdateCtx, _old_data: &T, data: &T, env: &Env)
[src]
fn layout(
&mut self,
ctx: &mut LayoutCtx,
bc: &BoxConstraints,
data: &T,
env: &Env
) -> Size
[src]
&mut self,
ctx: &mut LayoutCtx,
bc: &BoxConstraints,
data: &T,
env: &Env
) -> Size
fn paint(&mut self, ctx: &mut PaintCtx, data: &T, env: &Env)
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for Split<T>
impl<T> !Send for Split<T>
impl<T> !Sync for Split<T>
impl<T> Unpin for Split<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for Split<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> RoundFrom<T> for T
fn round_from(x: T) -> T
impl<T, U> RoundInto<U> for T where
U: RoundFrom<T>,
U: RoundFrom<T>,
fn round_into(self) -> U
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,