Nui
|
Namespaces | |
Attributes | |
Components | |
ContainerWrapUtility | |
Detail | |
detail | |
Dom | |
Elements | |
FileDialog | |
Impl | |
MacOs | |
Materializers | |
Typedefs | |
using | Url = Roar::Url |
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 |
template<typename T > | |
using | FunctionArgumentTypes_t = typename FunctionArgumentTypes< T >::type |
template<typename T > | |
using | FunctionReturnType_t = typename FunctionReturnType< 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. More... | |
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 > | |
void | listen (EventContext &eventContext, Observed< ValueT > const &obs, std::function< void(ValueT const &)> onEvent) |
template<typename ValueT , typename FunctionT > | |
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 > | |
void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT >> const &obs, std::function< void(ValueT const &)> onEvent) |
template<typename ValueT , typename FunctionT > | |
void | listen (EventContext &eventContext, std::shared_ptr< Observed< ValueT >> const &obs, FunctionT onEvent) |
template<typename ValueT , typename FunctionT > | |
void | listen (std::shared_ptr< Observed< ValueT >> const &obs, FunctionT onEvent) |
template<typename ValueT , typename FunctionT > | |
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 | |
template<typename ObservedValue > | |
requires (IsObserved< ObservedValue >) ObservedRange< ObservedValue > range(ObservedValue &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 | fetch (std::string const &uri, FetchOptions const &options, std::function< void(std::optional< FetchResponse > const &)> callback) |
Simplified fetch, that uses curl in the backend to fetch data. More... | |
void | fetch (std::string const &uri, std::function< void(std::optional< FetchResponse > const &)> callback) |
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. More... | |
void | setInterval (int milliseconds, std::function< void()> toWrap, std::function< void(TimerHandle &&)> callback) |
Creates a new timer that calls "toWrap" every "milliseconds" milliseconds. More... | |
void | setTimeout (int milliseconds, std::function< void()> toWrap, std::function< void(TimerHandle)> callback) |
Creates a new delayed function that calls "toWrap" after "milliseconds" milliseconds. More... | |
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 | |
template<typename U > | |
requires (IsWeakObserved< std::decay_t< U >>) Detail | |
template<typename U > | |
requires (IsSharedObserved< std::decay_t< U >>) Detail | |
template<typename U > | |
requires (std::invocable< U, Nui::val >) Detail | |
template<typename U > | |
requires (std::invocable< U >) Detail | |
template<typename U > | |
requires (!IsObservedLike< std::decay_t< U >> &&!std::invocable< U > &&!std::invocable< U, Nui::val >) Detail | |
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. More... | |
template<class F , class... Args> | |
emscripten::val | bind (F &&f, Args &&... args) |
Equivalent of std::bind returning a javascript functor. More... | |
JS_BIND_FUNCTION_TYPES () | |
ElementRenderer | stabilize (StableElement &stableElement, ElementRenderer const &encapsulatedRenderer) |
Stabilizes an element, so that it is not re-rendered on every render. More... | |
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<T>::value>> | |
void | convertToVal (Nui::val &val, T const &obj) |
template<typename T > | |
Nui::val | convertToVal (std::optional< T > const &option) |
template<typename T > | |
requires Fundamental< T > Nui::val | convertToVal (T const &value) |
Nui::val | convertToVal (std::string const &value) |
Nui::val | convertToVal (std::filesystem::path const &value) |
Nui::val | convertToVal (Nui::val value) |
Nui::val | convertToVal (char const *value) |
template<typename T > | |
Nui::val | convertToVal (std::vector< T > const &vector) |
template<typename T > | |
Nui::val | convertToVal (Observed< T > const &observed) |
template<typename T > | |
Nui::val | convertToVal (std::unordered_map< std::string, T > const &map) |
template<typename T > | |
Nui::val | convertToVal (std::map< std::string, T > const &map) |
template<typename T > | |
Nui::val | convertToVal (std::unique_ptr< T > const &map) |
template<typename T > | |
Nui::val | convertToVal (std::shared_ptr< T > const &map) |
Nui::val | convertToVal (long long) |
Nui::val | convertToVal (std::monostate) |
template<typename... Ts> | |
Nui::val | convertToVal (std::variant< Ts... > const &variant) |
template<typename T > | |
requires(!std::is_union_v< T >) void convertFromValObjImpl(Nui requires(!std::is_union_v< T >) void convertFromVal(Nui requires(!std::is_union_v< T > &&!boost::describe::has_describe_bases< T >::value) void convertFromVal(Nui requires Fundamental< T > void | convertFromVal (Nui::val const &val, T &value) |
void | convertFromVal (Nui::val const &val, std::string &str) |
template<typename T > | |
void | convertFromVal (Nui::val const &val, std::optional< T > &option) |
void | convertFromVal (Nui::val const &val, std::filesystem::path &value) |
void | convertFromVal (Nui::val const &val, Nui::val &value) |
template<typename T > | |
void | convertFromVal (Nui::val const &val, std::vector< T > &vector) |
template<typename T > | |
requires Fundamental< T > void | convertFromVal (Nui::val const &val, std::vector< T > &vector) |
template<typename T > | |
void | convertFromVal (Nui::val const &val, Observed< T > &observed) |
template<typename T > | |
void | convertFromVal (Nui::val const &val, std::unordered_map< std::string, T > &map) |
void | convertFromVal (Nui::val const &, long long) |
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<T>::value>> | |
Nui::val | convertToVal (T const &obj) |
template<typename T , 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 | |
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 | |
template<typename T , class Members = boost::describe::describe_members<T, boost::describe::mod_any_access>> | |
requires (!std::is_union_v< T >) void convertFromValObjImpl(Nui | |
template<typename T > | |
requires Fundamental< T > void | convertFromVal (Nui::val const &val, T &value) |
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. More... | |
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 T > | |
ScopeExit (T) -> ScopeExit< T > | |
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... 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) |
std::wstring | widenString (std::string const &str) |
std::string | shortenString (std::wstring const &str) |
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 | |
template<typename T > | |
concept | Numerical = std::integral<T> || std::floating_point<T> |
template<typename T > | |
concept | Fundamental = Numerical<T> || std::same_as<T, bool> |
template<typename T > | |
concept | Incrementable |
template<typename T > | |
concept | Decrementable |
template<typename T , typename U > | |
concept | PlusAssignable = requires(T t, U u) { t += u; } |
template<typename T , typename U > | |
concept | MinusAssignable = requires(T t, U u) { t += u; } |
template<typename T , typename U > | |
concept | InvocableReturns |
template<typename T > | |
concept | Range |
thread_local EventContext | globalEventContext |
constexpr CustomEventContextFlag_t | CustomEventContextFlag {} |
template<typename T > | |
concept | IsObserved = Detail::IsObserved<std::decay_t<T>>::value |
template<typename T > | |
concept | IsSharedObserved = Detail::IsSharedObserved<std::decay_t<T>>::value |
template<typename T > | |
concept | IsWeakObserved = Detail::IsWeakObserved<std::decay_t<T>>::value |
template<typename T > | |
concept | IsObservedLike = Detail::IsObservedLike<std::decay_t<T>>::value |
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::ElementRenderer = typedef std::function<std::shared_ptr<Dom::Element>(Dom::Element&, Renderer const&)> |
using Nui::ExtractValueType_t = typedef typename ExtractValueType<T>::type |
using Nui::FunctionArgumentTypes_t = typedef typename FunctionArgumentTypes<T>::type |
using Nui::FunctionReturnType_t = typedef typename FunctionReturnType<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 |
|
inline |
void Nui::convertFromVal | ( | Nui::val const & | val, |
std::optional< T > & | option | ||
) |
|
inline |
void Nui::convertFromVal | ( | Nui::val const & | val, |
std::unordered_map< std::string, T > & | map | ||
) |
void Nui::convertFromVal | ( | Nui::val const & | val, |
std::vector< T > & | vector | ||
) |
requires Fundamental< T > void Nui::convertFromVal | ( | Nui::val const & | val, |
std::vector< T > & | vector | ||
) |
requires (!std::is_union_v<T>) void convertFromValObjImpl(Nui requires (!std::is_union_v<T>) void convertFromVal(Nui requires (!std::is_union_v<T> && !boost::describe::has_describe_bases<T>::value) void convertFromVal(Nui requires Fundamental<T> void Nui::convertFromVal | ( | Nui::val const & | val, |
T & | value | ||
) |
requires Fundamental<T> void Nui::convertFromVal | ( | Nui::val const & | val, |
T & | value | ||
) |
|
inline |
|
inline |
void Nui::convertToVal | ( | Nui::val & | val, |
T const & | obj | ||
) |
|
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 & | map | ) |
|
inline |
Nui::val Nui::convertToVal | ( | std::unique_ptr< T > const & | map | ) |
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 | ) |
requires Fundamental< T > Nui::val Nui::convertToVal | ( | T const & | value | ) |
|
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 | ) |
void Nui::fetch | ( | std::string const & | uri, |
FetchOptions const & | options, | ||
std::function< void(std::optional< FetchResponse > const &)> | callback | ||
) |
Simplified fetch, that uses curl in the backend to fetch data.
This circumvents the need for ASYNCIFY. Downloading big amounts of data with this is not optimal.
uri | URI to fetch. |
options | Options for the fetch. |
callback | Callback that is called when the fetch is done. |
void Nui::fetch | ( | std::string const & | uri, |
std::function< void(std::optional< FetchResponse > const &)> | callback | ||
) |
|
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< void(ValueT const &)> | 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< void(ValueT const &)> | 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 | |||
) |
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 | ) |
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 | ||
) |
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 | ||
) |
Nui::requires | ( | !IsObservedLike< std::decay_t< U >> &&!std::invocable< U > &&!std::invocable< U, Nui::val > | ) |
Nui::requires | ( | !std::is_union_v< T > &&!boost::describe::has_describe_bases< T >::value | ) |
Nui::requires | ( | !std::is_union_v< T > &&boost::describe::has_describe_bases< T >::value | ) |
Nui::requires | ( | !std::is_union_v< T > | ) |
Nui::requires | ( | IsObserved< ObservedValue > | ) | & |
Nui::requires | ( | IsObserved< std::decay_t< U >> | ) |
Nui::requires | ( | IsObservedLike< ObservedValues > && | ... | ) |
Nui::requires | ( | IsSharedObserved< std::decay_t< U >> | ) |
Nui::requires | ( | IsWeakObserved< std::decay_t< U >> | ) |
Nui::requires | ( | std::invocable< U > | ) |
Nui::requires | ( | std::invocable< U, Nui::val > | ) |
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 |
Nui::ScopeExit | ( | T | ) | -> ScopeExit< T > |
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. |
|
inline |
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 | ||
) |
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 | ) |
|
inline |
|
constexpr |
|
inlineconstexpr |
concept Nui::Decrementable |
concept Nui::Fundamental = Numerical<T> || std::same_as<T, bool> |
thread_local EventContext Nui::globalEventContext |
concept Nui::Incrementable |
concept Nui::InvocableReturns |
concept Nui::IsObserved = Detail::IsObserved<std::decay_t<T>>::value |
concept Nui::IsObservedLike = Detail::IsObservedLike<std::decay_t<T>>::value |
concept Nui::IsSharedObserved = Detail::IsSharedObserved<std::decay_t<T>>::value |
|
constexpr |
concept Nui::IsWeakObserved = Detail::IsWeakObserved<std::decay_t<T>>::value |
concept Nui::MinusAssignable = requires(T t, U u) { t += u; } |
concept Nui::Numerical = std::integral<T> || std::floating_point<T> |
concept Nui::PlusAssignable = requires(T t, U u) { t += u; } |
concept Nui::Range |
|
constexpr |
|
constexpr |