Struct fltk::group::VGrid[][src]

pub struct VGrid { /* fields omitted */ }

Defines a Vertical Grid (custom widget). Requires setting the params manually using the set_params method, which takes the rows, columns and spacing. Requires explicit calls to add, which is overloaded especially for the layout.

use fltk::*;
let mut grid = group::VGrid::new(0, 0, 400, 300, "");
grid.set_params(3, 3, 5);
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());
grid.add(&button::Button::default());

Implementations

impl VGrid[src]

pub fn new(x: i32, y: i32, w: i32, h: i32, label: &str) -> VGrid[src]

Creates a new vertical grid

pub fn set_params(&mut self, rows: i32, cols: i32, spacing: i32)[src]

Sets the params for the grid

pub fn add<W: WidgetExt>(&mut self, w: &W)[src]

Adds widgets to the grid

Methods from Deref<Target = Pack>

pub fn spacing(&self) -> i32[src]

Get the spacing of the pack

pub fn set_spacing(&mut self, spacing: i32)[src]

Set the spacing of the pack

pub fn auto_layout(&mut self)[src]

Layout the children of the pack automatically Must be called on existing children

Trait Implementations

impl Clone for VGrid[src]

impl Debug for VGrid[src]

impl Deref for VGrid[src]

type Target = Pack

The resulting type after dereferencing.

impl DerefMut for VGrid[src]

Auto Trait Implementations

impl RefUnwindSafe for VGrid

impl Send for VGrid

impl Sync for VGrid

impl Unpin for VGrid

impl UnwindSafe for VGrid

Blanket Implementations

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> From<T> for T[src]

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

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.