Struct fltk_flex::Flex[][src]

pub struct Flex { /* fields omitted */ }
Expand description

a Flexbox widget

Example

use fltk::{prelude::*, *};
use fltk_flex::{Flex, FlexType};
let mut col = Flex::new(0, 0, 400, 300, None);
col.set_type(FlexType::Column);
let expanding = button::Button::default().with_label("Expanding");
let mut normal = button::Button::default().with_label("Normal");
col.set_size(&mut normal, 30);
col.end();

Implementations

Initialize to position x, y

Initialize to size width, height

Initialize with a label

Initialize with alignment

Initialize with type

Initialize at bottom of another widget

Initialize above of another widget

Initialize right of another widget

Initialize left of another widget

Initialize center of another widget

Initialize center of parent

Initialize to the size of another widget

Initialize to the size of the parent

Create a new Flex widget

Set the direction

Get the direction

Set the type to be a column

Set the type to a row

End the Flex widget

Recalculate children’s coords and sizes

Set the size of the widget

Resize the Flex widget

Debug the flex layout

Set the margin

set the padding

Get the margin

Get the padding

Methods from Deref<Target = Group>

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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.