[][src]Struct druid::widget::Split

pub struct Split<T> { /* fields omitted */ }

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]

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]

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]

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

impl<T> !UnwindSafe for Split<T>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> RoundFrom<T> for T

impl<T, U> RoundInto<U> for T where
    U: RoundFrom<T>, 

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]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.