diff options
| author | crupest <crupest@outlook.com> | 2020-05-24 01:40:02 +0800 |
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2020-05-24 01:40:02 +0800 |
| commit | d86a71f79afe0e4dac768f61d6bff690567aca5b (patch) | |
| tree | 4957e9a64c77680deb07201fbd879bf036616dae /include/cru/ui/controls/text_box.hpp | |
| parent | f3a8fd608a9776ef0a5f547da918a32cf6074060 (diff) | |
| download | cru-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.hpp | 49 |
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 |
