Struct fltk::group::VGrid [−][src]
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]
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,