pub struct EditableTextState { /* private fields */ }Expand description
State for a EditableText.
Implementations§
Source§impl EditableTextState
impl EditableTextState
Sourcepub fn clipboard_status(
self: Handle<Self>,
app: &App,
) -> Handle<ClipboardStatusNotifier>
pub fn clipboard_status( self: Handle<Self>, app: &App, ) -> Handle<ClipboardStatusNotifier>
Detects whether the clipboard can paste.
Sourcepub fn render_editable(
self: Handle<Self>,
app: &App,
) -> RenderHandle<RenderEditable>
pub fn render_editable( self: Handle<Self>, app: &App, ) -> RenderHandle<RenderEditable>
The RenderEditable this state created.
Sourcepub fn get_glyph_heights(self: Handle<Self>, app: &mut App) -> (f64, f64)
pub fn get_glyph_heights(self: Handle<Self>, app: &mut App) -> (f64, f64)
Gets the line heights at the start and end of the selection.
Returns the anchor points for the default context menu.
Returns the ContextMenuButtonItems representing the buttons in this
platform’s default selection menu for EditableText.
Sourcepub fn look_up_selection(
self: Handle<Self>,
app: &mut App,
_cause: SelectionChangedCause,
)
pub fn look_up_selection( self: Handle<Self>, app: &mut App, _cause: SelectionChangedCause, )
Look up the current selection, as in the “Look Up” edit menu button on iOS.
Sourcepub fn search_web_for_selection(
self: Handle<Self>,
app: &mut App,
_cause: SelectionChangedCause,
)
pub fn search_web_for_selection( self: Handle<Self>, app: &mut App, _cause: SelectionChangedCause, )
Launch a web search on the current selection.
Launch the share interface for the current selection.
Returns the ContextMenuButtonItems for the given ToolbarOptions.
Sourcepub fn spell_check_configuration(
self: Handle<Self>,
app: &App,
) -> SpellCheckConfiguration
pub fn spell_check_configuration( self: Handle<Self>, app: &App, ) -> SpellCheckConfiguration
Configuration that determines how spell check will be performed.
Sourcepub fn spell_check_enabled(self: Handle<Self>, app: &App) -> bool
pub fn spell_check_enabled(self: Handle<Self>, app: &App) -> bool
Whether or not spell check is enabled.
Sourcepub fn current_autofill_scope(
self: Handle<Self>,
app: &App,
) -> Option<Handle<AutofillGroupState>>
pub fn current_autofill_scope( self: Handle<Self>, app: &App, ) -> Option<Handle<AutofillGroupState>>
The AutofillGroup this EditableText belongs to, if any.
Sourcepub fn cursor_currently_visible(self: Handle<Self>, app: &App) -> bool
pub fn cursor_currently_visible(self: Handle<Self>, app: &App) -> bool
Whether the blinking cursor is actually visible at this precise moment.
Sourcepub fn cursor_blink_interval() -> Duration
pub fn cursor_blink_interval() -> Duration
The cursor blink interval (the amount of time the cursor is in the “on” state or the “off” state).
Sourcepub fn request_keyboard(self: Handle<Self>, app: &mut App)
pub fn request_keyboard(self: Handle<Self>, app: &mut App)
Express interest in interacting with the keyboard.
Sourcepub fn selection_overlay(
self: Handle<Self>,
app: &App,
) -> Option<Handle<TextSelectionOverlay>>
pub fn selection_overlay( self: Handle<Self>, app: &App, ) -> Option<Handle<TextSelectionOverlay>>
The current status of the text selection handles.
Sourcepub fn bring_into_view(
self: Handle<Self>,
app: &mut App,
position: TextPosition,
)
pub fn bring_into_view( self: Handle<Self>, app: &mut App, position: TextPosition, )
Brings the provided TextPosition into the visible area of the text
input.
Sourcepub fn show_toolbar(self: Handle<Self>, app: &mut App) -> bool
pub fn show_toolbar(self: Handle<Self>, app: &mut App) -> bool
Shows the selection toolbar at the location of the current cursor.
Sourcepub fn hide_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
pub fn hide_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
Hides the text selection toolbar.
Sourcepub fn toggle_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
pub fn toggle_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
Toggles the visibility of the toolbar.
Sourcepub fn show_spell_check_suggestions_toolbar(
self: Handle<Self>,
app: &mut App,
) -> bool
pub fn show_spell_check_suggestions_toolbar( self: Handle<Self>, app: &mut App, ) -> bool
Shows toolbar with spell check suggestions of misspelled words that are available for click-and-replace.
Sourcepub fn show_magnifier(
self: Handle<Self>,
app: &mut App,
position_to_show: Offset,
)
pub fn show_magnifier( self: Handle<Self>, app: &mut App, position_to_show: Offset, )
Shows the magnifier at the position given by position_to_show,
if no magnifier exists.
Sourcepub fn hide_magnifier(self: Handle<Self>, app: &mut App)
pub fn hide_magnifier(self: Handle<Self>, app: &mut App)
Hides the magnifier.
Sourcepub fn find_suggestion_span_at_cursor_index(
self: Handle<Self>,
app: &App,
cursor_index: i32,
) -> Option<SuggestionSpan>
pub fn find_suggestion_span_at_cursor_index( self: Handle<Self>, app: &App, cursor_index: i32, ) -> Option<SuggestionSpan>
Finds specified SuggestionSpan that matches the provided index using
binary search.
Sourcepub fn begin_batch_edit(self: Handle<Self>, app: &mut App)
pub fn begin_batch_edit(self: Handle<Self>, app: &mut App)
Begins a new batch edit.
Sourcepub fn end_batch_edit(self: Handle<Self>, app: &mut App)
pub fn end_batch_edit(self: Handle<Self>, app: &mut App)
Ends the current batch edit started by the last call to
begin_batch_edit.
Sourcepub fn build_text_span(
self: Handle<Self>,
app: &mut App,
context: BuildContext,
) -> TextSpan
pub fn build_text_span( self: Handle<Self>, app: &mut App, context: BuildContext, ) -> TextSpan
Builds TextSpan from current editing value.
Trait Implementations§
Source§impl AutofillClient for EditableTextState
impl AutofillClient for EditableTextState
Source§fn autofill_id(self: Handle<Self>, _app: &App) -> String
fn autofill_id(self: Handle<Self>, _app: &App) -> String
AutofillClient. Read moreSource§fn text_input_configuration(
self: Handle<Self>,
app: &App,
) -> TextInputConfiguration
fn text_input_configuration( self: Handle<Self>, app: &App, ) -> TextInputConfiguration
Source§fn autofill(
self: Handle<Self>,
app: &mut App,
new_editing_value: TextEditingValue,
)
fn autofill( self: Handle<Self>, app: &mut App, new_editing_value: TextEditingValue, )
AutofillClient update its TextEditingValue to the given
value.Source§fn as_autofill_client(self: Handle<Self>) -> AnyAutofillClient
fn as_autofill_client(self: Handle<Self>) -> AnyAutofillClient
AnyAutofillClient.Source§impl AutomaticKeepAliveClientMixin for EditableTextState
impl AutomaticKeepAliveClientMixin for EditableTextState
Source§fn automatic_keep_alive_client_data(
self: Handle<Self>,
app: &App,
) -> &AutomaticKeepAliveClientMixinData
fn automatic_keep_alive_client_data( self: Handle<Self>, app: &App, ) -> &AutomaticKeepAliveClientMixinData
Source§fn automatic_keep_alive_client_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut AutomaticKeepAliveClientMixinData
fn automatic_keep_alive_client_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut AutomaticKeepAliveClientMixinData
Source§fn want_keep_alive(self: Handle<Self>, app: &App) -> bool
fn want_keep_alive(self: Handle<Self>, app: &App) -> bool
Source§fn update_keep_alive(self: Handle<Self>, app: &mut App)
fn update_keep_alive(self: Handle<Self>, app: &mut App)
AutomaticKeepAlive ancestors are in a good state, by
firing a KeepAliveNotification or triggering the KeepAliveHandle as
appropriate.Source§fn init_state(self: Handle<Self>, app: &mut App)
fn init_state(self: Handle<Self>, app: &mut App)
State::init_state; the state calls it where Dart’s
super.initState() would reach the mixin.Source§fn deactivate(self: Handle<Self>, app: &mut App)
fn deactivate(self: Handle<Self>, app: &mut App)
State::deactivate; the state calls it where Dart’s
super.deactivate() would reach the mixin.Source§impl Debug for EditableTextState
impl Debug for EditableTextState
Source§impl State for EditableTextState
impl State for EditableTextState
Source§type Widget = EditableText
type Widget = EditableText
State<T> type argument.Source§fn state_data(self: Handle<Self>, app: &App) -> &StateData<Self::Widget>
fn state_data(self: Handle<Self>, app: &App) -> &StateData<Self::Widget>
state
(state_accessors!).Source§fn state_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut StateData<Self::Widget>
fn state_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut StateData<Self::Widget>
state_data.Source§fn init_state(self: Handle<Self>, app: &mut App)
fn init_state(self: Handle<Self>, app: &mut App)
Source§fn did_change_dependencies(self: Handle<Self>, app: &mut App)
fn did_change_dependencies(self: Handle<Self>, app: &mut App)
Source§fn did_update_widget(
self: Handle<Self>,
app: &mut App,
old_widget: &EditableText,
)
fn did_update_widget( self: Handle<Self>, app: &mut App, old_widget: &EditableText, )
Source§fn activate(self: Handle<Self>, app: &mut App)
fn activate(self: Handle<Self>, app: &mut App)
deactivate. Read moreSource§fn deactivate(self: Handle<Self>, app: &mut App)
fn deactivate(self: Handle<Self>, app: &mut App)
Source§fn dispose(self: Handle<Self>, app: &mut App)
fn dispose(self: Handle<Self>, app: &mut App)
Source§fn build(self: Handle<Self>, app: &mut App, context: BuildContext) -> WidgetRef
fn build(self: Handle<Self>, app: &mut App, context: BuildContext) -> WidgetRef
Source§fn widget(self: Handle<Self>, app: &App) -> &Self::Widget
fn widget(self: Handle<Self>, app: &App) -> &Self::Widget
Source§fn context(self: Handle<Self>, app: &App) -> BuildContext
fn context(self: Handle<Self>, app: &App) -> BuildContext
Source§fn set_state(self: Handle<Self>, app: &mut App, f: impl FnOnce(&mut Self))
fn set_state(self: Handle<Self>, app: &mut App, f: impl FnOnce(&mut Self))
Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
debugFillProperties: the properties this state shows where its element’s dump
names it (state: ScrollableState#1a2b3(offset: 0.0)), after the lifecycle and mounting
properties State’s base adds, which the framework adds first.Source§impl TextInputClient for EditableTextState
impl TextInputClient for EditableTextState
Source§fn current_text_editing_value(
self: Handle<Self>,
app: &App,
) -> Option<TextEditingValue>
fn current_text_editing_value( self: Handle<Self>, app: &App, ) -> Option<TextEditingValue>
TextEditingValue held by this client.Source§fn update_editing_value(
self: Handle<Self>,
app: &mut App,
value: TextEditingValue,
)
fn update_editing_value( self: Handle<Self>, app: &mut App, value: TextEditingValue, )
Source§fn perform_action(self: Handle<Self>, app: &mut App, action: TextInputAction)
fn perform_action(self: Handle<Self>, app: &mut App, action: TextInputAction)
Source§fn perform_private_command(self: Handle<Self>, app: &mut App, action: &str)
fn perform_private_command(self: Handle<Self>, app: &mut App, action: &str)
Source§fn connection_closed(self: Handle<Self>, app: &mut App)
fn connection_closed(self: Handle<Self>, app: &mut App)
Source§fn show_autocorrection_prompt_rect(
self: Handle<Self>,
app: &mut App,
start: i32,
end: i32,
)
fn show_autocorrection_prompt_rect( self: Handle<Self>, app: &mut App, start: i32, end: i32, )
Source§fn show_toolbar(self: Handle<Self>, app: &mut App)
fn show_toolbar(self: Handle<Self>, app: &mut App)
Source§fn perform_selector(self: Handle<Self>, app: &mut App, selector_name: &str)
fn perform_selector(self: Handle<Self>, app: &mut App, selector_name: &str)
NSStandardKeyBindingResponding protocol or user-specified selector
from DefaultKeyBinding.Dict.Source§fn update_floating_cursor(
self: Handle<Self>,
app: &mut App,
point: RawFloatingCursorPoint,
)
fn update_floating_cursor( self: Handle<Self>, app: &mut App, point: RawFloatingCursorPoint, )
Source§fn insert_text_placeholder(self: Handle<Self>, app: &mut App, size: Size)
fn insert_text_placeholder(self: Handle<Self>, app: &mut App, size: Size)
Source§fn remove_text_placeholder(self: Handle<Self>, app: &mut App)
fn remove_text_placeholder(self: Handle<Self>, app: &mut App)
Source§fn as_text_input_client(self: Handle<Self>) -> AnyTextInputClient
fn as_text_input_client(self: Handle<Self>) -> AnyTextInputClient
AnyTextInputClient.Source§impl TextSelectionDelegate for EditableTextState
impl TextSelectionDelegate for EditableTextState
Source§fn text_editing_value(self: Handle<Self>, app: &App) -> TextEditingValue
fn text_editing_value(self: Handle<Self>, app: &App) -> TextEditingValue
Source§fn user_update_text_editing_value(
self: Handle<Self>,
app: &mut App,
value: TextEditingValue,
cause: SelectionChangedCause,
)
fn user_update_text_editing_value( self: Handle<Self>, app: &mut App, value: TextEditingValue, cause: SelectionChangedCause, )
value. Read moreSource§fn hide_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
fn hide_toolbar(self: Handle<Self>, app: &mut App, hide_handles: bool)
Source§fn bring_into_view(self: Handle<Self>, app: &mut App, position: TextPosition)
fn bring_into_view(self: Handle<Self>, app: &mut App, position: TextPosition)
TextPosition] into the visible area of the text
input.Source§fn live_text_input_enabled(self: Handle<Self>, app: &App) -> bool
fn live_text_input_enabled(self: Handle<Self>, app: &App) -> bool
Source§fn copy_selection(
self: Handle<Self>,
app: &mut App,
cause: SelectionChangedCause,
)
fn copy_selection( self: Handle<Self>, app: &mut App, cause: SelectionChangedCause, )
crate::Clipboard.Source§fn cut_selection(
self: Handle<Self>,
app: &mut App,
cause: SelectionChangedCause,
)
fn cut_selection( self: Handle<Self>, app: &mut App, cause: SelectionChangedCause, )
crate::Clipboard.Source§fn paste_text(
self: Handle<Self>,
app: &mut App,
cause: SelectionChangedCause,
) -> Task<()> ⓘ
fn paste_text( self: Handle<Self>, app: &mut App, cause: SelectionChangedCause, ) -> Task<()> ⓘ
crate::Clipboard.Source§fn select_all(self: Handle<Self>, app: &mut App, cause: SelectionChangedCause)
fn select_all(self: Handle<Self>, app: &mut App, cause: SelectionChangedCause)
Source§fn as_text_selection_delegate(self: Handle<Self>) -> AnyTextSelectionDelegate
fn as_text_selection_delegate(self: Handle<Self>) -> AnyTextSelectionDelegate
AnyTextSelectionDelegate.Source§impl TickerProviderObject for EditableTextState
impl TickerProviderObject for EditableTextState
Source§fn create_ticker(
self: Handle<Self>,
app: &mut App,
on_tick: TickerCallback,
) -> Ref<Ticker>
fn create_ticker( self: Handle<Self>, app: &mut App, on_tick: TickerCallback, ) -> Ref<Ticker>
Source§impl TickerProviderStateMixin for EditableTextState
impl TickerProviderStateMixin for EditableTextState
Source§fn ticker_provider_data(
self: Handle<Self>,
app: &App,
) -> &TickerProviderStateMixinData
fn ticker_provider_data( self: Handle<Self>, app: &App, ) -> &TickerProviderStateMixinData
Source§fn ticker_provider_data_mut(
self: Handle<Self>,
app: &mut App,
) -> &mut TickerProviderStateMixinData
fn ticker_provider_data_mut( self: Handle<Self>, app: &mut App, ) -> &mut TickerProviderStateMixinData
ticker_provider_data.Source§fn debug_fill_properties(
self: Handle<Self>,
app: &App,
properties: &mut DiagnosticPropertiesBuilder,
)
fn debug_fill_properties( self: Handle<Self>, app: &App, properties: &mut DiagnosticPropertiesBuilder, )
TickerProviderStateMixin.debugFillProperties, which a state’s own body calls
where Dart’s mixin adds its line.Source§fn create_ticker(
self: Handle<Self>,
app: &mut App,
on_tick: TickerCallback,
) -> Ref<Ticker>
fn create_ticker( self: Handle<Self>, app: &mut App, on_tick: TickerCallback, ) -> Ref<Ticker>
TickerProvider::create_ticker: creates a ticker with the given callback.