pub enum FormKind {
Screen,
Window,
Dialog,
Drawer,
Shelf,
Fragment,
}Expand description
What a form is for.
The engine reports it and opens nothing: whether a dialog is a pushed scene or a modal window is the application’s decision, and it differs by machine.
Variants§
Screen
The root tree of a Ui — a panel’s whole surface.
Window
A desktop window.
Dialog
A modal: Ui::push_scene on a panel, a modal window on a desktop.
Drawer
Ui::push_drawer.
Shelf
Ui::push_shelf.
Fragment
A subtree with no root of its own, for reuse inside other forms.
Implementations§
Source§impl FormKind
impl FormKind
Sourcepub const fn what(self) -> &'static str
pub const fn what(self) -> &'static str
assert!(FormKind::Dialog.what().contains("modal"));
// Every kind has one, and no two share it.
assert_ne!(FormKind::Drawer.what(), FormKind::Shelf.what());One line on what this kind is for.
Here rather than in the designer because it is a fact about the format: the CLI prints it, the designer offers it when a form is being made, and neither of them should be keeping its own copy.
Sourcepub const fn default_side(self) -> Side
pub const fn default_side(self) -> Side
// A drawer is a side panel; a shelf is a bar.
assert_eq!(FormKind::Drawer.default_side(), Side::Before);
assert_eq!(FormKind::Shelf.default_side(), Side::Below);Which edge one of these comes in from when the file does not say.
Trait Implementations§
impl Copy for FormKind
impl Eq for FormKind
impl StructuralPartialEq for FormKind
Auto Trait Implementations§
impl Freeze for FormKind
impl RefUnwindSafe for FormKind
impl Send for FormKind
impl Sync for FormKind
impl Unpin for FormKind
impl UnsafeUnpin for FormKind
impl UnwindSafe for FormKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more