[][src]Trait kas::Core

pub trait Core {
    fn number(&self) -> u32;
fn set_number(&mut self, number: u32);
fn tkd(&self) -> TkData;
fn set_tkd(&mut self, tkd: TkData);
fn rect(&self) -> &Rect;
fn rect_mut(&mut self) -> &mut Rect; }

Common widget behaviour

This is a base trait of Widget and should not need to be used directly. It is implemented automatically by the derive(Widget) macro.

Required methods

fn number(&self) -> u32

Get the widget's number

fn set_number(&mut self, number: u32)

Set the widget's number

This should only be called during widget enumeration. It will panic if the number has already been set (to anything other than 0).

fn tkd(&self) -> TkData

Get the toolkit data associated with this widget

fn set_tkd(&mut self, tkd: TkData)

Set the toolkit data associated with this widget

This will panic if the toolkit data is not null.

fn rect(&self) -> &Rect

Get the widget's region, relative to its parent.

fn rect_mut(&mut self) -> &mut Rect

Get mutable access to the widget's region

Loading content...

Implementors

impl Core for Text
[src]

impl Core for CoreData
[src]

impl<H: 'static> Core for TextButton<H>
[src]

impl<H: 'static> Core for Entry<H>
[src]

impl<M: Debug + 'static, H: 'static> Core for MessageBox<M, H>
[src]

impl<W: Widget + 'static> Core for SimpleWindow<W>
[src]

Loading content...