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<BlockMenuItem>);
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§
Sourcefn editor_layout(&self) -> Layout
fn editor_layout(&self) -> Layout
Reads editor layout.
Sourcefn editor_text_size(&self) -> TextSize
fn editor_text_size(&self) -> TextSize
Reads editor text size.
Sourcefn set_editor_layout(&mut self, layout: Layout)
fn set_editor_layout(&mut self, layout: Layout)
Configures editor layout.
Sourcefn set_editor_text_size(&mut self, text_size: TextSize)
fn set_editor_text_size(&mut self, text_size: TextSize)
Sets editor zoom steps and limits, not an individual editor’s base size.
Sourcefn set_image_store(&mut self, store: ImageStore)
fn set_image_store(&mut self, store: ImageStore)
Installs the image store used when pasting pictures.
Sourcefn image_store(&self) -> ImageStore
fn image_store(&self) -> ImageStore
Returns the installed image store, or the default that keeps nothing.
Sourcefn set_paste_handler(&mut self, handler: PasteHandler)
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.
Sourcefn set_slash_items(&mut self, items: Vec<SlashItem>)
fn set_slash_items(&mut self, items: Vec<SlashItem>)
Replaces the slash menu’s items, which are crate::slash_defaults
until this is called.
Replaces the block menu’s items, which are
crate::block_menu_defaults until this is called.
Sourcefn set_handles(&mut self, handles: Handles)
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.
Sourcefn set_mention_source(&mut self, trigger: char, source: MentionSource)
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.
Sourcefn adjust_editor_text_size(&mut self, points: f32)
fn adjust_editor_text_size(&mut self, points: f32)
Adjusts every open document by the given points and refreshes windows.
Sourcefn reset_editor_text_size(&mut self)
fn reset_editor_text_size(&mut self)
Resets the shared adjustment to zero and refreshes windows.
Sourcefn editor_text_size_adjustment(&self) -> f32
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".