pub struct Box(_, _);
Box widget organizes child widgets into a rectangular area.
The rectangular area of a
Box is organized into either a single row
or a single column of child widgets depending upon the orientation.
Thus, all children of a
Box are allocated one dimension in common,
which is the height of a row, or the width of a column.
Box uses a notion of packing. Packing refers
to adding widgets with reference to a particular position in a
Container. For a
Box, there are two reference positions: the
start and the end of the box.
For a vertical
Box, the start is defined as the top of the box and
the end is defined as the bottom. For a horizontal
Box the start
is defined as the left side and the end is defined as the right side.
Use repeated calls to
BoxExt::pack_start to pack widgets into a
Box from start to end. Use
BoxExt::pack_end to add widgets from
end to start. You may intersperse these calls and add widgets from
both ends of the same
Box is a
Container, you may also use
to insert widgets into the box, and they will be packed with the default
values for expand and fill child properties. Use
to remove widgets from the
BoxExt::set_homogeneous to specify whether or not all children
Box are forced to get the same amount of space.
BoxExt::set_spacing to determine how much space will be
minimally placed between all children in the
Box. Note that
spacing is added between the children, while
padding added by
BoxExt::pack_end is added
on either side of the widget it belongs to.
BoxExt::reorder_child to move a
Box child to a different
place in the box.
BoxExt::set_child_packing to reset the expand,
fill and padding child properties.
BoxExt::query_child_packing to query these fields.
Note that a single-row or single-column
Grid provides exactly
the same functionality as
fn new(orientation: Orientation, spacing: i32) -> Box
impl Clone for Box
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from
source. Read more
impl Debug for Box
impl Hash for Box
Feeds this value into the state given, updating the hasher as necessary.
fn hash_slice<H>(data: &[Self], state: &mut H) where H: Hasher1.3.0
Feeds a slice of this type into the state provided.
impl StaticType for Box
impl<T: IsA<Object>> PartialEq<T> for Box
This method tests for
other values to be equal, and is used by
==. Read more
This method tests for