|
Nui
|
Namespaces | |
| namespace | Attributes |
| namespace | Components |
| namespace | ContainerWrapUtility |
| namespace | Detail |
| namespace | detail |
| namespace | Dom |
| namespace | Elements |
| namespace | FileDialog |
| namespace | Impl |
| namespace | MacOs |
| namespace | Materializers |
| namespace | WebApi |
Concepts | |
| concept | Numerical |
| concept | Fundamental |
| concept | Incrementable |
| concept | Decrementable |
| concept | PlusAssignable |
| concept | MinusAssignable |
| concept | InvocableReturns |
| concept | Range |
| concept | IsObserved |
| concept | IsSharedObserved |
| concept | IsWeakObserved |
| concept | IsObservedLike |
Typedefs | |
| using | Url = Roar::Url |
| using | Console = WebApi::Console |
| template<typename T > | |
| using | UnpackObserved_t = typename UnpackObserved< T >::type |
| using | ElementRenderer = std::function< std::shared_ptr< Dom::Element >(Dom::Element &, Renderer const &)> |
| using | val = emscripten::val |
| template<typename T > | |
| using | ExtractValueType_t = typename ExtractValueType< T >::type |
Enumerations | |
| enum | RangeOperationType { Keep = 0b0001 , Modify = 0b0010 , Insert = 0b0100 , Erase = 0b1000 } |
| enum class | RendererType { Append , Fragment , Insert , Replace , Inplace , Emplace } |
| enum class | ResizeableEdge { Right , Bottom , Top } |
| enum class | WebViewHint : int { WEBVIEW_HINT_NONE , WEBVIEW_HINT_MIN , WEBVIEW_HINT_MAX , WEBVIEW_HINT_FIXED } |
| enum class | HostResourceAccessKind { Deny , Allow , DenyCors } |
| enum class | NuiCoreWebView2WebResourceContext { All , Document , Stylesheet , Image , Media , Font , Script , XmlHttpRequest , Fetch , TextTrack , EventSource , WebSocket , Manifest , SignedExchange , Ping , CspViolationReport , Other } |
Functions | |
| std::filesystem::path | resolvePath (std::filesystem::path const &path) |
| Will replace prefixes like "~" and "%appdata%" with actual directories on linux and windows. | |
| void | getEnvironmentVariables (std::function< void(std::unordered_map< std::string, std::string > &&)> callback) |
| template<typename ValueT > | |
| void | listen (EventContext &eventContext, Observed< ValueT > const &obs, std::function< bool(ValueT const &)> onEvent) |
| template<typename ValueT > requires std::is_scalar_v<ValueT> | |
| void | listen (EventContext &eventContext, Observed< ValueT > const &obs, std::function< bool(ValueT)> onEvent) |
| template<typename ValueT > | |
| void | listen (EventContext &eventContext, Observed< ValueT > const &obs, std::function< void(ValueT const &)> onEvent) |
| template<typename ValueT > requires std::is_scalar_v<ValueT> | |
| void | listen (EventContext &eventContext, Observed< ValueT > const &obs, std::function< void(ValueT)> onEvent) |
| template<typename ValueT , typename FunctionT > requires ( (std::invocable<FunctionT, ValueT const&> || std::invocable<FunctionT, ValueT>) && !Detail::IsStdFunction<FunctionT>::value) | |
| void | listen (EventContext &eventContext, Observed< ValueT > const &obs, FunctionT &&onEvent) |
| template<typename ValueT > | |
| void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT > > const &obs, std::function< bool(ValueT const &)> onEvent) |
| template<typename ValueT > requires std::is_scalar_v<ValueT> | |
| void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT > > const &obs, std::function< bool(ValueT)> onEvent) |
| template<typename ValueT > | |
| void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT > > const &obs, std::function< void(ValueT const &)> onEvent) |
| template<typename ValueT > requires std::is_scalar_v<ValueT> | |
| void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT > > const &obs, std::function< void(ValueT)> onEvent) |
| template<typename ValueT , typename FunctionT > requires ( (std::invocable<FunctionT, ValueT const&> || std::invocable<FunctionT, ValueT>) && !Detail::IsStdFunction<FunctionT>::value) | |
| void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT > > const &obs, FunctionT &&onEvent) |
| template<typename ValueT , typename FunctionT > requires ( (std::invocable<FunctionT, ValueT const&> || std::invocable<FunctionT, ValueT>) && !Detail::IsStdFunction<FunctionT>::value) | |
| void | listen (std::shared_ptr< Observed< ValueT > > const &obs, FunctionT &&onEvent) |
| template<typename ValueT , typename FunctionT > requires ( (std::invocable<FunctionT, ValueT const&> || std::invocable<FunctionT, ValueT>) && !Detail::IsStdFunction<FunctionT>::value) | |
| void | listen (Observed< ValueT > const &obs, FunctionT &&onEvent) |
| template<typename T > requires Incrementable<T> | |
| ModifiableObserved< T > & | operator++ (ModifiableObserved< T > &observedValue) |
| template<typename T > requires Incrementable<T> | |
| T | operator++ (ModifiableObserved< T > &observedValue, int) |
| template<typename T > | |
| auto | operator-- (ModifiableObserved< T > &observedValue) -> ModifiableObserved< Detail::PickFirst_t< T, decltype(--std::declval< T >())> > & |
| template<typename T > | |
| auto | operator-- (ModifiableObserved< T > &observedValue, int) -> Detail::PickFirst_t< T, decltype(std::declval< T >() --)> |
| template<typename... ObservedValues> | |
| ObservedValueCombinator (ObservedValues &&...) -> ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > | |
| template<typename... ObservedValues> | |
| ObservedValueCombinator (std::tuple< Detail::ObservedAddReference_t< ObservedValues >... >) -> ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > | |
| template<typename... ObservedValues> requires (IsObservedLike<ObservedValues> && ...) | |
| ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > | observe (ObservedValues &&... observedValues) |
| template<typename ObservedValue > requires (IsObserved<ObservedValue>) | |
| ObservedRange< ObservedValue > | range (ObservedValue &observedValues) |
| template<typename ObservedValue > requires (IsObserved<ObservedValue>) | |
| ObservedRange< const ObservedValue > | range (ObservedValue const &observedValues) |
| template<typename ContainerT , typename... Observed> | |
| UnoptimizedRange< IteratorAccessor< ContainerT const >, std::decay_t< Detail::ObservedAddReference_t< Observed > >... > | range (ContainerT const &container, Observed &&... observed) |
| template<typename ContainerT , typename... Observed> | |
| UnoptimizedRange< IteratorAccessor< ContainerT >, std::decay_t< Detail::ObservedAddReference_t< Observed > >... > | range (ContainerT &container, Observed &&... observed) |
| template<typename ContainerT > | |
| UnoptimizedRange< IteratorAccessor< ContainerT > > | range (ContainerT &container) |
| template<typename ContainerT > | |
| UnoptimizedRange< IteratorAccessor< ContainerT const > > | range (ContainerT const &container) |
| void | throttle (int milliseconds, std::function< void()> toWrap, std::function< void(ThrottledFunction &&)> callback, bool callWhenReady=false) |
| Creates a function that can be used to call a function at most once during the specified interval. | |
| void | setInterval (int milliseconds, std::function< void()> toWrap, std::function< void(TimerHandle &&)> callback) |
| Creates a new timer that calls "toWrap" every "milliseconds" milliseconds. | |
| void | setTimeout (int milliseconds, std::function< void()> toWrap, std::function< void(TimerHandle)> callback) |
| Creates a new delayed function that calls "toWrap" after "milliseconds" milliseconds. | |
| Attribute && | operator! (Attribute &&attribute) |
| auto | renderElement (Renderer const &gen, auto &element, auto const &htmlElement) |
| static auto | nil () |
| void | makeResizeable (Nui::val const &element, ResizeableEdge edge=ResizeableEdge::Right) |
| void | openFile (char const *filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
| void | openFile (std::string const &filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
| void | openFile (std::filesystem::path const &filename, std::ios_base::openmode mode, std::function< void(std::optional< AsyncFile > &&)> onOpen) |
| template<typename U > requires (IsObserved<std::decay_t<U>>) | |
| Detail::Property< std::decay_t< U > > | property (U &val) |
| template<typename U > requires (IsWeakObserved<std::decay_t<U>>) | |
| Detail::Property< std::decay_t< U > > | property (U &&val) |
| template<typename U > requires (IsSharedObserved<std::decay_t<U>>) | |
| Detail::Property< typename std::decay_t< U >::weak_type > | property (U const &val) |
| template<typename U > requires (std::invocable<U, Nui::val>) | |
| Detail::Property< std::function< void(Nui::val)> > | property (U val) |
| template<typename U > requires (std::invocable<U>) | |
| Detail::Property< std::function< void()> > | property (U val) |
| template<typename U > requires (!IsObservedLike<std::decay_t<U>> && !std::invocable<U> && !std::invocable<U, Nui::val>) | |
| Detail::Property< std::decay_t< U > > | property (U val) |
| template<typename RendererType , typename... ObservedValues> | |
| ObservedValueCombinatorWithPropertyGenerator< RendererType, ObservedValues... > | property (ObservedValueCombinatorWithGenerator< RendererType, ObservedValues... > combinator) |
| template<typename SlotId > | |
| ElementRenderer | delocalizedSlot (SlotId slot, Delocalized< SlotId > &delocalizedElement, std::vector< Attribute > wrapperAttributes={}, ElementRenderer alternative=Elements::div{Attributes::style="display: none"}()) |
| ElementRenderer | delocalizedSlot (char const *slot, Delocalized< std::string > &delocalizedElement, std::vector< Attribute > wrapperAttributes={}, ElementRenderer alternative=Elements::div{Attributes::style="display: none"}()) |
| void | listenToFragmentChanges (Observed< std::string > &fragment) |
| Listens to fragment changes and changes the attached observed. | |
| template<class F , class... Args> | |
| emscripten::val | bind (F &&f, Args &&... args) |
| Equivalent of std::bind returning a javascript functor. | |
| JS_BIND_FUNCTION_TYPES () | |
| ElementRenderer | stabilize (StableElement &stableElement, ElementRenderer const &encapsulatedRenderer) |
| Stabilizes an element, so that it is not re-rendered on every render. | |
| template<typename T , class Bases = boost::describe::describe_bases<T, boost::describe::mod_any_access>, class Members = boost::describe::describe_members<T, boost::describe::mod_any_access>, class Enable = std::enable_if_t<!std::is_union_v<T>>> | |
| Nui::val | convertToVal (T const &obj) |
| Converts a boost described class/struct to a Nui::val object. | |
| template<typename T > | |
| Nui::val | convertToVal (std::optional< T > const &option) |
| Converts an optional<T> to a Nui::val. | |
| template<typename T > requires Fundamental<T> | |
| Nui::val | convertToVal (T const &value) |
| Converts fundamental types to Nui::val. | |
| Nui::val | convertToVal (std::string const &value) |
| Converts string to Nui::val. | |
| Nui::val | convertToVal (std::filesystem::path const &value) |
| Converts a filesystem path to Nui::val. | |
| Nui::val | convertToVal (Nui::val value) |
| Copy for val. | |
| Nui::val | convertToVal (char const *value) |
| Converts a C-style string to Nui::val. | |
| Nui::val | convertToVal (std::string_view value) |
| Converts a string_view to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (std::vector< T > const &vector) |
| Converts a vector to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (Observed< T > const &observed) |
| Converts an Observed<T> to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (std::unordered_map< std::string, T > const &map) |
| Converts an unordered_map to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (std::map< std::string, T > const &map) |
| Converts a map to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (std::unique_ptr< T > const &ptr) |
| Converts a unique pointer to Nui::val. | |
| template<typename T > | |
| Nui::val | convertToVal (std::shared_ptr< T > const &ptr) |
| Converts a shared pointer to Nui::val. | |
| template<typename T > requires Detail::HasToVal<T> | |
| Nui::val | convertToVal (T const &value) |
| Converts anything that a "to_val" function is provided for found by ADL. | |
| Nui::val | convertToVal (long long) |
| Nui::val | convertToVal (unsigned long long) |
| Nui::val | convertToVal (std::monostate) |
| Converts a monostate to Nui::val (interpreted as undefined) | |
| template<typename... Ts> | |
| Nui::val | convertToVal (std::variant< Ts... > const &variant) |
| Converts a variant to Nui::val by converting the currently held type. | |
| template<typename T , class Bases , class Members > requires (!std::is_union_v<T>) | |
| void | convertFromVal (Nui::val const &val, T &obj) |
| Converts a Nui::val to a class/struct object. | |
| template<typename T , class Members > requires (!std::is_union_v<T> && !boost::describe::has_describe_bases<T>::value) | |
| void | convertFromVal (Nui::val const &val, T &obj) |
| Converts a Nui::val to a class/struct object. | |
| template<typename T > requires Fundamental<T> | |
| void | convertFromVal (Nui::val const &val, T &value) |
| Converts a Nui::val to a fundamental type. | |
| void | convertFromVal (Nui::val const &val, std::string &str) |
| Converts a Nui::val to a std::string. | |
| template<typename T > | |
| void | convertFromVal (Nui::val const &val, std::optional< T > &option) |
| Converts a Nui::val to a std::optional. | |
| void | convertFromVal (Nui::val const &val, std::filesystem::path &value) |
| Converts a Nui::val to a std::filesystem::path. | |
| void | convertFromVal (Nui::val const &val, Nui::val &value) |
| Converts a Nui::val to a Nui::val (copy). | |
| template<typename T > | |
| void | convertFromVal (Nui::val const &val, std::vector< T > &vector) |
| Converts a Nui::val to a std::vector. | |
| template<typename T > requires Fundamental<T> | |
| void | convertFromVal (Nui::val const &val, std::vector< T > &vector) |
| Converts a Nui::val to a std::vector of fundamentals. | |
| template<typename T > | |
| void | convertFromVal (Nui::val const &val, Observed< T > &observed) |
| Converts a Nui::val to an Observed<T>. | |
| template<typename T > | |
| void | convertFromVal (Nui::val const &val, std::unordered_map< std::string, T > &map) |
| Converts a Nui::val to a std::unordered_map. | |
| template<typename T > requires Detail::HasFromVal<T> | |
| void | convertFromVal (Nui::val const &val, T &value) |
| Converts a Nui::val to a type that has a "from_val" function provided found by ADL. | |
| void | convertFromVal (Nui::val const &, long long) |
| void | convertFromVal (Nui::val const &val, unsigned long long &value) |
| template<typename T , class Bases = boost::describe::describe_bases<T, boost::describe::mod_any_access>, class Members = boost::describe::describe_members<T, boost::describe::mod_any_access>> requires (!std::is_union_v<T> && boost::describe::has_describe_bases<T>::value) | |
| void | convertFromVal (Nui::val const &val, T &obj) |
| Converts a Nui::val to a class/struct object. | |
| BOOST_DESCRIBE_STRUCT (FetchOptions,(),(method, headers, body, verbose, followRedirects, maxRedirects, autoReferer, dontDecodeBody, verifyPeer, verifyHost)) | |
| BOOST_DESCRIBE_STRUCT (FetchResponse,(),(curlCode, status, proxyStatus, downloadSize, redirectUrl, body, headers)) | |
| void | assertImpl (bool condition, const char *message) |
| template<unsigned N> | |
| FixedString (char const (&)[N]) -> FixedString< N - 1 > | |
| template<unsigned... Length> | |
| constexpr auto | fixConcat (const char(&... strings)[Length]) |
| Allows for compile-time string concatenation. | |
| template<unsigned N> | |
| constexpr auto | fixToLower (FixedString< N > base) |
| template<unsigned N> | |
| constexpr auto | fixToLower (char const (&str)[N]) |
| template<typename ContainerT > | |
| IteratorAccessor (ContainerT const &) -> IteratorAccessor< const ContainerT > | |
| template<typename ContainerT > | |
| IteratorAccessor (ContainerT &) -> IteratorAccessor< ContainerT > | |
| template<typename... Ts> | |
| overloaded (Ts...) -> overloaded< Ts... > | |
| template<typename FuncT , typename... Types> | |
| void | tupleForEach (std::tuple< Types... > &t, FuncT &&func) |
| template<typename FuncT , typename... Types> | |
| void | tupleForEach (std::tuple< Types... > const &t, FuncT &&func) |
| template<typename Utf16StringType , typename Utf8StringType > requires (Detail::IsStringCharTypeUtf16Compatible<Utf16StringType>) && (Detail::IsStringCharTypeUtf8Compatible<Utf8StringType>) | |
| Utf16StringType | utf8ToUtf16 (Utf8StringType const &str) |
| template<typename Utf16StringType , typename Utf8StringType > requires (Detail::IsStringCharTypeUtf16Compatible<Utf16StringType>) && (Detail::IsStringCharTypeUtf8Compatible<Utf8StringType>) | |
| Utf8StringType | utf16ToUtf8 (Utf16StringType const &str) |
| template<typename... VariantTypes, typename... VisitFunctionTypes> | |
| auto | visitOverloaded (std::variant< VariantTypes... > const &variant, VisitFunctionTypes &&... visitFunctions) |
| template<typename... VariantTypes, typename... VisitFunctionTypes> | |
| auto | visitOverloaded (std::variant< VariantTypes... > &&variant, VisitFunctionTypes &&... visitFunctions) |
| Microsoft::WRL::ComPtr< ICoreWebView2EnvironmentOptions > | webView2EnvironmentOptionsFromOptions (WindowOptions const &options) |
| std::unordered_map< std::string, std::string > | getEnvironmentVariables () |
| template<typename T > | |
| void | swap (GObjectReference< T > &lhs, GObjectReference< T > &rhs) |
| template<typename T , typename U > | |
| bool | operator== (GObjectReference< T > const &lhs, GObjectReference< U > const &rhs) |
| template<typename T , typename U > | |
| bool | operator== (GObjectReference< T > const &lhs, T *rhs) |
| template<typename T , typename U > | |
| bool | operator== (T *lhs, GObjectReference< U > const &rhs) |
| template<typename T , typename U > | |
| bool | operator!= (GObjectReference< T > const &lhs, GObjectReference< U > const &rhs) |
| template<typename T , typename U > | |
| bool | operator!= (GObjectReference< T > const &lhs, T *rhs) |
| template<typename T , typename U > | |
| bool | operator!= (T *lhs, GObjectReference< U > const &rhs) |
| template<typename T , typename U > | |
| GObjectReference< T > | static_pointer_cast (GObjectReference< U > const &ptr) |
| template<typename T , typename U > | |
| GObjectReference< T > | dynamic_pointer_cast (GObjectReference< U > const &ptr) |
| void | registerEnvironmentVariables (Nui::RpcHub const &hub) |
| NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (FetchOptions, method, headers, body, verbose, followRedirects, maxRedirects, autoReferer, dontDecodeBody, verifyPeer, verifyHost) | |
| NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE (FetchResponse, curlCode, status, proxyStatus, downloadSize, redirectUrl, body, headers) void registerFetch(Nui | |
| void | registerFetch (Nui::RpcHub const &hub) |
| void | registerFile (Nui::RpcHub &hub) |
| void | registerScreen (Nui::RpcHub const &hub) |
| void | registerThrottle (Nui::RpcHub &hub) |
| void | registerTimer (Nui::RpcHub &hub) |
| CustomSchemeResponse | folderMappingResponseFromRequest (CustomSchemeRequest const &req, HostNameMappingInfo const &hostNameMappingInfo) |
Variables | |
| thread_local EventContext | globalEventContext |
| constexpr CustomEventContextFlag_t | CustomEventContextFlag {} |
| constexpr auto | RegularHtmlElementBridge |
| constexpr auto | SvgElementBridge |
| constexpr auto | TextElementBridge |
| constexpr auto | CommentElementBridge |
| template<typename T > | |
| constexpr bool | IsTuple_v = IsTuple<std::decay_t<T>>::value |
| using Nui::Console = typedef WebApi::Console |
| using Nui::ElementRenderer = typedef std::function<std::shared_ptr<Dom::Element>(Dom::Element&, Renderer const&)> |
| using Nui::ExtractValueType_t = typedef typename ExtractValueType<T>::type |
| using Nui::UnpackObserved_t = typedef typename UnpackObserved<T>::type |
| using Nui::Url = typedef Roar::Url |
| using Nui::val = typedef emscripten::val |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
inline |
| emscripten::val Nui::bind | ( | F && | f, |
| Args &&... | args | ||
| ) |
Equivalent of std::bind returning a javascript functor.
| f | The lambda, function, member function to bind |
| args |
operator() ). | Nui::BOOST_DESCRIBE_STRUCT | ( | FetchOptions | , |
| () | , | ||
| (method, headers, body, verbose, followRedirects, maxRedirects, autoReferer, dontDecodeBody, verifyPeer, verifyHost) | |||
| ) |
| Nui::BOOST_DESCRIBE_STRUCT | ( | FetchResponse | , |
| () | , | ||
| (curlCode, status, proxyStatus, downloadSize, redirectUrl, body, headers) | |||
| ) |
|
inline |
Converts a Nui::val to an Observed<T>.
| T | The type of the observed value. |
| val | The val to convert. |
| observed | The variable to store the converted value. |
|
inline |
Converts a Nui::val to a std::filesystem::path.
| val | The val to convert. |
| value | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| std::optional< T > & | option | ||
| ) |
Converts a Nui::val to a std::optional.
| T | The wrapped type of the optional. |
| val | The val to convert. |
| option | The variable to store the converted value. |
|
inline |
Converts a Nui::val to a std::string.
| val | The val to convert. |
| str | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| std::unordered_map< std::string, T > & | map | ||
| ) |
Converts a Nui::val to a std::unordered_map.
| T | The type of the map values. |
| val | The val to convert. |
| map | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| std::vector< T > & | vector | ||
| ) |
Converts a Nui::val to a std::vector.
| T | The type of the vector elements. |
| val | The val to convert. |
| vector | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| std::vector< T > & | vector | ||
| ) |
Converts a Nui::val to a std::vector of fundamentals.
| T | The type of the vector elements. |
| val | The val to convert. |
| vector | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| T & | obj | ||
| ) |
Converts a Nui::val to a class/struct object.
| T | The type of the object. |
| Bases | The base classes of the object. |
| Members | The members of the object. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| T & | obj | ||
| ) |
Converts a Nui::val to a class/struct object.
| T | The type of the object. |
| Members | The boost describe members of the object. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| T & | obj | ||
| ) |
Converts a Nui::val to a class/struct object.
| T | The type of the object. |
| Bases | The base classes of the object. |
| Members | The members of the object. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| T & | value | ||
| ) |
Converts a Nui::val to a fundamental type.
| T | The fundamental type. |
| val | The val to convert. |
| value | The variable to store the converted value. |
| void Nui::convertFromVal | ( | Nui::val const & | val, |
| T & | value | ||
| ) |
Converts a Nui::val to a type that has a "from_val" function provided found by ADL.
| T | The type of the value. |
| val | The val to convert. |
| value | The variable to store the converted value. |
|
inline |
|
inline |
|
inline |
Copy for val.
Useful if a class itself contains a val.
| value | The val to copy. |
|
inline |
| Nui::val Nui::convertToVal | ( | std::map< std::string, T > const & | map | ) |
|
inline |
| Nui::val Nui::convertToVal | ( | std::optional< T > const & | option | ) |
| Nui::val Nui::convertToVal | ( | std::shared_ptr< T > const & | ptr | ) |
|
inline |
|
inline |
| Nui::val Nui::convertToVal | ( | std::unique_ptr< T > const & | ptr | ) |
| Nui::val Nui::convertToVal | ( | std::unordered_map< std::string, T > const & | map | ) |
| Nui::val Nui::convertToVal | ( | std::variant< Ts... > const & | variant | ) |
| Nui::val Nui::convertToVal | ( | std::vector< T > const & | vector | ) |
| Nui::val Nui::convertToVal | ( | T const & | obj | ) |
Converts a boost described class/struct to a Nui::val object.
| T | The class type |
| Bases | Boost describe bases |
| Members | Boost describe members |
| Enable | Used to disable unions for this function |
| obj | The object to convert |
| Nui::val Nui::convertToVal | ( | T const & | value | ) |
| Nui::val Nui::convertToVal | ( | T const & | value | ) |
Converts anything that a "to_val" function is provided for found by ADL.
| T | The type of the object. |
| obj | The object to convert. |
|
inline |
|
inline |
| ElementRenderer Nui::delocalizedSlot | ( | SlotId | slot, |
| Delocalized< SlotId > & | delocalizedElement, | ||
| std::vector< Attribute > | wrapperAttributes = {}, |
||
| ElementRenderer | alternative = Elements::div{Attributes::style = "display: none"}() |
||
| ) |
| GObjectReference< T > Nui::dynamic_pointer_cast | ( | GObjectReference< U > const & | ptr | ) |
|
constexpr |
Allows for compile-time string concatenation.
Use very sparingly.
| Nui::FixedString | ( | char | const(&)[N] | ) | -> FixedString< N - 1 > |
|
constexpr |
|
constexpr |
| CustomSchemeResponse Nui::folderMappingResponseFromRequest | ( | CustomSchemeRequest const & | req, |
| HostNameMappingInfo const & | hostNameMappingInfo | ||
| ) |
| std::unordered_map< std::string, std::string > Nui::getEnvironmentVariables | ( | ) |
| void Nui::getEnvironmentVariables | ( | std::function< void(std::unordered_map< std::string, std::string > &&)> | callback | ) |
| Nui::IteratorAccessor | ( | ContainerT & | ) | -> IteratorAccessor< ContainerT > |
| Nui::IteratorAccessor | ( | ContainerT const & | ) | -> IteratorAccessor< const ContainerT > |
| Nui::JS_BIND_FUNCTION_TYPES | ( | ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| Observed< ValueT > const & | obs, | ||
| FunctionT && | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| Observed< ValueT > const & | obs, | ||
| std::function< bool(ValueT const &)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| Observed< ValueT > const & | obs, | ||
| std::function< bool(ValueT)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| Observed< ValueT > const & | obs, | ||
| std::function< void(ValueT const &)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| Observed< ValueT > const & | obs, | ||
| std::function< void(ValueT)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| std::shared_ptr< Observed< ValueT > > const & | obs, | ||
| FunctionT && | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| std::shared_ptr< Observed< ValueT > > const & | obs, | ||
| std::function< bool(ValueT const &)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| std::shared_ptr< Observed< ValueT > > const & | obs, | ||
| std::function< bool(ValueT)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| std::shared_ptr< Observed< ValueT > > const & | obs, | ||
| std::function< void(ValueT const &)> | onEvent | ||
| ) |
| void Nui::listen | ( | EventContext & | eventContext, |
| std::shared_ptr< Observed< ValueT > > const & | obs, | ||
| std::function< void(ValueT)> | onEvent | ||
| ) |
| void Nui::listen | ( | Observed< ValueT > const & | obs, |
| FunctionT && | onEvent | ||
| ) |
| void Nui::listen | ( | std::shared_ptr< Observed< ValueT > > const & | obs, |
| FunctionT && | onEvent | ||
| ) |
| void Nui::listenToFragmentChanges | ( | Observed< std::string > & | fragment | ) |
Listens to fragment changes and changes the attached observed.
| void Nui::makeResizeable | ( | Nui::val const & | element, |
| ResizeableEdge | edge = ResizeableEdge::Right |
||
| ) |
|
static |
| Nui::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE | ( | FetchOptions | , |
| method | , | ||
| headers | , | ||
| body | , | ||
| verbose | , | ||
| followRedirects | , | ||
| maxRedirects | , | ||
| autoReferer | , | ||
| dontDecodeBody | , | ||
| verifyPeer | , | ||
| verifyHost | |||
| ) |
| Nui::NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE | ( | FetchResponse | , |
| curlCode | , | ||
| status | , | ||
| proxyStatus | , | ||
| downloadSize | , | ||
| redirectUrl | , | ||
| body | , | ||
| headers | |||
| ) |
| ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > Nui::observe | ( | ObservedValues &&... | observedValues | ) |
| Nui::ObservedValueCombinator | ( | ObservedValues && | ... | ) | -> ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > |
| Nui::ObservedValueCombinator | ( | std::tuple< Detail::ObservedAddReference_t< ObservedValues >... > | ) | -> ObservedValueCombinator< std::decay_t< Detail::ObservedAddReference_t< ObservedValues > >... > |
| void Nui::openFile | ( | char const * | filename, |
| std::ios_base::openmode | mode, | ||
| std::function< void(std::optional< AsyncFile > &&)> | onOpen | ||
| ) |
| void Nui::openFile | ( | std::filesystem::path const & | filename, |
| std::ios_base::openmode | mode, | ||
| std::function< void(std::optional< AsyncFile > &&)> | onOpen | ||
| ) |
| void Nui::openFile | ( | std::string const & | filename, |
| std::ios_base::openmode | mode, | ||
| std::function< void(std::optional< AsyncFile > &&)> | onOpen | ||
| ) |
| bool Nui::operator!= | ( | GObjectReference< T > const & | lhs, |
| GObjectReference< U > const & | rhs | ||
| ) |
| bool Nui::operator!= | ( | GObjectReference< T > const & | lhs, |
| T * | rhs | ||
| ) |
| bool Nui::operator!= | ( | T * | lhs, |
| GObjectReference< U > const & | rhs | ||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
| bool Nui::operator== | ( | GObjectReference< T > const & | lhs, |
| GObjectReference< U > const & | rhs | ||
| ) |
| bool Nui::operator== | ( | GObjectReference< T > const & | lhs, |
| T * | rhs | ||
| ) |
| bool Nui::operator== | ( | T * | lhs, |
| GObjectReference< U > const & | rhs | ||
| ) |
| Nui::overloaded | ( | Ts... | ) | -> overloaded< Ts... > |
| ObservedValueCombinatorWithPropertyGenerator< RendererType, ObservedValues... > Nui::property | ( | ObservedValueCombinatorWithGenerator< RendererType, ObservedValues... > | combinator | ) |
| Detail::Property< std::decay_t< U > > Nui::property | ( | U && | val | ) |
| Detail::Property< std::decay_t< U > > Nui::property | ( | U & | val | ) |
| Detail::Property< typename std::decay_t< U >::weak_type > Nui::property | ( | U const & | val | ) |
| Detail::Property< std::function< void(Nui::val)> > Nui::property | ( | U | val | ) |
| Detail::Property< std::function< void()> > Nui::property | ( | U | val | ) |
| Detail::Property< std::decay_t< U > > Nui::property | ( | U | val | ) |
| UnoptimizedRange< IteratorAccessor< ContainerT > > Nui::range | ( | ContainerT & | container | ) |
| UnoptimizedRange< IteratorAccessor< ContainerT >, std::decay_t< Detail::ObservedAddReference_t< Observed > >... > Nui::range | ( | ContainerT & | container, |
| Observed &&... | observed | ||
| ) |
| UnoptimizedRange< IteratorAccessor< ContainerT const > > Nui::range | ( | ContainerT const & | container | ) |
| UnoptimizedRange< IteratorAccessor< ContainerT const >, std::decay_t< Detail::ObservedAddReference_t< Observed > >... > Nui::range | ( | ContainerT const & | container, |
| Observed &&... | observed | ||
| ) |
| ObservedRange< ObservedValue > Nui::range | ( | ObservedValue & | observedValues | ) |
| ObservedRange< const ObservedValue > Nui::range | ( | ObservedValue const & | observedValues | ) |
| void Nui::registerEnvironmentVariables | ( | Nui::RpcHub const & | hub | ) |
| void Nui::registerFetch | ( | Nui::RpcHub const & | hub | ) |
| void Nui::registerFile | ( | Nui::RpcHub & | hub | ) |
| void Nui::registerScreen | ( | Nui::RpcHub const & | hub | ) |
| void Nui::registerThrottle | ( | Nui::RpcHub & | hub | ) |
| void Nui::registerTimer | ( | Nui::RpcHub & | hub | ) |
| auto Nui::renderElement | ( | Renderer const & | gen, |
| auto & | element, | ||
| auto const & | htmlElement | ||
| ) |
| std::filesystem::path Nui::resolvePath | ( | std::filesystem::path const & | path | ) |
Will replace prefixes like "~" and "%appdata%" with actual directories on linux and windows.
The percent values are case insensitive. ~ Linux: home. Windows: home userprofile% Linux: home. Windows: home appdata% Linux: home. Windows: CSIDL_APPDATA localappdata% Linux: home. Windows: CSIDL_APPDATA_LOCAL temp% Linux: /tmp. Windows: ${USER}\AppData\Local\Temp config_home% Linux: $XDG_CONFIG_HOME. Windows: CSIDL_APPDATA config_home2% Linux: $XDG_CONFIG_HOME. Windows: CSIDL_MYDOCUMENTS config_home3% Linux: $XDG_CONFIG_HOME. Windows: home state_home% Linux: $XDG_CONFIG_HOME. Windows: CSIDL_APPDATA state_home2% Linux: $XDG_CONFIG_HOME. Windows: CSIDL_MYDOCUMENTS state_home3% Linux: $XDG_CONFIG_HOME. Windows: home data_home% Linux: $XDG_DATA_HOME. Windows: CSIDL_APPDATA data_home2% Linux: $XDG_DATA_HOME. Windows: CSIDL_MYDOCUMENTS data_home3% Linux: $XDG_DATA_HOME. Windows: home
| path |
| void Nui::setInterval | ( | int | milliseconds, |
| std::function< void()> | toWrap, | ||
| std::function< void(TimerHandle &&)> | callback | ||
| ) |
Creates a new timer that calls "toWrap" every "milliseconds" milliseconds.
This function is less accurate than the browser setInterval, because it has to traverse from backend to frontend. This is an alternative if you have trouble with ASYNCIFY and code running from setInterval. You should avoid using this function for small time intervals to avoid performance issues.
| milliseconds | The time between each call of the function. |
| toWrap | The function to call periodically. |
| callback | This callback receives the interval handle. The timer can be stopped using this handle. |
| void Nui::setTimeout | ( | int | milliseconds, |
| std::function< void()> | toWrap, | ||
| std::function< void(TimerHandle)> | callback | ||
| ) |
Creates a new delayed function that calls "toWrap" after "milliseconds" milliseconds.
This function is less accurate than the browser setTimeout, because it has to traverse from backend to frontend. This is an alternative if you have trouble with ASYNCIFY and code running from setTimeout. You should avoid using this function for small timeouts to avoid performance issues.
| milliseconds | The time to wait before calling the function. |
| toWrap | The function to call after the timeout. |
| callback | This callback receives the timeout handle. The timeout can be stopped using this handle. |
| ElementRenderer Nui::stabilize | ( | StableElement & | stableElement, |
| ElementRenderer const & | encapsulatedRenderer | ||
| ) |
Stabilizes an element, so that it is not re-rendered on every render.
| stableElement | A stable element handle held by the caller. Must not be destroyed before the associated ui. |
| encapsulatedRenderer | The renderer that should be rendered once and then stabilized. |
| GObjectReference< T > Nui::static_pointer_cast | ( | GObjectReference< U > const & | ptr | ) |
| void Nui::swap | ( | GObjectReference< T > & | lhs, |
| GObjectReference< T > & | rhs | ||
| ) |
| void Nui::throttle | ( | int | milliseconds, |
| std::function< void()> | toWrap, | ||
| std::function< void(ThrottledFunction &&)> | callback, | ||
| bool | callWhenReady = false |
||
| ) |
Creates a function that can be used to call a function at most once during the specified interval.
You can imagine it as a std::call_once that is reset after the given time. This function is not very accurate, because of the back and forth travel time.
| milliseconds | The minimum time between each call of the function. |
| func | The function to call throttled. |
| callback | This callback receives the throttled function. |
| callWhenReady | call the function when ready if it was not during the wait interval. |
| void Nui::tupleForEach | ( | std::tuple< Types... > & | t, |
| FuncT && | func | ||
| ) |
| void Nui::tupleForEach | ( | std::tuple< Types... > const & | t, |
| FuncT && | func | ||
| ) |
| Utf8StringType Nui::utf16ToUtf8 | ( | Utf16StringType const & | str | ) |
| Utf16StringType Nui::utf8ToUtf16 | ( | Utf8StringType const & | str | ) |
| auto Nui::visitOverloaded | ( | std::variant< VariantTypes... > && | variant, |
| VisitFunctionTypes &&... | visitFunctions | ||
| ) |
| auto Nui::visitOverloaded | ( | std::variant< VariantTypes... > const & | variant, |
| VisitFunctionTypes &&... | visitFunctions | ||
| ) |
| Microsoft::WRL::ComPtr< ICoreWebView2EnvironmentOptions > Nui::webView2EnvironmentOptionsFromOptions | ( | WindowOptions const & | options | ) |
|
constexpr |
|
inlineconstexpr |
| thread_local EventContext Nui::globalEventContext |
|
constexpr |
|
constexpr |
|
constexpr |