aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/text_box.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-05-24 01:40:02 +0800
committercrupest <crupest@outlook.com>2020-05-24 01:40:02 +0800
commitd86a71f79afe0e4dac768f61d6bff690567aca5b (patch)
tree4957e9a64c77680deb07201fbd879bf036616dae /include/cru/ui/controls/text_box.hpp
parentf3a8fd608a9776ef0a5f547da918a32cf6074060 (diff)
downloadcru-d86a71f79afe0e4dac768f61d6bff690567aca5b.tar.gz
cru-d86a71f79afe0e4dac768f61d6bff690567aca5b.tar.bz2
cru-d86a71f79afe0e4dac768f61d6bff690567aca5b.zip
...
Diffstat (limited to 'include/cru/ui/controls/text_box.hpp')
-rw-r--r--include/cru/ui/controls/text_box.hpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/include/cru/ui/controls/text_box.hpp b/include/cru/ui/controls/text_box.hpp
deleted file mode 100644
index 15fcb734..00000000
--- a/include/cru/ui/controls/text_box.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-#include "../no_child_control.hpp"
-#include "base.hpp"
-
-#include <memory>
-
-namespace cru::ui::controls {
-template <typename TControl>
-class TextControlService;
-
-class TextBox : public NoChildControl {
- public:
- static constexpr std::string_view control_type = "TextBox";
-
- static TextBox* Create() { return new TextBox(); }
-
- protected:
- TextBox();
-
- public:
- CRU_DELETE_COPY(TextBox)
- CRU_DELETE_MOVE(TextBox)
-
- ~TextBox() override;
-
- std::string_view GetControlType() const final { return control_type; }
-
- render::RenderObject* GetRenderObject() const override;
-
- render::TextRenderObject* GetTextRenderObject();
-
- const TextBoxBorderStyle& GetBorderStyle();
- void SetBorderStyle(TextBoxBorderStyle border_style);
-
- protected:
- void OnMouseHoverChange(bool newHover) override;
-
- private:
- void UpdateBorderStyle();
-
- private:
- std::unique_ptr<render::BorderRenderObject> border_render_object_;
- std::unique_ptr<render::TextRenderObject> text_render_object_;
-
- TextBoxBorderStyle border_style_;
-
- std::unique_ptr<TextControlService<TextBox>> service_;
-};
-} // namespace cru::ui::controls