FlowArithmeticCalculator 1.0.0
Flow Arithmetic Calculator
Loading...
Searching...
No Matches
UIText.h
Go to the documentation of this file.
1#ifndef UITEXT_H
2#define UITEXT_H
3
4#include <cstdint>
5#include <string>
6
14 class UIText {
15 public:
19 enum class Variant : std::uint8_t { Headline, MenuCaption, Choice, Caption };
20
26 UIText(const std::string& text, const Variant& variant);
27
28 virtual ~UIText() = default;
29
30 UIText(const UIText&) = default;
31 UIText& operator=(const UIText&);
32
33 UIText(UIText&&) noexcept;
34 UIText& operator=(UIText&&) noexcept;
35
40 const std::string& getText() const { return text; }
41
46 const Variant& getVariant() const { return variant; }
47
48 private:
52 std::string text;
53
58 };
59
60} // namespace business_logic::components
61#endif // UITEXT_H
The UI renderable text primitive.
Definition UIText.h:14
std::string text
The text to display.
Definition UIText.h:52
Variant variant
The visual display variant of the text.
Definition UIText.h:57
const Variant & getVariant() const
Gets the visual display variant of the text.
Definition UIText.h:46
Variant
The visual display variant of the text.
Definition UIText.h:19
UIText & operator=(const UIText &)
Definition UIText.cpp:7
UIText(const UIText &)=default
const std::string & getText() const
Gets the text.
Definition UIText.h:40
UI primitives and components to be rendered as part of the UI.
Definition UIText.cpp:3
STL namespace.