#pragma once #include "NoChildControl.hpp" #include "IBorderControl.hpp" #include namespace cru::ui::controls { template class TextControlService; class TextBox : public NoChildControl, public IBorderControl { public: static constexpr std::u16string_view control_type = u"TextBox"; static TextBox* Create() { return new TextBox(); } protected: TextBox(); public: CRU_DELETE_COPY(TextBox) CRU_DELETE_MOVE(TextBox) ~TextBox() override; std::u16string_view GetControlType() const final { return control_type; } render::RenderObject* GetRenderObject() const override; gsl::not_null GetTextRenderObject(); render::ScrollRenderObject* GetScrollRenderObject(); void ApplyBorderStyle(const style::ApplyBorderStyleInfo& style) override; private: std::unique_ptr border_render_object_; std::unique_ptr scroll_render_object_; std::unique_ptr text_render_object_; std::unique_ptr> service_; }; } // namespace cru::ui::controls