Nui
Classes | Namespaces | Macros | Functions
attribute_factory.hpp File Reference
#include <nui/frontend/attributes/impl/attribute.hpp>
#include <nui/frontend/dom/childless_element.hpp>
#include <nui/frontend/event_system/observed_value.hpp>
#include <nui/frontend/event_system/event_context.hpp>
#include <nui/frontend/event_system/observed_value_combinator.hpp>
#include <nui/utility/fixed_string.hpp>
#include <nui/frontend/property.hpp>
#include <nui/frontend/val.hpp>
Include dependency graph for attribute_factory.hpp:

Go to the source code of this file.

Classes

class  Nui::Attributes::PropertyFactory
 
class  Nui::Attributes::AttributeFactory
 
class  Nui::Attributes::EventFactory
 
struct  Nui::Attributes::Detail::DeferWrap< T >
 

Namespaces

 Nui
 
 Nui::Attributes
 
 Nui::Attributes::Detail
 
 Nui::Attributes::Literals
 

Macros

#define MAKE_HTML_VALUE_ATTRIBUTE_RENAME(NAME, HTML_NAME)
 
#define MAKE_HTML_VALUE_ATTRIBUTE(NAME)   MAKE_HTML_VALUE_ATTRIBUTE_RENAME(NAME, #NAME)
 
#define MAKE_HTML_EVENT_ATTRIBUTE_RENAME(NAME, HTML_ACTUAL)
 

Functions

template<typename ElementT , typename T >
EventContext::EventIdType Nui::Attributes::Detail::changeEventHandler (std::weak_ptr< ElementT > element, T const &obs, std::function< bool(std::shared_ptr< ElementT > const &)> onLock)
 
template<typename ElementT , typename T >
EventContext::EventIdType Nui::Attributes::Detail::defaultAttributeEvent (std::weak_ptr< ElementT > element, T const &obs, char const *name)
 
template<typename ElementT , typename T >
EventContext::EventIdType Nui::Attributes::Detail::defaultPropertyEvent (std::weak_ptr< ElementT > element, T const &obs, char const *name)
 
constexpr AttributeFactory Nui::Attributes::Literals::operator""_attr (char const *name, std::size_t)
 
constexpr PropertyFactory Nui::Attributes::Literals::operator""_prop (char const *name, std::size_t)
 
constexpr EventFactory Nui::Attributes::Literals::operator""_event (char const *name, std::size_t)
 
template<typename T >
 Nui::Attributes::requires (std::is_same_v< T, AttributeFactory >||std::is_same_v< T, PropertyFactory >||std::is_same_v< T, EventFactory >) Detail
 

Macro Definition Documentation

◆ MAKE_HTML_EVENT_ATTRIBUTE_RENAME

#define MAKE_HTML_EVENT_ATTRIBUTE_RENAME (   NAME,
  HTML_ACTUAL 
)
Value:
namespace Nui::Attributes \
{ \
namespace Names \
{ \
static constexpr auto Attr##NAME = fixToLower(HTML_ACTUAL); \
} \
static constexpr auto NAME = AttributeFactory{Names::Attr##NAME}; \
}
Definition: attribute_factory.hpp:14
constexpr auto fixToLower(FixedString< N > base)
Definition: fixed_string.hpp:88

◆ MAKE_HTML_VALUE_ATTRIBUTE

#define MAKE_HTML_VALUE_ATTRIBUTE (   NAME)    MAKE_HTML_VALUE_ATTRIBUTE_RENAME(NAME, #NAME)

◆ MAKE_HTML_VALUE_ATTRIBUTE_RENAME

#define MAKE_HTML_VALUE_ATTRIBUTE_RENAME (   NAME,
  HTML_NAME 
)
Value:
namespace Nui::Attributes \
{ \
static constexpr auto NAME = AttributeFactory{HTML_NAME}; \
}