pub struct MentionInputState {
pub content: String,
pub placeholder: SharedString,
pub disabled: bool,
pub trigger_char: char,
pub mentions: Vec<Mention>,
pub dropdown_open: bool,
pub dropdown_filter: String,
pub dropdown_index: usize,
/* private fields */
}Fields§
§content: String§placeholder: SharedString§disabled: bool§trigger_char: char§mentions: Vec<Mention>§dropdown_open: bool§dropdown_filter: String§dropdown_index: usizeImplementations§
Source§impl MentionInputState
impl MentionInputState
pub fn new(cx: &mut Context<'_, Self>) -> Self
pub fn content(&self) -> &str
pub fn mentions(&self) -> &[Mention]
pub fn set_value( &mut self, value: impl Into<String>, _window: &mut Window, cx: &mut Context<'_, Self>, )
pub fn clear(&mut self, _window: &mut Window, cx: &mut Context<'_, Self>)
pub fn mention_up( &mut self, _: &MentionUp, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_down( &mut self, _: &MentionDown, filtered_count: usize, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_confirm( &mut self, _: &MentionConfirm, items: &[MentionItem], _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_cancel( &mut self, _: &MentionCancel, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_backspace( &mut self, _: &MentionBackspace, window: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_delete( &mut self, _: &MentionDelete, window: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_left( &mut self, _: &MentionLeft, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_right( &mut self, _: &MentionRight, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_home( &mut self, _: &MentionHome, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_end( &mut self, _: &MentionEnd, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_select_all( &mut self, _: &MentionSelectAll, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_copy( &mut self, _: &MentionCopy, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_cut( &mut self, _: &MentionCut, window: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_paste( &mut self, _: &MentionPaste, window: &mut Window, cx: &mut Context<'_, Self>, )
pub fn mention_enter( &mut self, _: &MentionEnter, _: &mut Window, cx: &mut Context<'_, Self>, )
pub fn focus_handle(&self, _: &App) -> FocusHandle
Trait Implementations§
Source§impl EntityInputHandler for MentionInputState
impl EntityInputHandler for MentionInputState
Source§fn text_for_range(
&mut self,
range_utf16: Range<usize>,
actual_range: &mut Option<Range<usize>>,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> Option<String>
fn text_for_range( &mut self, range_utf16: Range<usize>, actual_range: &mut Option<Range<usize>>, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> Option<String>
See
InputHandler::text_for_range for detailsSource§fn selected_text_range(
&mut self,
_ignore_disabled_input: bool,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> Option<UTF16Selection>
fn selected_text_range( &mut self, _ignore_disabled_input: bool, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> Option<UTF16Selection>
See
InputHandler::selected_text_range for detailsSource§fn marked_text_range(
&self,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> Option<Range<usize>>
fn marked_text_range( &self, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> Option<Range<usize>>
See
InputHandler::marked_text_range for detailsSource§fn unmark_text(&mut self, _window: &mut Window, _cx: &mut Context<'_, Self>)
fn unmark_text(&mut self, _window: &mut Window, _cx: &mut Context<'_, Self>)
See
InputHandler::unmark_text for detailsSource§fn replace_text_in_range(
&mut self,
range_utf16: Option<Range<usize>>,
new_text: &str,
_: &mut Window,
cx: &mut Context<'_, Self>,
)
fn replace_text_in_range( &mut self, range_utf16: Option<Range<usize>>, new_text: &str, _: &mut Window, cx: &mut Context<'_, Self>, )
See
InputHandler::replace_text_in_range for detailsSource§fn replace_and_mark_text_in_range(
&mut self,
range_utf16: Option<Range<usize>>,
new_text: &str,
new_selected_range_utf16: Option<Range<usize>>,
_window: &mut Window,
cx: &mut Context<'_, Self>,
)
fn replace_and_mark_text_in_range( &mut self, range_utf16: Option<Range<usize>>, new_text: &str, new_selected_range_utf16: Option<Range<usize>>, _window: &mut Window, cx: &mut Context<'_, Self>, )
See
InputHandler::replace_and_mark_text_in_range for detailsSource§fn bounds_for_range(
&mut self,
range_utf16: Range<usize>,
bounds: Bounds<Pixels>,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> Option<Bounds<Pixels>>
fn bounds_for_range( &mut self, range_utf16: Range<usize>, bounds: Bounds<Pixels>, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> Option<Bounds<Pixels>>
See
InputHandler::bounds_for_range for detailsSource§fn character_index_for_point(
&mut self,
point: Point<Pixels>,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> Option<usize>
fn character_index_for_point( &mut self, point: Point<Pixels>, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> Option<usize>
See
InputHandler::character_index_for_point for detailsSource§fn accepts_text_input(
&self,
_window: &mut Window,
_cx: &mut Context<'_, Self>,
) -> bool
fn accepts_text_input( &self, _window: &mut Window, _cx: &mut Context<'_, Self>, ) -> bool
See
InputHandler::accepts_text_input for detailsimpl EventEmitter<MentionInputEvent> for MentionInputState
Source§impl Focusable for MentionInputState
impl Focusable for MentionInputState
Source§fn focus_handle(&self, _: &App) -> FocusHandle
fn focus_handle(&self, _: &App) -> FocusHandle
Returns the focus handle associated with this view.
Source§impl Render for MentionInputState
impl Render for MentionInputState
Auto Trait Implementations§
impl !RefUnwindSafe for MentionInputState
impl !Send for MentionInputState
impl !Sync for MentionInputState
impl !UnwindSafe for MentionInputState
impl Freeze for MentionInputState
impl Unpin for MentionInputState
impl UnsafeUnpin for MentionInputState
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> 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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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