pub struct ReUi {
pub egui_ctx: Context,
pub design_tokens: DesignTokens,
}Fields§
§egui_ctx: Context§design_tokens: DesignTokensColors, styles etc loaded from a design_tokens.json
Implementations§
source§impl ReUi
impl ReUi
sourcepub fn load_and_apply(egui_ctx: &Context) -> Self
pub fn load_and_apply(egui_ctx: &Context) -> Self
Create ReUi and apply style to the given egui context.
sourcepub fn welcome_screen_h1() -> TextStyle
pub fn welcome_screen_h1() -> TextStyle
Welcome screen big title
pub fn welcome_screen_h2() -> TextStyle
pub fn welcome_screen_h3() -> TextStyle
pub fn welcome_screen_body() -> TextStyle
pub fn welcome_screen_tab_bar_style(ui: &mut Ui)
sourcepub fn view_padding() -> f32
pub fn view_padding() -> f32
Margin on all sides of views.
pub fn panel_margin() -> Margin
pub fn window_rounding() -> f32
pub fn normal_rounding() -> f32
pub fn small_rounding() -> f32
pub fn table_line_height() -> f32
pub fn table_header_height() -> f32
pub fn top_bar_margin() -> Margin
pub fn text_to_icon_padding() -> f32
sourcepub fn top_bar_height() -> f32
pub fn top_bar_height() -> f32
Height of the top-most bar.
sourcepub fn title_bar_height() -> f32
pub fn title_bar_height() -> f32
Height of the title row in the blueprint view and selection view, as well as the tab bar height in the viewport view.
pub fn list_item_height() -> f32
pub fn native_window_rounding() -> f32
pub fn top_panel_frame(&self) -> Frame
pub fn bottom_panel_margin(&self) -> Vec2
sourcepub fn bottom_panel_frame(&self) -> Frame
pub fn bottom_panel_frame(&self) -> Frame
For the streams view (time panel)
pub fn small_icon_size() -> Vec2
pub fn setup_table_header(_header: &mut TableRow<'_, '_>)
pub fn setup_table_body(body: &mut TableBody<'_>)
pub fn warning_text(&self, text: impl Into<String>) -> RichText
pub fn error_text(&self, text: impl Into<String>) -> RichText
sourcepub fn loop_selection_color() -> Color32
pub fn loop_selection_color() -> Color32
The color we use to mean “loop this selection”
sourcepub fn loop_everything_color() -> Color32
pub fn loop_everything_color() -> Color32
The color we use to mean “loop all the data”
sourcepub fn paint_watermark(&self)
pub fn paint_watermark(&self)
Paint a watermark
pub fn top_bar_style( &self, native_pixels_per_point: Option<f32>, fullscreen: bool, style_like_web: bool ) -> TopBarStyle
pub fn checkbox( &self, ui: &mut Ui, selected: &mut bool, text: impl Into<WidgetText> ) -> Response
pub fn radio_value<Value: PartialEq>( &self, ui: &mut Ui, current_value: &mut Value, alternative: Value, text: impl Into<WidgetText> ) -> Response
pub fn panel_content<R>( &self, ui: &mut Ui, add_contents: impl FnOnce(&ReUi, &mut Ui) -> R ) -> R
sourcepub fn panel_title_bar(
&self,
ui: &mut Ui,
label: &str,
hover_text: Option<&str>
)
pub fn panel_title_bar( &self, ui: &mut Ui, label: &str, hover_text: Option<&str> )
Static title bar used to separate panels into section.
This title bar is meant to be used in a panel with proper inner margin and clip rectangle set.
Use ReUi::panel_title_bar_with_buttons to display buttons in the title bar.
Static title bar used to separate panels into section with custom buttons when hovered.
This title bar is meant to be used in a panel with proper inner margin and clip rectangle set.
sourcepub fn large_collapsing_header<R>(
&self,
ui: &mut Ui,
label: &str,
default_open: bool,
add_body: impl FnOnce(&mut Ui) -> R
)
pub fn large_collapsing_header<R>( &self, ui: &mut Ui, label: &str, default_open: bool, add_body: impl FnOnce(&mut Ui) -> R )
Show a prominent collapsing header to be used as section delimitation in side panels.
Note that a clip rect must be set (typically by the panel) to avoid any overdraw.
sourcepub fn collapsing_triangle_size() -> Vec2
pub fn collapsing_triangle_size() -> Vec2
Size for the collapsing triangle icon.
See ReUi::paint_collapsing_triangle for actually drawing the triangle.
sourcepub fn paint_collapsing_triangle(
ui: &mut Ui,
openness: f32,
rect: Rect,
response: &Response
)
pub fn paint_collapsing_triangle( ui: &mut Ui, openness: f32, rect: Rect, response: &Response )
Paint a collapsing triangle with rounded corners.
Alternative to egui::collapsing_header::paint_default_icon.
sourcepub fn grid_left_hand_label(&self, ui: &mut Ui, label: &str) -> Response
pub fn grid_left_hand_label(&self, ui: &mut Ui, label: &str) -> Response
Workaround for putting a label into a grid at the top left of its row.
sourcepub fn selection_grid(&self, _ui: &mut Ui, id: &str) -> Grid
pub fn selection_grid(&self, _ui: &mut Ui, id: &str) -> Grid
Two-column grid to be used in selection view.
Use this when you expect the right column to have multi-line entries.
sourcepub fn draw_shadow_line(&self, ui: &mut Ui, rect: Rect, direction: Direction)
pub fn draw_shadow_line(&self, ui: &mut Ui, rect: Rect, direction: Direction)
Draws a shadow into the given rect with the shadow direction given from dark to light
sourcepub fn list_item(&self, text: impl Into<WidgetText>) -> ListItem<'_>
pub fn list_item(&self, text: impl Into<WidgetText>) -> ListItem<'_>
Convenience function to create a ListItem with the given text.
pub fn selectable_label_with_icon( &self, ui: &mut Ui, icon: &Icon, text: impl Into<WidgetText>, selected: bool ) -> Response
sourcepub fn text_format_body(&self) -> TextFormat
pub fn text_format_body(&self) -> TextFormat
Text format used for regular body.
sourcepub fn text_format_key(&self) -> TextFormat
pub fn text_format_key(&self) -> TextFormat
Text format used for labels referring to keys and buttons.
sourcepub fn paint_time_cursor(
&self,
painter: &Painter,
x: f32,
y: Rangef,
stroke: Stroke
)
pub fn paint_time_cursor( &self, painter: &Painter, x: f32, y: Rangef, stroke: Stroke )
Paints a time cursor for indicating the time on a time axis along x.