[][src]Trait kas::Window

pub trait Window: Widget + Handler<Msg = VoidMsg> {
    fn title(&self) -> &str;
fn resize(
        &mut self,
        size_handle: &mut dyn SizeHandle,
        size: Size
    ) -> (Option<Size>, Option<Size>);
fn callbacks(&self) -> Vec<(usize, Callback)>;
fn final_callback(
        &self
    ) -> Option<&'static dyn Fn(Box<dyn Window>, &mut Manager)>;
fn trigger_callback(&mut self, index: usize, mgr: &mut Manager); }

A window is a drawable interactive region provided by windowing system.

Required methods

fn title(&self) -> &str

Get the window title

fn resize(
    &mut self,
    size_handle: &mut dyn SizeHandle,
    size: Size
) -> (Option<Size>, Option<Size>)

Adjust the size of the window, repositioning widgets.

fn callbacks(&self) -> Vec<(usize, Callback)>

Get a list of available callbacks.

This returns a sequence of (index, condition) values. The toolkit should call trigger_callback(index, mgr) whenever the condition is met.

fn final_callback(
    &self
) -> Option<&'static dyn Fn(Box<dyn Window>, &mut Manager)>

Get the callback used on window closure.

fn trigger_callback(&mut self, index: usize, mgr: &mut Manager)

Trigger a callback (see iter_callbacks).

Loading content...

Implementors

impl Window for MessageBox[src]

impl<W: Widget + Handler<Msg = VoidMsg> + 'static> Window for Window<W>[src]

fn trigger_callback(&mut self, index: usize, mgr: &mut Manager)[src]

Trigger a callback (see iter_callbacks).

Loading content...