GGUI/Public/UIDocument.h file

A document inside another (ui.Document): laid out on a screen of its own, drawn scaled to fit its box in the parent, where it sits in the parent's draw order.

GGDocument Preview;   // kept by whoever shows it

ui.Document(Preview, { .Width = 2532, .Height = 1170, .Dpi = 3.0f, .Widgets = &previews },
    [asset](UI& ui) { ui.Use(asset); });

Its content is built, bound, laid out, and published with the parent's own, from the parent's styles, images, and text measurement. What it builds from (widget assets, strings) can be its own. The parent reads back what it built through the handle: what is under a point, and where a node of it is drawn.

Namespaces

namespace GGUI

Classes

struct GGUI::DocumentProps
ui.Document props: the screen the document inside is laid out on.
class GGUI::GGDocument
The document inside a ui.Document, kept by whoever shows it. Used on the parent's UI update thread only. Not shown, it keeps what it built; destroyed, it leaves the parent.