pub struct Container {
pub align: Align,
pub justify: Justify,
/* private fields */
}Expand description
Lays its children out in a row or a column. Also what panel,
separator, spacer and check are made of; they differ only by tag,
which is what the stylesheet sees.
Fields§
§align: AlignHow children are placed across the axis unless they say otherwise.
The align_items attribute.
justify: JustifyHow children are spread along the axis when there is room left. The
justify attribute.
Implementations§
Trait Implementations§
Source§impl<M: 'static> Widget<M> for Container
impl<M: 'static> Widget<M> for Container
Source§fn set_attribute(&mut self, name: &str, value: &str) -> bool
fn set_attribute(&mut self, name: &str, value: &str) -> bool
Takes an attribute from the element description, returning
false
for one the widget does not know. id, class, style, grow,
align, disabled, shortcut and state never reach here.Source§fn axis(&self) -> Option<Axis>
fn axis(&self) -> Option<Axis>
Some for a container: the direction it lays its children out in.fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Source§fn measure(&self, fonts: &dyn Fonts, style: &ComputedStyle) -> Size
fn measure(&self, fonts: &dyn Fonts, style: &ComputedStyle) -> Size
The natural size of the widget’s own content, without padding or
border. Containers are measured from their children instead.
Source§fn state(&self) -> ElementState
fn state(&self) -> ElementState
State the widget owns, such as
CHECKED, merged into the element’s
state for styling.Auto Trait Implementations§
impl Freeze for Container
impl RefUnwindSafe for Container
impl Send for Container
impl Sync for Container
impl Unpin for Container
impl UnsafeUnpin for Container
impl UnwindSafe for Container
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