TnxWidgets namespace

Classes

struct ContextSource
Gives a widget's constructor the contexts it takes, by type, when a tool makes one (ClassType::Make).
struct ClassType
A registered widget class: what assets see of it, and how its instances are used.
struct Deleter
Owns a widget, destroying it as its class does.

Typedefs

using Owned = std::unique_ptr<TnxWidgetBase, Deleter>
A widget owned on its own, destroyed as its class does.

Functions

void Changed()
A widget's text or colour input changed: the documents showing widget classes build again. TnxInput calls it.
void RegisterClass(ClassType type)
Make a widget class known. TNX_REGISTER_WIDGET calls it; a name registered twice keeps the first.
auto FindClass(std::string_view name) -> const ClassType*
The class registered by that name; null if there is none.
auto Classes() -> const std::vector<ClassType>&
Every registered class, in the order registered.
auto ClassResolver() -> GGUI::GGClassResolver
The registered classes for a widget library (GGWidgetLibrary::SetClassResolver).
auto ChangedRevision() -> const GGUI::GGRevision&
Bumped by Changed: documents showing widget classes watch it.
auto RunCall(TnxWidgetBase& widget, const GGUI::GGWidgetAction& action, std::string& why) -> bool
Run action's call on the widget member of widget it names (GGWidgetAction::MemberPath), or on widget itself.
auto RecordOf(GGUI::BindTarget target, std::string_view type, void* out, size_t size) -> bool
Copy a record's values into out (size bytes), from the target of the view model of type type that holds it. False if it is gone or of another type.