Skip to main content

TextEditPlugin

Struct TextEditPlugin 

Source
pub struct TextEditPlugin;
Expand description

Plugin that wires the text-edit systems.

Ordering inside TickStage::Systems:

  • text_attach_buffer early (so freshly-spawned <input> has a buffer).
  • text_apply_edits in TextEditSet::Apply, after TextEditSet::Producers - lumen-input tags its request producers (type_into_focused, text_pointer_to_caret, text_pointer_drag_select, route_ime_events, cycle_focus_on_tab) with that shared label, so pointer edits apply on the tick they were produced. The set edge is inert when no producer is installed.
  • text_mirror_buffer_to_content (TextEditSet::Mirror) after text_apply_edits.
  • text_reflect_content_to_buffer after the mirror (catches signal bindings and any legacy direct TextContent writes).
  • caret_blink after the mirror so a same-tick edit resets the phase before extract reads it.

Bind-text mirroring runs in its own stage; the mirror system writes TextContent so push_textinput_to_signal (which filters on Changed<TextContent>) keeps picking up edits.

Trait Implementations§

Source§

impl Default for TextEditPlugin

Default plugin metadata for TextEditPlugin.

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Plugin for TextEditPlugin

Source§

fn build(self, app: &mut App)

Registers systems and resources on app, consuming the plugin.
Source§

fn name(&self) -> &'static str

Returns the plugin’s name for diagnostics; defaults to the type name.
Source§

fn depends_on(&self) -> &'static [&'static str]

Returns the list of plugin names this plugin depends on. Default: empty. Read more
Source§

fn cleanup(&mut self, _app: &mut App)

Optional teardown hook. Default no-op. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromWorld for T
where T: Default,

§

fn from_world(_world: &mut World) -> T

Creates Self using default().

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> IntoResult<T> for T

§

fn into_result(self) -> Result<T, RunSystemError>

Converts this type into the system output type.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> ConditionalSend for T
where T: Send,