Enum gpui2::FlexDirection
pub enum FlexDirection {
Row,
Column,
RowReverse,
ColumnReverse,
}
Expand description
The direction of the flexbox layout main axis.
There are always two perpendicular layout axes: main (or primary) and cross (or secondary). Adding items will cause them to be positioned adjacent to each other along the main axis. By varying this value throughout your tree, you can create complex axis-aligned layouts.
Items are always aligned relative to the cross axis, and justified relative to the main axis.
The default behavior is FlexDirection::Row
.
Variants§
Row
Defines +x as the main axis
Items will be added from left to right in a row.
Column
Defines +y as the main axis
Items will be added from top to bottom in a column.
RowReverse
Defines -x as the main axis
Items will be added from right to left in a row.
ColumnReverse
Defines -y as the main axis
Items will be added from bottom to top in a column.
Trait Implementations§
§impl Clone for FlexDirection
impl Clone for FlexDirection
§fn clone(&self) -> FlexDirection
fn clone(&self) -> FlexDirection
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for FlexDirection
impl Debug for FlexDirection
§impl Default for FlexDirection
impl Default for FlexDirection
§fn default() -> FlexDirection
fn default() -> FlexDirection
§impl PartialEq<FlexDirection> for FlexDirection
impl PartialEq<FlexDirection> for FlexDirection
§fn eq(&self, other: &FlexDirection) -> bool
fn eq(&self, other: &FlexDirection) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for FlexDirection
impl Eq for FlexDirection
impl StructuralEq for FlexDirection
impl StructuralPartialEq for FlexDirection
Auto Trait Implementations§
impl RefUnwindSafe for FlexDirection
impl Send for FlexDirection
impl Sync for FlexDirection
impl Unpin for FlexDirection
impl UnwindSafe for FlexDirection
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
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.