Skip to main content

ferroui_base/layout/
bring_into_view_request.rs

1use super::Layoutable;
2use crate::Ref;
3
4/// A bring-into-view request, processed by the
5/// [`IBringIntoViewLayoutManager`](super::IBringIntoViewLayoutManager) at the
6/// end of a layout pass.
7pub trait BringIntoViewRequest {
8    /// Gets the control this request is associated with.
9    fn target(&self) -> Ref<Layoutable>;
10
11    /// Attempts to execute the request.
12    ///
13    /// Returns true if the request has been executed (or abandoned) and
14    /// should be removed from the queue; false if the target isn't ready yet
15    /// and the request should be retained for a following layout pass.
16    fn try_execute(&self) -> bool;
17}