Skip to main content

MenuActions

Struct MenuActions 

Source
pub struct MenuActions {
Show 22 fields pub has_selection: bool, pub current_block: BlockType, pub set_paragraph: Box<dyn FnMut()>, pub set_heading1: Box<dyn FnMut()>, pub set_heading2: Box<dyn FnMut()>, pub set_heading3: Box<dyn FnMut()>, pub toggle_quote: Box<dyn FnMut()>, pub toggle_code_block: Box<dyn FnMut()>, pub toggle_list: Box<dyn FnMut()>, pub toggle_checklist: Box<dyn FnMut()>, pub toggle_ordered_list: Box<dyn FnMut()>, pub toggle_bold: Box<dyn FnMut()>, pub toggle_italic: Box<dyn FnMut()>, pub toggle_code: Box<dyn FnMut()>, pub toggle_strike: Box<dyn FnMut()>, pub toggle_underline: Box<dyn FnMut()>, pub toggle_highlight: Box<dyn FnMut()>, pub clear_formatting: Box<dyn FnMut()>, pub cut: Box<dyn FnMut()>, pub copy: Box<dyn FnMut()>, pub paste: Box<dyn FnMut()>, pub edit_link: Box<dyn FnMut()>,
}
Expand description

Actions to be wired to context menu entries.

Fields§

§has_selection: bool§current_block: BlockType

Current block type at cursor, for radio selection state

§set_paragraph: Box<dyn FnMut()>§set_heading1: Box<dyn FnMut()>§set_heading2: Box<dyn FnMut()>§set_heading3: Box<dyn FnMut()>§toggle_quote: Box<dyn FnMut()>§toggle_code_block: Box<dyn FnMut()>§toggle_list: Box<dyn FnMut()>§toggle_checklist: Box<dyn FnMut()>§toggle_ordered_list: Box<dyn FnMut()>§toggle_bold: Box<dyn FnMut()>§toggle_italic: Box<dyn FnMut()>§toggle_code: Box<dyn FnMut()>§toggle_strike: Box<dyn FnMut()>§toggle_underline: Box<dyn FnMut()>§toggle_highlight: Box<dyn FnMut()>§clear_formatting: Box<dyn FnMut()>§cut: Box<dyn FnMut()>§copy: Box<dyn FnMut()>§paste: Box<dyn FnMut()>§edit_link: Box<dyn FnMut()>

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.

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.

Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.