Skip to main content

AppExt

Trait AppExt 

Source
pub trait AppExt {
Show 14 methods // Required methods fn editor_layout(&self) -> Layout; fn editor_text_size(&self) -> TextSize; fn set_editor_layout(&mut self, layout: Layout); fn set_editor_text_size(&mut self, text_size: TextSize); fn set_image_store(&mut self, store: ImageStore); fn image_store(&self) -> ImageStore; fn set_paste_handler(&mut self, handler: PasteHandler); fn set_slash_items(&mut self, items: Vec<SlashItem>); fn set_block_menu_items(&mut self, items: Vec<SlashItem>); fn set_handles(&mut self, handles: Handles); fn set_mention_source(&mut self, trigger: char, source: MentionSource); fn adjust_editor_text_size(&mut self, points: f32); fn reset_editor_text_size(&mut self); fn editor_text_size_adjustment(&self) -> f32;
}
Expand description

Configuration carried by the application. Import as use editor::AppExt as _;.

Required Methods§

Source

fn editor_layout(&self) -> Layout

Reads editor layout.

Source

fn editor_text_size(&self) -> TextSize

Reads editor text size.

Source

fn set_editor_layout(&mut self, layout: Layout)

Configures editor layout.

Source

fn set_editor_text_size(&mut self, text_size: TextSize)

Sets editor zoom steps and limits, not an individual editor’s base size.

Source

fn set_image_store(&mut self, store: ImageStore)

Installs the image store used when pasting pictures.

Source

fn image_store(&self) -> ImageStore

Returns the installed image store, or the default that keeps nothing.

Source

fn set_paste_handler(&mut self, handler: PasteHandler)

Overrides clipboard paste; returning None keeps the default behavior. File drops are not passed to this handler.

Source

fn set_slash_items(&mut self, items: Vec<SlashItem>)

Replaces the slash menu’s items, which are crate::slash_defaults until this is called.

Source

fn set_block_menu_items(&mut self, items: Vec<SlashItem>)

Replaces the block menu’s items, which are crate::block_menu_defaults until this is called.

Source

fn set_handles(&mut self, handles: Handles)

Replaces the glyphs the block and table handles paint, which are crate::Handles::default until this is called.

Source

fn set_mention_source(&mut self, trigger: char, source: MentionSource)

Installs what the menu trigger opens lists, in editors whose crate::Chrome::mention is on. Replaces the source already installed for trigger; sources for other characters stay.

Source

fn adjust_editor_text_size(&mut self, points: f32)

Adjusts every open document by the given points and refreshes windows.

Source

fn reset_editor_text_size(&mut self)

Resets the shared adjustment to zero and refreshes windows.

Source

fn editor_text_size_adjustment(&self) -> f32

Returns the shared adjustment from each document’s base size, in points.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AppExt for App

Implementors§