aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/text_box.hpp
blob: 76a6299e8485b5675fa1a02010ff3a67493a405a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#pragma once
#include "../no_child_control.hpp"

#include <memory>

namespace cru::ui::render {
class BorderRenderObject;
class TextRenderObject;
class CanvasRenderObject;
}  // namespace cru::ui::render

namespace cru::ui::controls {
class TextBox : public NoChildControl {
 public:
  static constexpr std::string_view control_type = "TextBox";

 protected:
  TextBox();

 public:
  CRU_DELETE_COPY(TextBox)
  CRU_DELETE_MOVE(TextBox)

  ~TextBox() override;

  std::string_view GetControlType() const final { return control_type; }

 private:
  std::unique_ptr<render::BorderRenderObject> border_render_object_;
  std::unique_ptr<render::TextRenderObject> text_render_object_;
  std::unique_ptr<render::CanvasRenderObject> caret_render_object_;
};
}  // namespace cru::ui::controls