pub struct FlexboxLayout { /* private fields */ }
Expand description

A flexbox layout that organizes the children control in a parent control. Flexbox uses the stretch library internally ( https://github.com/vislyhq/stretch ).

FlexboxLayout requires the flexbox feature.

Implementations

Returns the style of the parent control

Panic:

  • The layout must have been successfully built otherwise this function will panic.

Sets the style of the layout parent control

Panic:

  • The layout must have been successfully built otherwise this function will panic.

Add a new children in the layout with the stretch style.

Panic:

  • If the control is not a window-like control
  • If the layout was not initialized

Remove a children from the layout

Panic:

  • If the control is not a window-like control
  • If the control is not in the layout (see has_child)
  • If the layout was not initialized

Check if the selected control is a children in the layout. Does not check in the sublayouts

Panic:

  • If the control is not a window-like control.
  • If the layout was not initialized

Borrow the inner value of the flexbox layout. While the returned value lives, calling other method of the the flexbox layout that modify the inner state will cause a panic. Simple looktup (ex: has_child) will still work.

Panic:

  • The layout must have been successfully built otherwise this function will panic.

Borrow the inner value of the flexbox layout as mutable. While the returned value lives, calling other method of the the flexbox layout will cause a panic.

If the children of the layout were modified, call fit to update the layout after FlexboxLayoutChildrenMut is dropped.

Panic:

  • The layout must have been successfully built otherwise this function will panic.

Resize the layout to fit the parent window size

Panic:

  • The layout must have been successfully built otherwise this function will panic.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.