Struct arcdps_imgui::Style

source ·
#[repr(C)]
pub struct Style {
Show 40 fields pub alpha: f32, pub window_padding: [f32; 2], pub window_rounding: f32, pub window_border_size: f32, pub window_min_size: [f32; 2], pub window_title_align: [f32; 2], pub window_menu_button_position: Direction, pub child_rounding: f32, pub child_border_size: f32, pub popup_rounding: f32, pub popup_border_size: f32, pub frame_padding: [f32; 2], pub frame_rounding: f32, pub frame_border_size: f32, pub item_spacing: [f32; 2], pub item_inner_spacing: [f32; 2], pub cell_padding: [f32; 2], pub touch_extra_padding: [f32; 2], pub indent_spacing: f32, pub columns_min_spacing: f32, pub scrollbar_size: f32, pub scrollbar_rounding: f32, pub grab_min_size: f32, pub grab_rounding: f32, pub log_slider_deadzone: f32, pub tab_rounding: f32, pub tab_border_size: f32, pub tab_min_width_for_close_button: f32, pub color_button_position: Direction, pub button_text_align: [f32; 2], pub selectable_text_align: [f32; 2], pub display_window_padding: [f32; 2], pub display_safe_area_padding: [f32; 2], pub mouse_cursor_scale: f32, pub anti_aliased_lines: bool, pub anti_aliased_lines_use_tex: bool, pub anti_aliased_fill: bool, pub curve_tessellation_tol: f32, pub circle_tesselation_max_error: f32, pub colors: [[f32; 4]; 53],
}
Expand description

User interface style/colors

Fields§

§alpha: f32

Global alpha applies to everything

§window_padding: [f32; 2]

Padding within a window

§window_rounding: f32

Rounding radius of window corners.

Set to 0.0 to have rectangular windows. Large values tend to lead to a variety of artifacts and are not recommended.

§window_border_size: f32

Thickness of border around windows.

Generally set to 0.0 or 1.0 (other values are not well tested and cost more CPU/GPU).

§window_min_size: [f32; 2]

Minimum window size

§window_title_align: [f32; 2]

Alignment for title bar text.

Defaults to [0.5, 0.5] for left-aligned, vertically centered.

§window_menu_button_position: Direction

Side of the collapsing/docking button in the title bar (left/right).

Defaults to Direction::Left.

§child_rounding: f32

Rounding radius of child window corners.

Set to 0.0 to have rectangular child windows.

§child_border_size: f32

Thickness of border around child windows.

Generally set to 0.0 or 1.0 (other values are not well tested and cost more CPU/GPU).

§popup_rounding: f32

Rounding radius of popup window corners.

Note that tooltip windows use window_rounding instead.

§popup_border_size: f32

Thickness of border around popup/tooltip windows.

Generally set to 0.0 or 1.0 (other values are not well tested and cost more CPU/GPU).

§frame_padding: [f32; 2]

Padding within a framed rectangle (used by most widgets)

§frame_rounding: f32

Rounding radius of frame corners (used by most widgets).

Set to 0.0 to have rectangular frames.

§frame_border_size: f32

Thickness of border around frames.

Generally set to 0.0 or 1.0 (other values are not well tested and cost more CPU/GPU).

§item_spacing: [f32; 2]

Horizontal and vertical spacing between widgets/lines

§item_inner_spacing: [f32; 2]

Horizontal and vertical spacing between elements of a composed widget (e.g. a slider and its label)

§cell_padding: [f32; 2]

Padding within a table cell.

§touch_extra_padding: [f32; 2]

Expand reactive bounding box for touch-based system where touch position is not accurate enough.

Unfortunately we don’t sort widgets so priority on overlap will always be given to the first widget, so don’t grow this too much.

§indent_spacing: f32

Horizontal indentation when e.g. entering a tree node.

Generally equal to (font size + horizontal frame padding * 2).

§columns_min_spacing: f32

Minimum horizontal spacing between two columns

§scrollbar_size: f32

Width of the vertical scrollbar, height of the horizontal scrollbar

§scrollbar_rounding: f32

Rounding radius of scrollbar grab corners

§grab_min_size: f32

Minimum width/height of a grab box for slider/scrollbar

§grab_rounding: f32

Rounding radius of grab corners.

Set to 0.0 to have rectangular slider grabs.

§log_slider_deadzone: f32

The size in pixels of the dead-zone around zero on logarithmic sliders that cross zero

§tab_rounding: f32

Rounding radius of upper corners of tabs.

Set to 0.0 to have rectangular tabs.

§tab_border_size: f32

Thickness of border around tabs

§tab_min_width_for_close_button: f32

Minimum width for close button to appear on an unselected tab when hovered.

= 0.0: always show when hovering = f32::MAX: never show close button unless selected

§color_button_position: Direction

Side of the color buttonton pubin color editor widgets (left/right).

§button_text_align: [f32; 2]

Alignment of button text when button is larger than text.

Defaults to [0.5, 0.5] (centered).

§selectable_text_align: [f32; 2]

Alignment of selectable text when selectable is larger than text.

Defaults to [0.5, 0.5] (top-left aligned).

§display_window_padding: [f32; 2]

Window positions are clamped to be visible within the display area or monitors by at least this amount.

Only applies to regular windows.

§display_safe_area_padding: [f32; 2]

If you cannot see the edges of your screen (e.g. on a TV), increase the safe area padding.

Also applies to popups/tooltips in addition to regular windows.

§mouse_cursor_scale: f32

Scale software-rendered mouse cursor.

May be removed later.

§anti_aliased_lines: bool

Enable anti-aliased lines/borders.

Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame.

§anti_aliased_lines_use_tex: bool

Enable anti-aliased lines/borders using textures where possible.

Require back-end to render with bilinear filtering. Latched at the beginning of the frame.

§anti_aliased_fill: bool

Enable anti-aliased edges around filled shapes (rounded recatngles, circles, etc.).

Disable if you are really tight on CPU/GPU. Latched at the beginning of the frame.

§curve_tessellation_tol: f32

Tessellation tolerance when using path_bezier_curve_to without a specific number of segments.

Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.

§circle_tesselation_max_error: f32

Maximum error (in pixels) allowed when drawing circles or rounded corner rectangles with no explicit segment count specified.

Decrease for higher quality but more geometry.

§colors: [[f32; 4]; 53]

Style colors.

Implementations§

source§

impl Style

source

pub fn scale_all_sizes(&mut self, scale_factor: f32)

Scales all sizes in the style

source

pub fn use_classic_colors(&mut self) -> &mut Self

Replaces current colors with classic Dear ImGui style

source

pub fn use_dark_colors(&mut self) -> &mut Self

Replaces current colors with a new, recommended style

source

pub fn use_light_colors(&mut self) -> &mut Self

Replaces current colors with a light style. Best used with borders and a custom, thicker font

Trait Implementations§

source§

impl Clone for Style

source§

fn clone(&self) -> Style

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Style

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Index<StyleColor> for Style

source§

type Output = [f32; 4]

The returned type after indexing.
source§

fn index(&self, index: StyleColor) -> &[f32; 4]

Performs the indexing (container[index]) operation. Read more
source§

impl IndexMut<StyleColor> for Style

source§

fn index_mut(&mut self, index: StyleColor) -> &mut [f32; 4]

Performs the mutable indexing (container[index]) operation. Read more
source§

impl RawCast<ImGuiStyle> for Style

source§

unsafe fn from_raw(raw: &T) -> &Self

Casts an immutable reference from the raw type Read more
source§

unsafe fn from_raw_mut(raw: &mut T) -> &mut Self

Casts a mutable reference from the raw type Read more
source§

unsafe fn raw(&self) -> &T

Casts an immutable reference to the raw type Read more
source§

unsafe fn raw_mut(&mut self) -> &mut T

Casts a mutable reference to the raw type Read more
source§

impl Copy 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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

source§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.