pub enum FormWidget {
None,
Width(u16),
Size(u16, u16),
StretchY(u16, u16),
Wide(u16, u16),
StretchX(u16, u16),
WideStretchX(u16, u16),
StretchXY(u16, u16),
WideStretchXY(u16, u16),
}Expand description
Widget constraints for LayoutForm.
Any given widths and heights will be reduced if there is not enough space.
Variants§
None
No widget, just a label.
Width(u16)
Widget aligned with the label.
Will create an area with the given width and height 1.
unit: cols
Size(u16, u16)
Widget aligned with the label.
Will create an area with the given width and height.
unit: cols,rows
StretchY(u16, u16)
Widget aligned with the label.
The widget will start with the given number of rows. If there is remaining vertical space left after a page-break this widget will get it. If there are more than one such widget the remainder will be evenly distributed.
unit: cols,rows
Wide(u16, u16)
Widget stacked below the label.
Any label that is not FormLabel::None will be placed above the widget.
unit: cols,rows
StretchX(u16, u16)
Widget filling the maximum width.
unit: cols,rows
WideStretchX(u16, u16)
Widget stacked below the label, with the maximum width.
unit: cols,rows
StretchXY(u16, u16)
Stretch the widget to the maximum width and height.
The widget will start with the given number of rows. If there is remaining vertical space left after a page-break this widget will get it. If there are more than one such widget the remainder will be evenly distributed.
unit: cols,rows
WideStretchXY(u16, u16)
Widget stacked below the label, with the maximum width and height.
The widget will start with the given number of rows. If there is remaining vertical space left after a page-break this widget will get it. If there are more than one such widget the remainder will be evenly distributed.
unit: rows
Trait Implementations§
Source§impl Debug for FormWidget
impl Debug for FormWidget
Source§impl Default for FormWidget
impl Default for FormWidget
Source§fn default() -> FormWidget
fn default() -> FormWidget
Auto Trait Implementations§
impl Freeze for FormWidget
impl RefUnwindSafe for FormWidget
impl Send for FormWidget
impl Sync for FormWidget
impl Unpin for FormWidget
impl UnwindSafe for FormWidget
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more