RichTextBlockImpl
trait · ferroui-controls · v0.5.0
trait RichTextBlockImpl: ControlImpl + $crate::Upcast<RichTextBlock>
The overridable members introduced by the class.
Members
render_textcaret_visibleallow_hyperlink_navigationon_selection_changingrequest_selection_changerebase_selection_on_document_changetext_insetstext_layout_constraintdefault_incremental_tabtext_originselection_is_visibleselection_render_brushraise_selection_changed_eventtext_focus_targettext_background_boundsadditional_visual_children
render_text
fn render_text(this: &Self, context: &mut DrawingContext<'_>)
Paints text content after the background and selection highlights.
caret_visible
fn caret_visible(this: &Self) -> bool
Whether the insertion caret is visible (editable views override this).
allow_hyperlink_navigation
fn allow_hyperlink_navigation(this: &Self, modifiers: KeyModifiers) -> bool
Whether pointer input activates a hyperlink or edits its text.
on_selection_changing
fn on_selection_changing(this: &Self, args: &RichTextSelectionChangedEventArgs) -> bool
Runs synchronously while the proposed selection is visible to readers. Returning false cancels it unless a handler selected a different range.
request_selection_change
fn request_selection_change(this: &Self, start: usize, end: usize) -> bool
Lets an editable view arbitrate a normalized selection through its editor.
rebase_selection_on_document_change
fn rebase_selection_on_document_change(this: &Self) -> bool
Editors publish their final transaction selection after document changes.
text_insets
fn text_insets(this: &Self) -> Thickness
Space outside the document's formatted text, including editor adornments.
text_layout_constraint
fn text_layout_constraint(this: &Self, available_size: Size) -> Size
The formatter constraint, independent of a scrollable view's viewport.
default_incremental_tab
fn default_incremental_tab(this: &Self, font_size: f64) -> f64
Implicit tab interval for a paragraph without an assigned override.
text_origin
fn text_origin(this: &Self) -> Point
Shared origin for text, inline controls, caret, selection and hit testing.
selection_is_visible
fn selection_is_visible(this: &Self) -> bool
Whether the selection is currently drawn in this view (its highlight, and the selection foreground of the selected text).
selection_render_brush
fn selection_render_brush(this: &Self) -> Option<Rc<dyn IBrush>>
The selection background after the host's focus policy is applied.
raise_selection_changed_event
fn raise_selection_changed_event(this: &Self)
Publishes the selection event on the owning control.
text_focus_target
fn text_focus_target(this: &Self) -> Ref<InputElement>
The keyboard focus target for pointer interaction with text.
text_background_bounds
fn text_background_bounds(this: &Self) -> Rect
Bounds painted by the document background; editor headers are outside it.
additional_visual_children
fn additional_visual_children(this: &Self) -> Vec<Ref<Visual>>
Native framework visuals displayed beside the document's inline controls.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.