Struct kiss_ui::container::Absolute [] [src]

pub struct Absolute(_);

A container type that makes no effort to arrange its children. Instead, they must be positioned manually.

Methods

impl Absolute

fn new<F>(build_fn: F) -> Absolute where F: FnOnce(&mut AbsoluteBuilder)

Create a new absolute container using the given closure, which will be passed a mutable builder instance.

The builder is necessary to ensure that the children have their positions set correctly, as Widget::set_position will not set the attributes that this particular container is expecting.

fn set_child_pos<W: Widget>(x: u32, y: u32, child: W)

Set the position of a child of an Absolute relative to its top-left corner.

Trait Implementations

impl Widget for Absolute

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 Absolute

impl Clone for Absolute

fn clone(&self) -> Self

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

impl Downcast for Absolute

fn can_downcast(base: &BaseWidget) -> bool

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