Trait rustty_oxide::core::widget::Widget [] [src]

pub trait Widget {
    fn draw(&mut self, parent: &mut CellAccessor);
fn pack(
        &mut self,
        parent: &HasSize,
        halign: HorizontalAlign,
        valign: VerticalAlign,
        margin: (usize, usize)
    );
fn draw_box(&mut self);
fn resize(&mut self, new_size: Size);
fn frame(&self) -> &Frame;
fn frame_mut(&mut self) -> &mut Frame; }

Widgets are the foundation of UI, all frontend objects inherit the widget type and are generalized through either the widget itself or a specialized widget (e.g. Button, Layout).

Required Methods

Draws the widget to the valid CellAccessor passed

Aligns the widget with the parent as reference

Expose the painter trait draw_box for all widgets, which outlines the space enclosed within the widget

Resize the given widget to new dimensions given by Size

Return a reference the renderer, Base in general cases

Return a mutable reference to the renderer, Base in general cases

Implementors