TnxViewModels namespace
The registry of view model types, and how bindings read their values.
Classes
Enums
Functions
- void RegisterType(TypeInfo info)
- Make a view model type known. TNX_REGISTER_VIEW_MODEL calls it.
- auto FindType(std::string_view name) -> const TypeInfo*
- The type registered by that name; null if there is none.
- auto Types() -> const std::vector<TypeInfo>&
- Every registered type, in the order registered.
-
auto Reader(const GGUI::
BindingReader& next) -> GGUI:: BindingReader - Reads view model targets; anything else goes to
next. -
auto IsViewModel(GGUI::
BindTarget target) -> bool - True if
targetis a view model's. -
auto CopyValues(GGUI::
BindTarget target, std::string_view type, void* out, size_t size) -> bool - Copy the values of the view model
targetnames intoout, if it is of typetypeandsizebytes. False if it is gone or another type. -
template<typename T, typename TMember>auto FieldIndex(TMember T::* member) -> int
- The field's index among its view model's read fields (TypeInfo::
Fields), or -1 if it isn't one of them.
Enum documentation
enum class TnxViewModels:: FieldKind: uint8_t
#include <Runtime/UI/Public/TnxViewModel.h>
How a field's bytes are read as a number.
Function documentation
void TnxViewModels:: RegisterType(TypeInfo info)
#include <Runtime/UI/Public/TnxViewModel.h>
Make a view model type known. TNX_REGISTER_VIEW_MODEL calls it.
const TypeInfo* TnxViewModels:: FindType(std::string_view name)
#include <Runtime/UI/Public/TnxViewModel.h>
The type registered by that name; null if there is none.
const std::vector<TypeInfo>& TnxViewModels:: Types()
#include <Runtime/UI/Public/TnxViewModel.h>
Every registered type, in the order registered.
GGUI:: BindingReader TnxViewModels:: Reader(const GGUI:: BindingReader& next)
#include <Runtime/UI/Public/TnxViewModel.h>
Reads view model targets; anything else goes to next.
bool TnxViewModels:: IsViewModel(GGUI:: BindTarget target)
#include <Runtime/UI/Public/TnxViewModel.h>
True if target is a view model's.
bool TnxViewModels:: CopyValues(GGUI:: BindTarget target,
std::string_view type,
void* out,
size_t size)
#include <Runtime/UI/Public/TnxViewModel.h>
Copy the values of the view model target names into out, if it is of type type and size bytes. False if it is gone or another type.
#include <Runtime/UI/Public/TnxViewModel.h>
template<typename T, typename TMember>
int TnxViewModels:: FieldIndex(TMember T::* member)
The field's index among its view model's read fields (TypeInfo::