pub enum AxisDirection {
Up,
Right,
Down,
Left,
}Expand description
A direction along either the horizontal or vertical Axis in which the
origin, or zero position, is determined.
This value relates to the direction in which the scroll offset increases
from the origin. This value does not represent the direction of user input
that may be modifying the scroll offset, such as from a drag. For the
active scrolling direction, see ScrollDirection.
See also:
ScrollDirection, the direction of active scrolling, relative to the positive scroll offset axis given by anAxisDirectionand aGrowthDirection.GrowthDirection, the direction in which slivers and their content are ordered, relative to the scroll offset axis as specified byAxisDirection.CustomScrollView.anchor, the relative position of the zero scroll offset in a viewport and inflection point forAxisDirections of the same cardinalAxis.axis_direction_is_reversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Variants§
Up
A direction in the Axis::Vertical where zero is at the bottom and
positive values are above it: ⇈
Alphabetical content with a GrowthDirection.forward would have the A
at the bottom and the Z at the top.
For example, the behavior of a ListView with ListView.reverse set to
true would have this axis direction.
See also:
axis_direction_is_reversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Right
A direction in the Axis::Horizontal where zero is on the left and
positive values are to the right of it: ⇉
Alphabetical content with a GrowthDirection.forward would have the A
on the left and the Z on the right. This is the ordinary reading order
for a horizontal set of tabs in an English application, for example.
For example, the behavior of a ListView with ListView.scrollDirection
set to Axis::Horizontal would have this axis direction.
See also:
axis_direction_is_reversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Down
A direction in the Axis::Vertical where zero is at the top and
positive values are below it: ⇊
Alphabetical content with a GrowthDirection.forward would have the A
at the top and the Z at the bottom. This is the ordinary reading order
for a vertical list.
For example, the default behavior of a ListView would have this axis
direction.
See also:
axis_direction_is_reversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Left
A direction in the Axis::Horizontal where zero is to the right and
positive values are to the left of it: ⇇
Alphabetical content with a GrowthDirection.forward would have the A
at the right and the Z at the left. This is the ordinary reading order
for a horizontal set of tabs in a Hebrew application, for example.
For example, the behavior of a ListView with ListView.scrollDirection
set to Axis::Horizontal and ListView.reverse set to true would
have this axis direction.
See also:
axis_direction_is_reversed, which returns whether traveling along the given axis direction visits coordinates along that axis in numerically decreasing order.
Trait Implementations§
Source§impl Clone for AxisDirection
impl Clone for AxisDirection
Source§fn clone(&self) -> AxisDirection
fn clone(&self) -> AxisDirection
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for AxisDirection
Source§impl Debug for AxisDirection
impl Debug for AxisDirection
impl Eq for AxisDirection
Source§impl PartialEq for AxisDirection
impl PartialEq for AxisDirection
impl StructuralPartialEq for AxisDirection
Auto Trait Implementations§
impl Forget for AxisDirection
impl Freeze for AxisDirection
impl Move for AxisDirection
impl RefUnwindSafe for AxisDirection
impl Send for AxisDirection
impl Sync for AxisDirection
impl Unpin for AxisDirection
impl UnsafeUnpin for AxisDirection
impl UnwindSafe for AxisDirection
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.