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

Create a new Flex widget

Create a default initialized Flex widget

Create a flex with size

Create a default type of flex widget

Set the direction

Get the direction

End the Flex widget

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

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.