Skip to main content

LayoutManager

Struct LayoutManager 

Source
pub struct LayoutManager { /* private fields */ }
Expand description

Manages measuring and arranging of controls.

Implementations§

Source§

impl LayoutManager

Source

pub fn new(owner: Weak<dyn ILayoutRoot>) -> Rc<Self>

Creates a layout manager for a layout root.

Source

pub fn is_in_layout_pass(&self) -> bool

Whether a layout pass is currently executing.

Source

pub fn total_pass_count(&self) -> i32

The number of layout passes executed so far.

Source

pub fn layout_pass_timed(&self) -> Option<Rc<dyn Fn(LayoutPassTiming)>>

The callback that receives the timing of each layout pass (C# LayoutPassTimed, internal), or None.

Source

pub fn set_layout_pass_timed(&self, value: Option<Rc<dyn Fn(LayoutPassTiming)>>)

Sets the callback that receives the timing of each layout pass.

Trait Implementations§

Source§

impl IBringIntoViewLayoutManager for LayoutManager

Source§

fn is_in_layout_pass(&self) -> bool

Gets whether a layout pass is currently running.
Source§

fn enqueue_bring_into_view(&self, request: Rc<dyn BringIntoViewRequest>)

Enqueues a bring-into-view request to be processed at the end of the current or next layout pass, replacing any previously enqueued request for the same target.
Source§

impl ILayoutManager for LayoutManager

Source§

fn add_layout_updated(&self, handler: Rc<dyn Fn()>) -> u64

Subscribes to the event raised when the layout manager completes a layout pass. Returns a token for remove_layout_updated.
Source§

fn remove_layout_updated(&self, token: u64)

Unsubscribes a layout updated handler.
Source§

fn invalidate_measure(&self, control: &Layoutable)

Notifies the layout manager that a control requires a measure.
Source§

fn invalidate_arrange(&self, control: &Layoutable)

Notifies the layout manager that a control requires an arrange.
Source§

fn execute_layout_pass(&self)

Executes a layout pass. Read more
Source§

fn execute_initial_layout_pass(&self)

Executes the initial layout pass on a layout root. Read more
Source§

fn register_effective_viewport_listener(&self, control: &Layoutable)

Registers a control as wanting to receive effective viewport notifications.
Source§

fn unregister_effective_viewport_listener(&self, control: &Layoutable)

Unregisters a control from receiving effective viewport notifications.
Source§

fn dispose(&self)

Releases the layout manager.
Source§

fn as_bring_into_view_layout_manager( &self, ) -> Option<&dyn IBringIntoViewLayoutManager>

The layout manager viewed as one that handles bring-into-view requests, if it does.

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> 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> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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, 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.