[][src]Trait kas::TkWidget

pub trait TkWidget {
    fn size_hints(&self, tkd: TkData) -> (Coord, Coord);
fn get_rect(&self, tkd: TkData) -> Rect;
fn set_rect(&self, tkd: TkData, rect: &Rect);
fn set_label(&self, tkd: TkData, text: &str); }

Common widget properties. Implemented by the toolkit.

Note that it is not necessary to implement all of these methods, depending on which functionality from the library is used.

Required methods

fn size_hints(&self, tkd: TkData) -> (Coord, Coord)

Get the widget's minimum and preferred sizes.

fn get_rect(&self, tkd: TkData) -> Rect

Get the widget's position and size.

fn set_rect(&self, tkd: TkData, rect: &Rect)

Set the widget's position and size.

Does not need to update child widgets.

fn set_label(&self, tkd: TkData, text: &str)

Set the widget's label (where applicable)

Loading content...

Implementors

Loading content...