Struct kiss_ui::container::Grid [] [src]

pub struct Grid(_);

A container widget that lines up its children from left to right, and from top to bottom.

Methods

impl Grid

fn new<C>(children: C) -> Grid where C: AsRef<[BaseWidget]>

fn set_valign(self, valign: VAlign) -> Self

fn set_halign(self, halign: HAlign) -> Self

fn set_ndiv(self, ndiv: u32) -> Self

Based on the orientation, set the number of children to place in a:

  • Vertial: column
  • Horizontal: row

before beginning the next one.

fn set_orientation(&mut self, orientation: Orientation) -> &mut Self

Sets how children are distributed in the container.

  • Vertical: The container will fill columns first.

Visual example (ndiv=3 grid with 7 children):

Child Child Child
Child Child
Child Child

  • Horizontal: The container will fill rows first. Default.

Visual example (ndiv=3 grid with 7 children):

Child Child Child
Child Child Child
Child

Trait Implementations

impl Widget for Grid

fn show(self) -> Self

fn hide(self) -> Self

fn set_visible(self, visible: bool) -> Self

fn set_enabled(self, enabled: bool) -> Self

fn set_position(self, x: i32, y: i32) -> Self

fn get_position(self) -> (i32, i32)

fn set_name(self, name: &str) -> Self

fn get_name(&self) -> Option<WidgetStr>

fn get_sibling(self) -> Option<BaseWidget>

fn get_parent(self) -> Option<BaseWidget>

fn get_dialog(self) -> Option<Dialog>

fn get_size_pixels(self) -> (u32, u32)

fn store<N: Into<String>>(self, name: N) -> Option<BaseWidget>

fn to_base(self) -> BaseWidget

impl Copy for Grid

impl Clone for Grid

fn clone(&self) -> Self

fn clone_from(&mut self, source: &Self)

impl Downcast for Grid

fn can_downcast(base: &BaseWidget) -> bool

fn try_downcast(base: BaseWidget) -> Result<Self, BaseWidget>