pub struct FindReplace { /* private fields */ }Expand description
A SearchField with a replacement field and the two replace actions.
Replace-all says how many hits it will change before it is taken, and is only offered when that number is a counted one: an unfinished count, a count that stopped early, and a search the host could not run are all numbers nobody has, so the action is refused with the reason on it rather than fired against a guess.
Implementations§
Source§impl FindReplace
impl FindReplace
pub fn new( ident: impl Into<Ident>, window: &mut Window, cx: &mut Context<'_, Self>, ) -> Self
pub fn search_field(&self) -> &Entity<SearchField>
pub fn replacement_input(&self) -> &Entity<TextInput>
pub fn set_count(&mut self, count: HitCount, cx: &mut Context<'_, Self>)
pub fn count(&self, cx: &App) -> HitCount
pub fn replacement_text(&self, cx: &App) -> SharedString
pub fn set_disabled(&mut self, disabled: bool, cx: &mut Context<'_, Self>)
Trait Implementations§
Source§impl Debug for FindReplace
impl Debug for FindReplace
impl EventEmitter<FindReplaceEvent> for FindReplace
Source§impl Focusable for FindReplace
impl Focusable for FindReplace
Source§fn focus_handle(&self, _cx: &App) -> FocusHandle
fn focus_handle(&self, _cx: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Render for FindReplace
impl Render for FindReplace
Auto Trait Implementations§
impl !RefUnwindSafe for FindReplace
impl !Send for FindReplace
impl !Sync for FindReplace
impl !UnwindSafe for FindReplace
impl Freeze for FindReplace
impl Unpin for FindReplace
impl UnsafeUnpin for FindReplace
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more