aboutsummaryrefslogtreecommitdiff
path: root/include/cru/ui/controls/ScrollView.h
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-02-09 23:53:18 +0800
committercrupest <crupest@outlook.com>2022-02-09 23:53:18 +0800
commitb8863c403a44c1c7ac35f1a1da92bbf3c8858552 (patch)
tree7e38f029f0657e6c1210a53f1cba331cdb8feab6 /include/cru/ui/controls/ScrollView.h
parentd18b5453d7ffd19667ee8ac125b34ab5328f0dc3 (diff)
downloadcru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.tar.gz
cru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.tar.bz2
cru-b8863c403a44c1c7ac35f1a1da92bbf3c8858552.zip
...
Diffstat (limited to 'include/cru/ui/controls/ScrollView.h')
-rw-r--r--include/cru/ui/controls/ScrollView.h23
1 files changed, 8 insertions, 15 deletions
diff --git a/include/cru/ui/controls/ScrollView.h b/include/cru/ui/controls/ScrollView.h
index 7bc9b226..43b6390c 100644
--- a/include/cru/ui/controls/ScrollView.h
+++ b/include/cru/ui/controls/ScrollView.h
@@ -1,33 +1,26 @@
#pragma once
-#include "ContentControl.h"
-#include "cru/common/Base.h"
-#include "cru/ui/render/RenderObject.h"
+#include "SingleChildControl.h"
#include "cru/ui/render/ScrollRenderObject.h"
-#include <memory>
-#include <string_view>
-
namespace cru::ui::controls {
-class CRU_UI_API ScrollView : public ContentControl {
+class CRU_UI_API ScrollView
+ : public SingleChildControl<render::ScrollRenderObject> {
public:
static ScrollView* Create() { return new ScrollView(); }
- static constexpr StringView control_type = u"ScrollView";
+ static constexpr StringView kControlType = u"ScrollView";
+ protected:
ScrollView();
+ public:
CRU_DELETE_COPY(ScrollView)
CRU_DELETE_MOVE(ScrollView)
- ~ScrollView() override = default;
+ ~ScrollView() override;
public:
- String GetControlType() const override { return control_type.ToString(); }
-
- render::RenderObject* GetRenderObject() const override;
-
- private:
- std::unique_ptr<render::ScrollRenderObject> scroll_render_object_;
+ String GetControlType() const override { return kControlType.ToString(); }
};
} // namespace cru::ui::controls