ferroui-base 0.3.0

The base library of FerroUI: the property system, layout, input, styling, media, text, animation, data binding and the compositor
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use super::Layoutable;
use crate::Ref;

/// A bring-into-view request, processed by the
/// [`IBringIntoViewLayoutManager`](super::IBringIntoViewLayoutManager) at the
/// end of a layout pass.
pub trait BringIntoViewRequest {
    /// Gets the control this request is associated with.
    fn target(&self) -> Ref<Layoutable>;

    /// Attempts to execute the request.
    ///
    /// Returns true if the request has been executed (or abandoned) and
    /// should be removed from the queue; false if the target isn't ready yet
    /// and the request should be retained for a following layout pass.
    fn try_execute(&self) -> bool;
}