pub struct Style(/* private fields */);
Expand description
A wrapper for the ImGuiStyle
type.
It can be deref-ed directly into a ImGuiStyle
reference.
Implementations§
Source§impl Style
impl Style
Sourcepub fn get(&self) -> &ImGuiStyle
pub fn get(&self) -> &ImGuiStyle
Gets a reference to the native wrapper struct.
Source§impl Style
impl Style
Sourcepub fn cast(r: &ImGuiStyle) -> &Style
pub fn cast(r: &ImGuiStyle) -> &Style
Converts a native reference into a wrapper reference.
Sourcepub fn cast_mut(r: &mut ImGuiStyle) -> &mut Style
pub fn cast_mut(r: &mut ImGuiStyle) -> &mut Style
Converts a native reference into a wrapper reference.
It is safe because if you have a reference to the native reference, you already can change anything.
Source§impl Style
impl Style
pub fn set_colors_light(&mut self)
pub fn set_colors_dark(&mut self)
pub fn set_colors_classic(&mut self)
pub fn color(&self, id: ColorId) -> Color
pub fn set_color(&mut self, id: ColorId, color: Color)
pub fn color_alpha(&self, id: ColorId, alpha_mul: f32) -> Color
pub fn font_size_base(&self) -> f32
pub fn font_scale_main(&self) -> f32
pub fn font_scale_dpi(&self) -> f32
pub fn scale_all_sizes(&mut self, scale_factor: f32)
Methods from Deref<Target = ImGuiStyle>§
pub unsafe fn ScaleAllSizes(&mut self, scale_factor: f32)
Trait Implementations§
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