pub trait TextEditorSurface: Sized {
Show 23 methods
// Required methods
fn text(&self, value: impl Into<String>) -> &Self;
fn value(&self) -> String;
fn selection_start(&self) -> u32;
fn selection_end(&self) -> u32;
fn selection_start_byte_offset(&self) -> u32;
fn selection_end_byte_offset(&self) -> u32;
fn placeholder(&self, value: impl Into<String>) -> &Self;
fn max_chars(&self, limit: i32) -> &Self;
fn read_only(&self, flag: bool) -> &Self;
fn accepts_tab(&self, flag: bool) -> &Self;
fn selection_range(&self, start: u32, end: u32) -> &Self;
fn caret(&self, position: u32) -> &Self;
fn caret_to_end(&self) -> &Self;
fn colors(&self, colors: TextInputColors) -> &Self;
fn clear_colors(&self) -> &Self;
fn template(&self, template: Rc<dyn TextInputTemplate>) -> &Self;
fn clear_template(&self) -> &Self;
fn line_height(&self, value: f32) -> &Self;
fn font_family(&self, family: FontFamily) -> &Self;
fn font_size(&self, size: f32) -> &Self;
fn on_changed(
&self,
handler: impl Fn(TextChangedEventArgs) + 'static,
) -> &Self;
fn on_text_changed(
&self,
handler: impl Fn(TextChangedEventArgs) + 'static,
) -> &Self;
fn on_selection_changed(
&self,
handler: impl Fn(SelectionChangedEventArgs) + 'static,
) -> &Self;
}Expand description
Required Methods§
fn text(&self, value: impl Into<String>) -> &Self
fn value(&self) -> String
fn selection_start(&self) -> u32
fn selection_end(&self) -> u32
fn selection_start_byte_offset(&self) -> u32
fn selection_end_byte_offset(&self) -> u32
fn placeholder(&self, value: impl Into<String>) -> &Self
fn max_chars(&self, limit: i32) -> &Self
fn read_only(&self, flag: bool) -> &Self
fn accepts_tab(&self, flag: bool) -> &Self
fn selection_range(&self, start: u32, end: u32) -> &Self
fn caret(&self, position: u32) -> &Self
fn caret_to_end(&self) -> &Self
fn colors(&self, colors: TextInputColors) -> &Self
fn clear_colors(&self) -> &Self
fn template(&self, template: Rc<dyn TextInputTemplate>) -> &Self
fn clear_template(&self) -> &Self
fn line_height(&self, value: f32) -> &Self
fn font_family(&self, family: FontFamily) -> &Self
fn font_size(&self, size: f32) -> &Self
fn on_changed(&self, handler: impl Fn(TextChangedEventArgs) + 'static) -> &Self
fn on_text_changed( &self, handler: impl Fn(TextChangedEventArgs) + 'static, ) -> &Self
fn on_selection_changed( &self, handler: impl Fn(SelectionChangedEventArgs) + 'static, ) -> &Self
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".