pub struct LayoutManager { /* private fields */ }Expand description
Manages measuring and arranging of controls.
Implementations§
Source§impl LayoutManager
impl LayoutManager
Sourcepub fn new(owner: Weak<dyn ILayoutRoot>) -> Rc<Self>
pub fn new(owner: Weak<dyn ILayoutRoot>) -> Rc<Self>
Creates a layout manager for a layout root.
Sourcepub fn is_in_layout_pass(&self) -> bool
pub fn is_in_layout_pass(&self) -> bool
Whether a layout pass is currently executing.
Sourcepub fn total_pass_count(&self) -> i32
pub fn total_pass_count(&self) -> i32
The number of layout passes executed so far.
Sourcepub fn layout_pass_timed(&self) -> Option<Rc<dyn Fn(LayoutPassTiming)>>
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.
Sourcepub fn set_layout_pass_timed(&self, value: Option<Rc<dyn Fn(LayoutPassTiming)>>)
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
impl IBringIntoViewLayoutManager for LayoutManager
Source§fn is_in_layout_pass(&self) -> bool
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>)
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
impl ILayoutManager for LayoutManager
Source§fn add_layout_updated(&self, handler: Rc<dyn Fn()>) -> u64
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)
fn remove_layout_updated(&self, token: u64)
Unsubscribes a layout updated handler.
Source§fn invalidate_measure(&self, control: &Layoutable)
fn invalidate_measure(&self, control: &Layoutable)
Notifies the layout manager that a control requires a measure.
Source§fn invalidate_arrange(&self, control: &Layoutable)
fn invalidate_arrange(&self, control: &Layoutable)
Notifies the layout manager that a control requires an arrange.
Source§fn execute_layout_pass(&self)
fn execute_layout_pass(&self)
Executes a layout pass. Read more
Source§fn execute_initial_layout_pass(&self)
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)
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)
fn unregister_effective_viewport_listener(&self, control: &Layoutable)
Unregisters a control from receiving effective viewport notifications.
Source§fn as_bring_into_view_layout_manager(
&self,
) -> Option<&dyn IBringIntoViewLayoutManager>
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§
impl !Freeze for LayoutManager
impl !RefUnwindSafe for LayoutManager
impl !Send for LayoutManager
impl !Sync for LayoutManager
impl !UnwindSafe for LayoutManager
impl Unpin for LayoutManager
impl UnsafeUnpin for LayoutManager
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
Mutably borrows from an owned value. Read more
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
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