Nui
Loading...
Searching...
No Matches
nui
include
nui
frontend
dom
dom.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <
nui/core.hpp
>
4
#include <
nui/frontend/elements/impl/html_element.hpp
>
5
#include <
nui/frontend/dom/element.hpp
>
6
7
#include <memory>
8
9
namespace
Nui::Dom
10
{
11
class
Dom
12
{
13
public
:
14
Dom
();
15
Dom
(
const
Dom
&) =
default
;
16
Dom
(
Dom
&&) =
default
;
17
Dom
&
operator=
(
const
Dom
&) =
default
;
18
Dom
&
operator=
(
Dom
&&) =
default
;
19
~Dom
() =
default
;
20
21
Element
&
root
();
22
template
<
typename
T>
23
void
setBody
(T&& body)
24
{
25
root
().
replaceElement
(std::forward<T>(body));
26
}
27
28
private
:
29
std::shared_ptr<Element> root_;
30
};
31
}
Nui::Dom::Dom
Definition
dom.hpp:12
Nui::Dom::Dom::Dom
Dom(const Dom &)=default
Nui::Dom::Dom::operator=
Dom & operator=(Dom &&)=default
Nui::Dom::Dom::setBody
void setBody(T &&body)
Definition
dom.hpp:23
Nui::Dom::Dom::~Dom
~Dom()=default
Nui::Dom::Dom::Dom
Dom(Dom &&)=default
Nui::Dom::Dom::Dom
Dom()
Definition
dom.cpp:8
Nui::Dom::Dom::operator=
Dom & operator=(const Dom &)=default
Nui::Dom::Dom::root
Element & root()
Definition
dom.cpp:12
Nui::Dom::Element
Definition
element.hpp:42
Nui::Dom::Element::replaceElement
void replaceElement(std::invocable< Element &, Renderer const & > auto &&fn)
Definition
element.hpp:135
core.hpp
element.hpp
html_element.hpp
Nui::Dom
Definition
basic_element.hpp:12
Generated by
1.9.8