Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions parley/src/editing/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -996,6 +996,15 @@ where
self.layout_dirty = true;
}

/// Get the current scale for the layout.
pub fn get_scale(&self) -> f32 {
self.scale
}

pub fn get_font_size(&self) -> f32 {
self.font_size
}

/// Set whether to quantize the layout coordinates.
///
/// Set `quantize` as `true` to have the layout coordinates aligned to pixel boundaries.
Expand Down Expand Up @@ -1026,6 +1035,11 @@ where
&mut self.default_style
}

/// Get the current default styles for this editor.
pub fn get_styles(&self) -> &StyleSet<T> {
&self.default_style
}

/// Whether the editor is currently in IME composing mode.
pub fn is_composing(&self) -> bool {
self.compose.is_some()
Expand Down
Loading