Trait re_viewer::external::re_ui::ContextExt

source ·
pub trait ContextExt {
    // Required method
    fn ctx(&self) -> &Context;

    // Provided methods
    fn text_format_body(&self) -> TextFormat { ... }
    fn text_format_key(&self) -> TextFormat { ... }
    fn rerun_logo_uri(&self) -> &'static str { ... }
    fn hover_stroke(&self) -> Stroke { ... }
    fn selection_stroke(&self) -> Stroke { ... }
    fn success_text(&self, text: impl Into<String>) -> RichText { ... }
    fn warning_text(&self, text: impl Into<String>) -> RichText { ... }
    fn error_text(&self, text: impl Into<String>) -> RichText { ... }
    fn top_bar_style(&self, style_like_web: bool) -> TopBarStyle { ... }
    fn paint_watermark(&self) { ... }
}
Expand description

Extension trait for [egui::Context].

This trait provides Rerun-specific helpers and utilities that require access to the egui context.

Required Methods§

source

fn ctx(&self) -> &Context

Provided Methods§

source

fn text_format_body(&self) -> TextFormat

Text format used for regular body.

source

fn text_format_key(&self) -> TextFormat

Text format used for labels referring to keys and buttons.

source

fn rerun_logo_uri(&self) -> &'static str

source

fn hover_stroke(&self) -> Stroke

Hovered UI and spatial primitives should have this outline.

source

fn selection_stroke(&self) -> Stroke

Selected UI and spatial primitives should have this outline.

source

fn success_text(&self, text: impl Into<String>) -> RichText

Text colored to indicate success.

source

fn warning_text(&self, text: impl Into<String>) -> RichText

Text colored to indicate a warning.

For most cases, you should use crate::UiExt::warning_label instead, which has a nice fat border around it.

source

fn error_text(&self, text: impl Into<String>) -> RichText

Text colored to indicate an error.

For most cases, you should use crate::UiExt::error_label instead, which has a nice fat border around it.

source

fn top_bar_style(&self, style_like_web: bool) -> TopBarStyle

source

fn paint_watermark(&self)

Paint a watermark

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl ContextExt for Context

source§

fn ctx(&self) -> &Context

Implementors§