Skip to main content

LayoutNode

Struct LayoutNode 

Source
pub struct LayoutNode {
Show 15 fields pub bounds: Rect, pub clip: Rect, pub visible: bool, pub enabled: bool, pub layout_direction: LayoutDirection, pub scroll: Option<ScrollLayout>, pub table: Option<Box<TableGeometry>>, pub split: Option<Box<SplitGeometry>>, pub tab_header: Option<Rect>, pub tab_close: Option<Rect>, pub tumbler: Option<Box<TumblerGeometry>>, pub switch_position: Option<f32>, pub swipe_delegate: Option<Box<SwipeDelegateGeometry>>, pub styled_text: Option<Box<StyledTextLayout>>, pub children: Vec<LayoutNode>, /* private fields */
}

Fields§

§bounds: Rect§clip: Rect

Rectangular part of the ancestor clip.

§visible: bool§enabled: bool§layout_direction: LayoutDirection§scroll: Option<ScrollLayout>§table: Option<Box<TableGeometry>>§split: Option<Box<SplitGeometry>>§tab_header: Option<Rect>

Header hit box of a tab, independent of the page visibility.

§tab_close: Option<Rect>

Close button bounds within a tab header or standalone tab button.

§tumbler: Option<Box<TumblerGeometry>>§switch_position: Option<f32>

Logical thumb position while a switch gesture is active.

§swipe_delegate: Option<Box<SwipeDelegateGeometry>>§styled_text: Option<Box<StyledTextLayout>>§children: Vec<LayoutNode>

Implementations§

Source§

impl LayoutNode

Source

pub fn attached_scroll_geometry(&self) -> Option<ScrollBarGeometry>

Source

pub fn scroll_control_geometry(&self, node: &Node) -> Option<ScrollBarGeometry>

Source

pub fn scroll_bars( &self, node: &Node, ) -> impl Iterator<Item = ScrollBarGeometry>

Bars share the viewport’s offsets and do not change content or header layout.

Source§

impl LayoutNode

Source§

impl LayoutNode

Source

pub fn list_section_headers(&self) -> &[ListSectionHeader]

Source

pub fn layout_direction_override(&self) -> Option<LayoutDirection>

The nearest explicit direction, including an inherited declaration.

Source

pub fn image_playback<'a>( &self, node: &'a Node, ) -> Option<(&'a Rc<ImagePlaybackRegistration>, bool)>

Source

pub fn allows_overflow(&self) -> bool

Source

pub fn child_clip_shape(&self) -> Option<RoundedClip>

Source

pub fn local_transform(&self) -> Affine

Source

pub fn table_pane_clip(&self) -> Option<(Rect, Affine)>

An exact table pane clip, expressed in the parent space before this item’s transform.

Source

pub fn world_transform(&self) -> Affine

Source

pub fn map_from_window(&self, point: Point) -> Option<Point>

Undo the visual transform, returning pre-transform layout coordinates.

Source

pub fn map_delta_from_window(&self, delta: Point) -> Option<Point>

Source

pub fn map_to_window(&self, point: Point) -> Point

Source

pub fn window_bounds(&self, rect: Rect) -> Rect

Source

pub fn clip_rect(&self, rect: Rect) -> Rect

Rectangular projection of the clipping region in layout coordinates.

Source

pub fn visible_window_bounds(&self, rect: Rect) -> Rect

Source

pub fn contains_clip_point(&self, point: Point) -> bool

Source

pub fn child_paint_order(&self) -> impl DoubleEndedIterator<Item = usize> + '_

Back to front. Scene indices stay in declaration order for routing.

Source

pub fn children_in_paint_order<'a>( &'a self, node: &'a Node, ) -> impl DoubleEndedIterator<Item = (usize, &'a Node, &'a LayoutNode)> + 'a

Source

pub fn dialog_title_height(&self, _node: &Node) -> f32

Reserved title height using the text metrics prepared for this layout.

Source

pub fn group_header(&self, node: &Node) -> Rect

Source

pub fn scroll_on(&self, orientation: Orientation) -> Option<ScrollLayout>

Source

pub fn dialog_paths(&self) -> &[Vec<usize>]

Paths of visible modal overlays, in declaration order.

Source

pub fn overlay_paths(&self) -> &[Vec<usize>]

Paths of all open overlays, in declaration order.

Source

pub fn child_at(&self, index: usize) -> Option<&Self>

Look up a laid-out child by its logical scene index.

Source

pub fn at_path(&self, path: &[usize]) -> Option<&Self>

Trait Implementations§

Source§

impl Clone for LayoutNode

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for LayoutNode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LayoutNode

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for LayoutNode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AnyEq for T
where T: Any + PartialEq,

Source§

fn equals(&self, other: &(dyn Any + 'static)) -> bool

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more