GGWidgetRegistry class
#include <GGUI/Public/UIWidgetRegistry.h>
Every element type widget assets can use, and the properties each takes.
Public static functions
- static auto Get() -> GGWidgetRegistry&
- The registry, with the built-in elements in it.
Public functions
- void Register(GGWidgetType type)
- Add
type, or replace the one of its name. At start-up (GG_REGISTER_WIDGET), or on the UI update thread. - auto Find(std::string_view name) const -> const GGWidgetType*
- The type of that name; null if there is none. A use of an asset is "Use", a slot "Slot".
- auto All() const -> std::span<const std::unique_ptr<GGWidgetType>>
- Every type, the built-in ones first, in the order they were registered.
- auto Common() const -> std::span<const GGWidgetField>
- The properties every element takes: name, note, visible, opacity, zOrder, tooltip, and its transform (rotation, scale, skew, pivot).
- auto ReadProps(const GGWidgetType& type, const JsonValue& element, std::vector<std::string>& problems) const -> std::shared_ptr<void>
- A code widget's props, made and filled from
element'skeys; problems go toproblemsas "key: what is wrong". Destroyed with the returned holder.