[][src]Enum iced::widget::pane_grid::Node

pub enum Node {
    Split {
        id: Split,
        axis: Axis,
        ratio: f32,
        a: Box<Node>,
        b: Box<Node>,
    },
    Pane(Pane),
}

A layout node of a PaneGrid.

Variants

Split

The region of this Node is split into two.

Fields of Split

id: Split

The Split of this Node.

axis: Axis

The direction of the split.

ratio: f32

The ratio of the split in [0.0, 1.0].

a: Box<Node>

The left/top Node of the split.

b: Box<Node>

The right/bottom Node of the split.

Pane(Pane)

The region of this Node is taken by a Pane.

Implementations

impl Node[src]

pub fn splits(&self) -> impl Iterator<Item = &Split>[src]

Returns an iterator over each Split in this Node.

pub fn pane_regions(
    &self,
    spacing: f32,
    size: Size<f32>
) -> HashMap<Pane, Rectangle<f32>, RandomState>
[src]

Returns the rectangular region for each Pane in the Node given the spacing between panes and the total available space.

pub fn split_regions(
    &self,
    spacing: f32,
    size: Size<f32>
) -> HashMap<Split, (Axis, Rectangle<f32>, f32), RandomState>
[src]

Returns the axis, rectangular region, and ratio for each Split in the Node given the spacing between panes and the total available space.

Trait Implementations

impl Clone for Node[src]

impl Debug for Node[src]

impl Hash for Node[src]

Auto Trait Implementations

impl RefUnwindSafe for Node

impl Send for Node

impl Sync for Node

impl Unpin for Node

impl UnwindSafe for Node

Blanket Implementations

impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for S where
    D: AdaptFrom<S, Swp, Dwp, T>,
    Dwp: WhitePoint,
    Swp: WhitePoint,
    T: Component + Float
[src]

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, U> ConvertInto<U> for T where
    U: ConvertFrom<T>, 
[src]

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

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

impl<T> SetParameter for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,