GG-UI » Building UI module

The UI builder a widget function is handed, its elements and widgets, value editors, and reflected fields.

Files

file UI.h
UI: the builder a widget function is handed.
file UIHints.h
Field hints: per-field tweaks to how an editor behaves.
file UIReflect.h
Reflection of props structs: which of their fields an asset can set.
file UIValues.h
Value widgets: widgets that show a value and let the user change it.
file UIValueService.h
Value service: typed arithmetic for value widgets (toggle, slider, number).
file UIWidget.h
Widgets: node kinds with their own state and behaviour.
file UIWidgetRegistry.h
The widget registry: every element type a widget asset can be made of, the built-in ones and the code widgets a game adds, with the properties each takes.
file UIWidgetTraits.h
How each type a property can have is read from a widget file and written to one, and the registration of widget types (UIWidgetRegistry.h). Included where widgets are registered.

Namespaces

namespace GGUI

Defines

#define GG_REGISTER_FIELDS(PropsType, ...)
List a props struct's fields that are properties, inside the struct, after them: GG_REGISTER_FIELDS(BoxProps, Width, Gap, bWrap). Up to 24.
#define GG_REGISTER_WIDGET(Name, PropsType, BuildFn)
Register a code widget, once, in a .cpp: its name as files write it, its props struct (with GG_REGISTER_FIELDS), and void Build(UI&, const Props&).

Define documentation

#define GG_REGISTER_FIELDS(PropsType, ...)

List a props struct's fields that are properties, inside the struct, after them: GG_REGISTER_FIELDS(BoxProps, Width, Gap, bWrap). Up to 24.

#define GG_REGISTER_WIDGET(Name, PropsType, BuildFn)

Register a code widget, once, in a .cpp: its name as files write it, its props struct (with GG_REGISTER_FIELDS), and void Build(UI&, const Props&).