Struct zng_app::update::UpdateDeliveryList
source · pub struct UpdateDeliveryList { /* private fields */ }Expand description
Represents all the widgets and windows marked to receive an update.
Implementations§
source§impl UpdateDeliveryList
impl UpdateDeliveryList
sourcepub fn new(subscribers: Box<dyn UpdateSubscribers>) -> Self
pub fn new(subscribers: Box<dyn UpdateSubscribers>) -> Self
New list that only allows subscribers.
sourcepub fn insert_wgt(&mut self, wgt: &impl WidgetPathProvider)
pub fn insert_wgt(&mut self, wgt: &impl WidgetPathProvider)
Insert the wgt and ancestors up-to the inner most that is included in the subscribers.
sourcepub fn insert_window(&mut self, id: WindowId)
pub fn insert_window(&mut self, id: WindowId)
Insert the window by itself, the window root widget will be targeted.
sourcepub fn search_all(&mut self)
pub fn search_all(&mut self)
Register all subscribers for search and delivery.
sourcepub fn search_widget(&mut self, widget_id: WidgetId)
pub fn search_widget(&mut self, widget_id: WidgetId)
Register the widget of unknown location for search before delivery routing starts.
sourcepub fn has_pending_search(&mut self) -> bool
pub fn has_pending_search(&mut self) -> bool
If the list has pending widgets that must be found before delivery can start.
sourcepub fn fulfill_search<'a, 'b>(
&'a mut self,
windows: impl Iterator<Item = &'b WidgetInfoTree>
)
pub fn fulfill_search<'a, 'b>( &'a mut self, windows: impl Iterator<Item = &'b WidgetInfoTree> )
Search all pending widgets in all windows, all search items are cleared, even if not found.
sourcepub fn enter_window(&self, window_id: WindowId) -> bool
pub fn enter_window(&self, window_id: WindowId) -> bool
Returns true if the window is on the list.
sourcepub fn enter_widget(&self, widget_id: WidgetId) -> bool
pub fn enter_widget(&self, widget_id: WidgetId) -> bool
Returns true if the widget is on the list.
sourcepub fn widgets(&self) -> &IdSet<WidgetId>
pub fn widgets(&self) -> &IdSet<WidgetId>
Found widgets in the delivery list, can be targets or ancestors of targets.
sourcepub fn search_widgets(&mut self) -> &IdSet<WidgetId>
pub fn search_widgets(&mut self) -> &IdSet<WidgetId>
Widgets still pending search or not found.
sourcepub fn search_root(&mut self) -> bool
pub fn search_root(&mut self) -> bool
If search for window a root is pending.