pub struct FindBar { /* private fields */ }Expand description
Unstyled find-and-replace composition over caller-owned parts.
The application owns every visual decision, the two controlled inputs, and the edit that a
replacement performs. FindBar supplies stable part identities, roles, relationships, the
find-bar key context, and an accessible match count. It retains no task, timer, or registry.
Implementations§
Source§impl FindBar
impl FindBar
Sourcepub fn state(self, state: &FindState) -> Self
pub fn state(self, state: &FindState) -> Self
Project one FindState into the descriptor’s accessible count and enabled state.
Sourcepub fn label(self, label: impl Into<Arc<str>>) -> Self
pub fn label(self, label: impl Into<Arc<str>>) -> Self
Replace the accessible name of the find bar group.
Sourcepub fn query_input_id(&self) -> ElementId
pub fn query_input_id(&self) -> ElementId
The query input ID, usable as a focus target.
Sourcepub fn replace_input_id(&self) -> ElementId
pub fn replace_input_id(&self) -> ElementId
The replacement input ID.
Sourcepub fn count_text(&self) -> &Arc<str> ⓘ
pub fn count_text(&self) -> &Arc<str> ⓘ
The rendered match count, for example 2 of 17.
Sourcepub fn root_with(&self, root: Element) -> Element
pub fn root_with(&self, root: Element) -> Element
Decorate the application-owned root and declare the find-bar key context.
Sourcepub fn root(&self) -> Element
pub fn root(&self) -> Element
Create the unstyled root part. Use Self::root_with to supply an existing element.
Sourcepub fn query_input_with(&self, input: Element) -> Element
pub fn query_input_with(&self, input: Element) -> Element
Decorate the caller-owned query text input.
Sourcepub fn query_input(&self) -> Element
pub fn query_input(&self) -> Element
Create the unstyled query input part. Use Self::query_input_with to supply an existing element.
Sourcepub fn replace_input_with(&self, input: Element) -> Element
pub fn replace_input_with(&self, input: Element) -> Element
Decorate the caller-owned replacement text input.
Sourcepub fn replace_input(&self) -> Element
pub fn replace_input(&self) -> Element
Create the unstyled replace input part. Use Self::replace_input_with to supply an existing element.
Sourcepub fn count_with(&self, count: Element) -> Element
pub fn count_with(&self, count: Element) -> Element
Decorate the visible match count and expose it as this bar’s description.
Sourcepub fn count(&self) -> Element
pub fn count(&self) -> Element
Create the unstyled count part. Use Self::count_with to supply an existing element.
Sourcepub fn next(&self) -> Element
pub fn next(&self) -> Element
Create the unstyled next part. Use Self::next_with to supply an existing element.
Sourcepub fn previous_with(&self, button: Element) -> Element
pub fn previous_with(&self, button: Element) -> Element
Decorate the “previous match” control.
Sourcepub fn previous(&self) -> Element
pub fn previous(&self) -> Element
Create the unstyled previous part. Use Self::previous_with to supply an existing element.
Sourcepub fn replace_with(&self, button: Element) -> Element
pub fn replace_with(&self, button: Element) -> Element
Decorate the “replace current match” control.
Sourcepub fn replace(&self) -> Element
pub fn replace(&self) -> Element
Create the unstyled replace part. Use Self::replace_with to supply an existing element.
Sourcepub fn replace_all_with(&self, button: Element) -> Element
pub fn replace_all_with(&self, button: Element) -> Element
Decorate the “replace every match” control.
Sourcepub fn replace_all(&self) -> Element
pub fn replace_all(&self) -> Element
Create the unstyled replace all part. Use Self::replace_all_with to supply an existing element.
Sourcepub fn close_with(&self, button: Element) -> Element
pub fn close_with(&self, button: Element) -> Element
Decorate the dismissal control.
Sourcepub fn close(&self) -> Element
pub fn close(&self) -> Element
Create the unstyled close part. Use Self::close_with to supply an existing element.
Trait Implementations§
impl Eq for FindBar
impl StructuralPartialEq for FindBar
Auto Trait Implementations§
impl Freeze for FindBar
impl RefUnwindSafe for FindBar
impl Send for FindBar
impl Sync for FindBar
impl Unpin for FindBar
impl UnsafeUnpin for FindBar
impl UnwindSafe for FindBar
Blanket Implementations§
impl<T> Action for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.