carb::simplegui::Style

Defined in carb/simplegui/SimpleGuiTypes.h

struct Style

Struct with all style variables.

You may modify the simplegui::getStyle() main instance during initialization and before newFrame(). During the frame, use simplegui::pushStyleVar()/popStyleVar() to alter the main style values, and simplegui::pushStyleColor()/popStyleColor() for colors.

Public Functions

inline Style()

Constructor.

Public Members

float alpha

Global alpha applies to everything in simplegui.

Float2 windowPadding

Padding within a window.

float windowRounding

Radius of window corners rounding. Set to 0.0f to have rectangular windows.

float windowBorderSize

Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).

Float2 windowMinSize

Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().

Float2 windowTitleAlign

Alignment for title bar text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.

Direction windowMenuButtonPosition

Side of the collapsing/docking button in the title bar (None/Left/Right). Defaults to ImGuiDir_Left.

float childRounding

Radius of child window corners rounding. Set to 0.0f to have rectangular windows.

float childBorderSize

Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).

float popupRounding

Radius of popup window corners rounding. (Note that tooltip windows use WindowRounding)

float popupBorderSize

Thickness of border around popup/tooltip windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).

Float2 framePadding

Padding within a framed rectangle (used by most widgets).

float frameRounding

Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).

float frameBorderSize

Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).

Float2 itemSpacing

Horizontal and vertical spacing between widgets/lines.

Float2 itemInnerSpacing

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

Float2 cellPadding

Padding within a table cell.

Float2 touchExtraPadding

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!

float indentSpacing

Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2).

float columnsMinSpacing

Minimum horizontal spacing between two columns.

float scrollbarSize

Width of the vertical scrollbar, Height of the horizontal scrollbar.

float scrollbarRounding

Radius of grab corners for scrollbar.

float grabMinSize

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

float grabRounding

Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.

float tabRounding

Radius of upper corners of a tab. Set to 0.0f to have rectangular tabs.

float tabBorderSize

Thickness of border around tabs.

float tabMinWidthForUnselectedCloseButton

Minimum width for close button to appears on an unselected tab when hovered. Set to 0.0f to always show when hovering, set to FLT_MAX to never show close button unless selected.

Direction colorButtonPosition

Side of the color button in the ColorEdit4 widget (left/right). Defaults to ImGuiDir_Right.

Float2 buttonTextAlign

Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered.

Float2 selectableTextAlign

Alignment of selectable text when selectable is larger than text. Defaults to (0.0f, 0.0f) (top-left aligned).

Float2 displayWindowPadding

Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.

Float2 displaySafeAreaPadding

If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows.

float mouseCursorScale

Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.

bool antiAliasedLines

Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.

bool antiAliasedFill

Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)

float curveTessellationTol

Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.

float circleSegmentMaxError

Maximum error (in pixels) allowed when using AddCircle()/AddCircleFilled() or drawing rounded corner rectangles with no explicit segment count specified. Decrease for higher quality but more geometry.

float windowShadowSize

Size (in pixels) of window shadows. Set this to zero to disable shadows.

float windowShadowOffsetDist

Offset distance (in pixels) of window shadows from casting window.

float windowShadowOffsetAngle

Offset angle of window shadows from casting window (0.0f = left, 0.5f*PI = bottom, 1.0f*PI = right, 1.5f*PI = top).

Float4 colors[(size_t)StyleColor::eCount]

Color by style.