[−][src]Trait kas::Toolkit
The primary trait to be implemented by KAS toolkits.
A toolkit handles window management and rendering for a GUI.
Any initialisation should be taken care of in the constructor, and
de-initialisation in a Drop
implementation.
Required methods
fn add_rc(&self, window: Rc<RefCell<dyn Window>>)
Specialised version of add
; typically toolkits only need to implement
this.
fn main(&mut self)
Run the main loop.
Provided methods
fn add<W: Window + 'static>(&self, window: W) where
Self: Sized,
Self: Sized,
Assume ownership of and display a window.
Note: typically, one should have W: Clone
, enabling multiple usage.