Skip to main content

AppExt

Trait AppExt 

Source
pub trait AppExt {
    // 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 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 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§