Struct kiss_ui::base::BaseWidget
[−]
[src]
pub struct BaseWidget(_);
A general widget type that can be specialized at runtime via Downcast
.
Methods
impl BaseWidget
fn load<N: Borrow<str>>(name: N) -> Option<BaseWidget>
Attempt to load a widget named by name
from internal storage.
If successful, the BaseWidget
can then be downcast to the original widget type.
Returns None
if no widget by that name was found.
Panics
If called before kiss_ui::show_gui()
is invoked or after it returns.
fn try_downcast<T>(self) -> Result<T, Self> where T: Downcast
Attempt to downcast this BaseWidget
to a more specialized widget type.
This will return an error if the underlying widget class is different than the one it is being cast to.