gtk4::prelude

Trait AccessibleTextExt

Source
pub trait AccessibleTextExt: IsA<AccessibleText> + 'static {
    // Provided methods
    fn update_caret_position(&self) { ... }
    fn update_contents(
        &self,
        change: AccessibleTextContentChange,
        start: u32,
        end: u32,
    ) { ... }
    fn update_selection_bound(&self) { ... }
}
Available on crate feature v4_14 only.
Expand description

Trait containing all AccessibleText methods.

§Implementors

AccessibleText, Inscription, Label, TextView, Text

Provided Methods§

Source

fn update_caret_position(&self)

Updates the position of the caret.

Implementations of the AccessibleText interface should call this function every time the caret has moved, in order to notify assistive technologies.

Source

fn update_contents( &self, change: AccessibleTextContentChange, start: u32, end: u32, )

Notifies assistive technologies of a change in contents.

Implementations of the AccessibleText interface should call this function every time their contents change as the result of an operation, like an insertion or a removal.

Note: If the change is a deletion, this function must be called before removing the contents, if it is an insertion, it must be called after inserting the new contents.

§change

the type of change in the contents

§start

the starting offset of the change, in characters

§end

the end offset of the change, in characters

Source

fn update_selection_bound(&self)

Updates the boundary of the selection.

Implementations of the AccessibleText interface should call this function every time the selection has moved, in order to notify assistive technologies.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§