Euphoria
textdata.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <memory>
4 
5 
6 
7 namespace eu::render
8 {
9  struct DrawableFont;
10  struct DrawableText;
11 }
12 
13 namespace eu::gui
14 {
15  struct TextData
16  {
17  TextData();
19 
20  TextData(const TextData& other) = delete;
21  void operator=(const TextData&) = delete;
22  TextData(TextData&& other) = delete;
23  void operator=(TextData&&) = delete;
24 
25  void
26  set_font(std::shared_ptr<render::DrawableFont> font);
27 
28  [[nodiscard]] const render::DrawableFont&
29  get_font() const;
30 
31  void
32  update_string(const std::string& str);
33 
34  [[nodiscard]] bool
35  has_text() const;
36 
37  [[nodiscard]] const render::DrawableText&
38  get_text() const;
39 
41  get_text();
42 
43  void
44  set_size(float size);
45 
46  void
47  update_text();
48 
49 
50  std::shared_ptr<render::DrawableFont> font;
51  std::string string;
52  float size;
53  std::shared_ptr<render::DrawableText> text;
54  };
55 }
void operator=(const TextData &)=delete
TextData(const TextData &other)=delete
void operator=(TextData &&)=delete
const render::DrawableFont & get_font() const
Definition: textdata.cc:31
void update_text()
Definition: textdata.cc:81
bool has_text() const
Definition: textdata.cc:47
const render::DrawableText & get_text() const
Definition: textdata.cc:54
void set_font(std::shared_ptr< render::DrawableFont > font)
Definition: textdata.cc:22
std::shared_ptr< render::DrawableText > text
Definition: textdata.h:53
std::string string
Definition: textdata.h:51
void set_size(float size)
Definition: textdata.cc:70
std::shared_ptr< render::DrawableFont > font
Definition: textdata.h:50
void update_string(const std::string &str)
Definition: textdata.cc:39
TextData(TextData &&other)=delete