Struct native_windows_gui::FlexboxLayoutBuilder
source · [−]pub struct FlexboxLayoutBuilder { /* private fields */ }
Implementations
sourceimpl FlexboxLayoutBuilder
impl FlexboxLayoutBuilder
sourcepub fn parent<W: Into<ControlHandle>>(self, p: W) -> FlexboxLayoutBuilder
pub fn parent<W: Into<ControlHandle>>(self, p: W) -> FlexboxLayoutBuilder
Set the layout parent. The handle must be a window object otherwise the function will panic
sourcepub fn child<W: Into<ControlHandle>>(self, child: W) -> FlexboxLayoutBuilder
pub fn child<W: Into<ControlHandle>>(self, child: W) -> FlexboxLayoutBuilder
Add a new child to the layout build.
Panics if child
is not a window-like control.
sourcepub fn child_layout(self, child: &FlexboxLayout) -> FlexboxLayoutBuilder
pub fn child_layout(self, child: &FlexboxLayout) -> FlexboxLayoutBuilder
Add a new child layout to the layout build.
sourcepub fn auto_size(self, auto: bool) -> FlexboxLayoutBuilder
pub fn auto_size(self, auto: bool) -> FlexboxLayoutBuilder
Make it so that the children of the layout all have equal size
This flags is erased when size
, max_size
, or min_size
is set on the children.
sourcepub fn auto_spacing(self, auto: Option<u32>) -> FlexboxLayoutBuilder
pub fn auto_spacing(self, auto: Option<u32>) -> FlexboxLayoutBuilder
Automatically generate padding and margin for the parent layout and the children from the selected value.
This flags is erased when padding
is called on the layout or when child_margin
is called on the children
pub fn direction(self, value: Direction) -> FlexboxLayoutBuilder
pub fn flex_direction(self, value: FlexDirection) -> FlexboxLayoutBuilder
pub fn flex_wrap(self, value: FlexWrap) -> FlexboxLayoutBuilder
pub fn overflow(self, value: Overflow) -> FlexboxLayoutBuilder
pub fn align_items(self, value: AlignItems) -> FlexboxLayoutBuilder
pub fn align_content(self, value: AlignContent) -> FlexboxLayoutBuilder
pub fn justify_content(self, value: JustifyContent) -> FlexboxLayoutBuilder
pub fn padding(self, value: Rect<Dimension>) -> FlexboxLayoutBuilder
pub fn border(self, value: Rect<Dimension>) -> FlexboxLayoutBuilder
pub fn min_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
pub fn max_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
pub fn aspect_ratio(self, value: Number) -> FlexboxLayoutBuilder
sourcepub fn child_size(self, size: Size<Dimension>) -> FlexboxLayoutBuilder
pub fn child_size(self, size: Size<Dimension>) -> FlexboxLayoutBuilder
Set the size of of the current child.
Panics if child
was not called before.
sourcepub fn child_position(self, position: Rect<Dimension>) -> FlexboxLayoutBuilder
pub fn child_position(self, position: Rect<Dimension>) -> FlexboxLayoutBuilder
Set the position of the current child.
Panics if child
was not called before.
sourcepub fn child_margin(self, value: Rect<Dimension>) -> FlexboxLayoutBuilder
pub fn child_margin(self, value: Rect<Dimension>) -> FlexboxLayoutBuilder
Set the margin of the current child.
Panics if child
was not called before.
sourcepub fn child_min_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
pub fn child_min_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
Set the min size of the current child.
Panics if child
was not called before.
sourcepub fn child_max_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
pub fn child_max_size(self, value: Size<Dimension>) -> FlexboxLayoutBuilder
Set the max size of the current child.
Panics if child
was not called before.
sourcepub fn child_flex_grow(self, value: f32) -> FlexboxLayoutBuilder
pub fn child_flex_grow(self, value: f32) -> FlexboxLayoutBuilder
Panics if child
was not called before.
sourcepub fn child_flex_shrink(self, value: f32) -> FlexboxLayoutBuilder
pub fn child_flex_shrink(self, value: f32) -> FlexboxLayoutBuilder
Panics if child
was not called before.
sourcepub fn child_flex_basis(self, value: Dimension) -> FlexboxLayoutBuilder
pub fn child_flex_basis(self, value: Dimension) -> FlexboxLayoutBuilder
Panics if child
was not called before.
sourcepub fn child_align_self(self, value: AlignSelf) -> FlexboxLayoutBuilder
pub fn child_align_self(self, value: AlignSelf) -> FlexboxLayoutBuilder
Panics if child
was not called before.
sourcepub fn style(self, style: Style) -> FlexboxLayoutBuilder
pub fn style(self, style: Style) -> FlexboxLayoutBuilder
Directly set the style parameter of the current child. Panics if child
was not called before.
If defining style is too verbose, other method such as size
can be used.
sourcepub fn build(self, layout: &FlexboxLayout) -> Result<(), NwgError>
pub fn build(self, layout: &FlexboxLayout) -> Result<(), NwgError>
Build the layout object and bind the callback.
sourcepub fn build_partial(self, layout: &FlexboxLayout) -> Result<(), NwgError>
pub fn build_partial(self, layout: &FlexboxLayout) -> Result<(), NwgError>
Build a “partial” layout object - this layout has no direct callback and needs to be added to a parent layout using child_layout
Auto Trait Implementations
impl !RefUnwindSafe for FlexboxLayoutBuilder
impl !Send for FlexboxLayoutBuilder
impl !Sync for FlexboxLayoutBuilder
impl Unpin for FlexboxLayoutBuilder
impl !UnwindSafe for FlexboxLayoutBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more