[][src]Trait kas::Window

pub trait Window: Widget<Msg = VoidMsg> {
    pub fn title(&self) -> &str;
pub fn restrict_dimensions(&self) -> (bool, bool);
pub fn add_popup(
        &mut self,
        mgr: &mut Manager<'_>,
        id: WindowId,
        popup: Popup
    );
pub fn resize_popups(&mut self, size_handle: &mut dyn SizeHandle);
pub fn remove_popup(&mut self, mgr: &mut Manager<'_>, id: WindowId); pub fn handle_closure(&mut self, _mgr: &mut Manager<'_>) { ... } }

Functionality required by a window

Required methods

pub fn title(&self) -> &str[src]

Get the window title

pub fn restrict_dimensions(&self) -> (bool, bool)[src]

Whether to limit the maximum size of a window

All widgets' size rules allow calculation of two sizes: the minimum size and the ideal size. Windows are initially sized to the ideal size. This option controls whether the window size is restricted by the calculated minimum size and by the ideal size.

Return value is (restrict_min, restrict_max). Suggested is to use (true, true) for simple dialog boxes and (true, false) for complex windows.

pub fn add_popup(&mut self, mgr: &mut Manager<'_>, id: WindowId, popup: Popup)[src]

Add a pop-up as a layer in the current window

Each Popup is assigned a WindowId; both are passed.

pub fn resize_popups(&mut self, size_handle: &mut dyn SizeHandle)[src]

Resize popups

This is called immediately after Layout::set_rect to resize existing pop-ups.

pub fn remove_popup(&mut self, mgr: &mut Manager<'_>, id: WindowId)[src]

Trigger closure of a pop-up

If the given id refers to a pop-up, it should be closed.

Loading content...

Provided methods

pub fn handle_closure(&mut self, _mgr: &mut Manager<'_>)[src]

Handle closure of self

This allows for actions on destruction, but doesn't need to do anything.

Loading content...

Implementors

impl<T: FormattableText + 'static> Window for MessageBox<T>[src]

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

Loading content...