Skip to main content

EditableTextExt

Trait EditableTextExt 

Source
pub trait EditableTextExt:
    IsA<EditableText>
    + Sealed
    + 'static {
    // Provided methods
    fn copy_text(&self, start_pos: i32, end_pos: i32) { ... }
    fn cut_text(&self, start_pos: i32, end_pos: i32) { ... }
    fn delete_text(&self, start_pos: i32, end_pos: i32) { ... }
    fn paste_text(&self, position: i32) { ... }
    fn set_text_contents(&self, string: &str) { ... }
}
Expand description

Trait containing all EditableText methods.

§Implementors

EditableText, NoOpObject

Provided Methods§

Source

fn copy_text(&self, start_pos: i32, end_pos: i32)

Copy text from start_pos up to, but not including end_pos to the clipboard.

§start_pos

start position

§end_pos

end position

Source

fn cut_text(&self, start_pos: i32, end_pos: i32)

Copy text from start_pos up to, but not including end_pos to the clipboard and then delete from the widget.

§start_pos

start position

§end_pos

end position

Source

fn delete_text(&self, start_pos: i32, end_pos: i32)

Delete text start_pos up to, but not including end_pos.

§start_pos

start position

§end_pos

end position

Source

fn paste_text(&self, position: i32)

Paste text from clipboard to specified position.

§position

position to paste

Source

fn set_text_contents(&self, string: &str)

Set text contents of self.

§string

string to set for text contents of self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§