pub trait EditorStateExt: 'static {
    fn typing_attributes(&self) -> u32;
    fn is_copy_available(&self) -> bool;
    fn is_cut_available(&self) -> bool;
    fn is_paste_available(&self) -> bool;
    fn is_redo_available(&self) -> bool;
    fn is_undo_available(&self) -> bool;
    fn connect_typing_attributes_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }
Available on crate feature v2_10 only.
Expand description

Trait containing all EditorState methods.

Implementors

EditorState

Required Methods

Gets the typing attributes at the current cursor position.

If there is a selection, this returns the typing attributes of the selected text. Note that in case of a selection, typing attributes are considered active only when they are present throughout the selection.

Returns

a bitmask of EditorTypingAttributes flags

Available on crate feature v2_20 only.

Gets whether a copy command can be issued.

Returns

true if copy is currently available

Available on crate feature v2_20 only.

Gets whether a cut command can be issued.

Returns

true if cut is currently available

Available on crate feature v2_20 only.

Gets whether a paste command can be issued.

Returns

true if paste is currently available

Available on crate feature v2_20 only.

Gets whether a redo command can be issued.

Returns

true if redo is currently available

Available on crate feature v2_20 only.

Gets whether an undo command can be issued.

Returns

true if undo is currently available

Implementors