Skip to content

ADataBindingDefault#

Defines how View handles properties of FieldType type.

Header:#include <AUI/Util/ADataBinding.h>
CMake:aui_link(my_target PUBLIC aui::views)

Detailed Description#

Example specialization:

template<>
struct ADataBindingDefault<ALabel, AString> {
public:
    static auto property(const _<ALabel>& view) { return view->text(); }
};

Public Methods#

ASignal#


static ADataBindingDefault::ASignal<FieldType>(View::* getGetter())

Returns getter for ADataBinding (deprecated)

property#


static auto ADataBindingDefault::property(const _<View>& view)

Returns property definition for FieldType

Arguments
view
view to return property of

Examples#

examples/ui/contacts/src/view/ContactDetailsView.cpp

AUI Contacts - Usage of AUI_DECLARATIVE_FOR to make a contacts-like application.

    };
}

template <typename T>
_<AView> viewer(AProperty<T>& property) {
    return Label {} & property.readProjected([](const T& v) { return "{}"_format(v); });
}

template <typename T>
_<AView> editor(AProperty<T>& property);

setup#


static void ADataBindingDefault::setup(const _<View>& view)

Called then view linked with field.

Arguments
view
view to link with

void#


static ADataBindingDefault::void(View::* getSetter())

Returns setter for ADataBinding (deprecated)