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§
Provided Methods§
sourcefn text_format_body(&self) -> TextFormat
fn text_format_body(&self) -> TextFormat
Text format used for regular body.
sourcefn text_format_key(&self) -> TextFormat
fn text_format_key(&self) -> TextFormat
Text format used for labels referring to keys and buttons.
fn rerun_logo_uri(&self) -> &'static str
sourcefn hover_stroke(&self) -> Stroke
fn hover_stroke(&self) -> Stroke
Hovered UI and spatial primitives should have this outline.
sourcefn selection_stroke(&self) -> Stroke
fn selection_stroke(&self) -> Stroke
Selected UI and spatial primitives should have this outline.
sourcefn success_text(&self, text: impl Into<String>) -> RichText
fn success_text(&self, text: impl Into<String>) -> RichText
Text colored to indicate success.
sourcefn warning_text(&self, text: impl Into<String>) -> RichText
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.
sourcefn error_text(&self, text: impl Into<String>) -> RichText
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.
fn top_bar_style(&self, style_like_web: bool) -> TopBarStyle
sourcefn paint_watermark(&self)
fn paint_watermark(&self)
Paint a watermark
Object Safety§
This trait is not object safe.