AeonGUI
A portable video game graphic user interface library.
Loading...
Searching...
No Matches
Text.hpp
1/*
2Copyright (C) 2020,2024,2025,2026 Rodrigo Jose Hernandez Cordoba
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15*/
16#ifndef AEONGUI_TEXT_H
17#define AEONGUI_TEXT_H
18#include <string>
19#include "aeongui/Platform.hpp"
20#include "Node.hpp"
21
22namespace AeonGUI
23{
24 namespace DOM
25 {
30 class Text : public Node
31 {
32 public:
37 DLL Text ( const std::string& aText, Node* aParent );
39 DLL ~Text() final;
43 NodeType nodeType() const final;
47 std::string wholeText() const;
49 private:
50 std::string mText{};
51 };
52 }
53}
54#endif
Platform-specific DLL import/export macros and compiler helpers.
NodeType
DOM node type constants.
Definition Node.hpp:44
Node(Node *aParent=nullptr)
Construct a node with an optional parent.
Definition Node.cpp:25
~Text() final
Destructor.
std::string wholeText() const
Get the concatenated text of this and adjacent text nodes.
Definition Text.cpp:29
NodeType nodeType() const final
Get the node type (always TEXT_NODE).
Definition Text.cpp:25
Text(const std::string &aText, Node *aParent)
Construct a Text node.
Definition Text.cpp:22