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.
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. The area will be top aligned with the label.
unit: cols
Size(u16, u16)
Widget aligned with the label.
Will create an area with the given width and height. The area will be top aligned with the label.
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.
Will create an area with the given width and height. The area will be top aligned with the label.
unit: cols,rows
Wide(u16, u16)
Fill the total width of labels+widget. Any label that is not FormLabel::None will be placed above the widget.
Will create an area with the full width of labels + widgets and the given height.
unit: cols,rows
StretchX(u16, u16)
Stretch the widget to the maximum extent horizontally.
Will create an area with the full width of the given area, still respecting labels, borders and blocks.
unit: cols,rows
WideStretchX(u16, u16)
Stretch the widget to the maximum extend horizontally, including the label. (rows).
Will create an area with the full width of the given area, still respecting borders and blocks.
unit: cols,rows
StretchXY(u16, u16)
Stretch the widget to the maximum extent horizontally and vertically.
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)
Stretch the widget to the maximum extent horizontally and vertically, including 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: 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