pub struct Style(/* private fields */);Expand description
User interface style/colors
Note: This is a transparent wrapper over sys::ImGuiStyle (v1.92+ layout).
Do not assume field layout here; use accessors or raw()/raw_mut() if needed.
Implementations§
Source§impl Style
impl Style
Sourcepub fn color(&self, color: StyleColor) -> [f32; 4]
pub fn color(&self, color: StyleColor) -> [f32; 4]
Get a color by style color identifier
Sourcepub fn set_color(&mut self, color: StyleColor, value: [f32; 4])
pub fn set_color(&mut self, color: StyleColor, value: [f32; 4])
Set a color by style color identifier
Sourcepub fn font_scale_main(&self) -> f32
pub fn font_scale_main(&self) -> f32
Get main font scale (formerly io.FontGlobalScale)
Sourcepub fn set_font_scale_main(&mut self, scale: f32)
pub fn set_font_scale_main(&mut self, scale: f32)
Set main font scale (formerly io.FontGlobalScale)
Sourcepub fn font_scale_dpi(&self) -> f32
pub fn font_scale_dpi(&self) -> f32
Get DPI font scale (auto-overwritten if ConfigDpiScaleFonts=true)
Sourcepub fn set_font_scale_dpi(&mut self, scale: f32)
pub fn set_font_scale_dpi(&mut self, scale: f32)
Set DPI font scale
Sourcepub fn font_size_base(&self) -> f32
pub fn font_size_base(&self) -> f32
Base size used by style for font sizing
pub fn set_font_size_base(&mut self, sz: f32)
pub fn alpha(&self) -> f32
pub fn set_alpha(&mut self, v: f32)
pub fn disabled_alpha(&self) -> f32
pub fn set_disabled_alpha(&mut self, v: f32)
pub fn window_padding(&self) -> [f32; 2]
pub fn set_window_padding(&mut self, v: [f32; 2])
pub fn window_rounding(&self) -> f32
pub fn set_window_rounding(&mut self, v: f32)
pub fn window_border_size(&self) -> f32
pub fn set_window_border_size(&mut self, v: f32)
pub fn window_min_size(&self) -> [f32; 2]
pub fn set_window_min_size(&mut self, v: [f32; 2])
pub fn window_title_align(&self) -> [f32; 2]
pub fn set_window_title_align(&mut self, v: [f32; 2])
pub fn child_rounding(&self) -> f32
pub fn set_child_rounding(&mut self, v: f32)
pub fn child_border_size(&self) -> f32
pub fn set_child_border_size(&mut self, v: f32)
pub fn popup_rounding(&self) -> f32
pub fn set_popup_rounding(&mut self, v: f32)
pub fn popup_border_size(&self) -> f32
pub fn set_popup_border_size(&mut self, v: f32)
pub fn frame_padding(&self) -> [f32; 2]
pub fn set_frame_padding(&mut self, v: [f32; 2])
pub fn frame_rounding(&self) -> f32
pub fn set_frame_rounding(&mut self, v: f32)
pub fn frame_border_size(&self) -> f32
pub fn set_frame_border_size(&mut self, v: f32)
pub fn item_spacing(&self) -> [f32; 2]
pub fn set_item_spacing(&mut self, v: [f32; 2])
pub fn item_inner_spacing(&self) -> [f32; 2]
pub fn set_item_inner_spacing(&mut self, v: [f32; 2])
pub fn cell_padding(&self) -> [f32; 2]
pub fn set_cell_padding(&mut self, v: [f32; 2])
pub fn touch_extra_padding(&self) -> [f32; 2]
pub fn set_touch_extra_padding(&mut self, v: [f32; 2])
pub fn indent_spacing(&self) -> f32
pub fn set_indent_spacing(&mut self, v: f32)
pub fn columns_min_spacing(&self) -> f32
pub fn set_columns_min_spacing(&mut self, v: f32)
pub fn scrollbar_size(&self) -> f32
pub fn set_scrollbar_size(&mut self, v: f32)
pub fn scrollbar_rounding(&self) -> f32
pub fn set_scrollbar_rounding(&mut self, v: f32)
pub fn grab_min_size(&self) -> f32
pub fn set_grab_min_size(&mut self, v: f32)
pub fn grab_rounding(&self) -> f32
pub fn set_grab_rounding(&mut self, v: f32)
pub fn log_slider_deadzone(&self) -> f32
pub fn set_log_slider_deadzone(&mut self, v: f32)
pub fn tab_rounding(&self) -> f32
pub fn set_tab_rounding(&mut self, v: f32)
pub fn tab_border_size(&self) -> f32
pub fn set_tab_border_size(&mut self, v: f32)
pub fn selectable_text_align(&self) -> [f32; 2]
pub fn set_selectable_text_align(&mut self, v: [f32; 2])
pub fn display_window_padding(&self) -> [f32; 2]
pub fn set_display_window_padding(&mut self, v: [f32; 2])
pub fn display_safe_area_padding(&self) -> [f32; 2]
pub fn set_display_safe_area_padding(&mut self, v: [f32; 2])
pub fn mouse_cursor_scale(&self) -> f32
pub fn set_mouse_cursor_scale(&mut self, v: f32)
pub fn anti_aliased_lines(&self) -> bool
pub fn set_anti_aliased_lines(&mut self, v: bool)
pub fn anti_aliased_lines_use_tex(&self) -> bool
pub fn set_anti_aliased_lines_use_tex(&mut self, v: bool)
pub fn anti_aliased_fill(&self) -> bool
pub fn set_anti_aliased_fill(&mut self, v: bool)
pub fn curve_tessellation_tol(&self) -> f32
pub fn set_curve_tessellation_tol(&mut self, v: f32)
pub fn circle_tessellation_max_error(&self) -> f32
pub fn set_circle_tessellation_max_error(&mut self, v: f32)
pub fn window_border_hover_padding(&self) -> f32
pub fn set_window_border_hover_padding(&mut self, v: f32)
pub fn scrollbar_padding(&self) -> f32
pub fn set_scrollbar_padding(&mut self, v: f32)
pub fn image_border_size(&self) -> f32
pub fn set_image_border_size(&mut self, v: f32)
pub fn tab_min_width_base(&self) -> f32
pub fn set_tab_min_width_base(&mut self, v: f32)
pub fn tab_min_width_shrink(&self) -> f32
pub fn set_tab_min_width_shrink(&mut self, v: f32)
pub fn tab_bar_border_size(&self) -> f32
pub fn set_tab_bar_border_size(&mut self, v: f32)
pub fn tab_bar_overline_size(&self) -> f32
pub fn set_tab_bar_overline_size(&mut self, v: f32)
pub fn table_angled_headers_angle(&self) -> f32
pub fn set_table_angled_headers_angle(&mut self, v: f32)
pub fn table_angled_headers_text_align(&self) -> [f32; 2]
pub fn set_table_angled_headers_text_align(&mut self, v: [f32; 2])
pub fn tree_lines_flags(&self) -> TreeNodeFlags
pub fn set_tree_lines_flags(&mut self, flags: TreeNodeFlags)
pub fn tree_lines_size(&self) -> f32
pub fn set_tree_lines_size(&mut self, v: f32)
pub fn tree_lines_rounding(&self) -> f32
pub fn set_tree_lines_rounding(&mut self, v: f32)
pub fn separator_text_border_size(&self) -> f32
pub fn set_separator_text_border_size(&mut self, v: f32)
pub fn separator_text_align(&self) -> [f32; 2]
pub fn set_separator_text_align(&mut self, v: [f32; 2])
pub fn separator_text_padding(&self) -> [f32; 2]
pub fn set_separator_text_padding(&mut self, v: [f32; 2])
pub fn docking_separator_size(&self) -> f32
pub fn set_docking_separator_size(&mut self, v: f32)
pub fn hover_stationary_delay(&self) -> f32
pub fn set_hover_stationary_delay(&mut self, v: f32)
pub fn hover_delay_short(&self) -> f32
pub fn set_hover_delay_short(&mut self, v: f32)
pub fn hover_delay_normal(&self) -> f32
pub fn set_hover_delay_normal(&mut self, v: f32)
pub fn hover_flags_for_tooltip_mouse(&self) -> HoveredFlags
pub fn set_hover_flags_for_tooltip_mouse(&mut self, flags: HoveredFlags)
Trait Implementations§
Source§impl RawWrapper for Style
impl RawWrapper for Style
impl Copy for Style
impl StructuralPartialEq for Style
Auto Trait Implementations§
impl Freeze for Style
impl RefUnwindSafe for Style
impl Send for Style
impl Sync for Style
impl Unpin for Style
impl UnwindSafe for Style
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more