aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-07-04 16:43:49 +0800
committercrupest <crupest@outlook.com>2020-07-04 16:43:49 +0800
commite10ef322e5f6268aec5d7717a82fceb42607a000 (patch)
treecb635f26fb9caa86d0486ca91a146bff77fad44d /include
parent5a1c45f69b858f8c578806df54d276d5084d032b (diff)
downloadcru-e10ef322e5f6268aec5d7717a82fceb42607a000.tar.gz
cru-e10ef322e5f6268aec5d7717a82fceb42607a000.tar.bz2
cru-e10ef322e5f6268aec5d7717a82fceb42607a000.zip
...
Diffstat (limited to 'include')
-rw-r--r--include/cru/ui/render/ScrollRenderObject.hpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/cru/ui/render/ScrollRenderObject.hpp b/include/cru/ui/render/ScrollRenderObject.hpp
index 43e6d7f9..0c1fb16b 100644
--- a/include/cru/ui/render/ScrollRenderObject.hpp
+++ b/include/cru/ui/render/ScrollRenderObject.hpp
@@ -4,6 +4,14 @@
#include "cru/platform/graph/util/Painter.hpp"
namespace cru::ui::render {
+// Measure logic:
+// Measure child with unspecified min and max size.
+// If parent's preferred size is specified, then it is used as measure result.
+// Or child's size is coerced into requirement and then used as result.
+// If no child, then use the preferred size if set or min size if set or 0.
+// Layout logic:
+// If child is smaller than content area, layout at lefttop.
+// Or layout by scroll state.
class ScrollRenderObject : public RenderObject {
public:
ScrollRenderObject() : RenderObject(ChildMode::Single) {}