std1.0.0-beta-7 SafeC docs

std :: gui::gui_widget

Struct std::WidgetStyle

#include <std/gui/gui_widget.h> source

struct WidgetStyle {
    struct GuiColor bg;
    struct GuiColor fg;
    struct GuiColor border;
    int borderWidth;
    int padding;
    int spacing;
    int fontScale;
    const ?&GuiFont font;
    int setMask;
    float fontSize;
    int bold;
}

The original per-widget style. Each field, once set through a setter (set_bg, set_fg, set_border, set_padding, set_spacing, set_font_scale, set_font), overrides the theme for that widget; until then the theme decides. 'font' (a bitmap GuiFont) replaces the TrueType theme font when set; fontScale then multiplies its cells, and otherwise multiplies the theme's font size.

Fields

§struct GuiColor bordersource
§int borderWidthsource
§int paddingsource
§int spacingsource

gap between children, for boxes and grids

§int fontScalesource

1, 2, 3, ...

§const ?&GuiFont fontsource

empty (null) = the theme's TrueType font

§int setMasksource

WIDGET_STYLE_* bits: which fields were set

§float fontSizesource

0 = the theme's

§int boldsource