ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ScrollView.hpp
Go to the documentation of this file.
1#pragma once
2
16
17#include "Common.hpp"
18#include "Layout.hpp"
19
20namespace ZenitUI::UI
21{
22
26
35 class ScrollView : public TLayout<ScrollView>
36 {
37 public:
43 {
44 setInteractive(true);
45 setBlocksRaycast(true);
46 setStyleTag("ScrollView");
47 getInlineDefaults().overflowX = Overflow::Auto;
48 getInlineDefaults().overflowY = Overflow::Auto;
49 }
50 };
51
52} // namespace ZenitUI::UI
Centralized standard library includes used throughout ZenitUI.
The node class: tree structure, layout pass, style resolution, input dispatch, render orchestration,...
void setStyleTag(const std::string &t)
Set the node's style tag.
Style & getInlineDefaults()
Direct mutable access to the inline defaults (lowest-priority inline).
Definition Layout.hpp:735
TLayout(Args &&...args)
Definition Layout.hpp:1401
ScrollView(LayoutType t=LayoutType::Vertical)
Construct a scroll view with the given flow direction.
Definition ScrollView.hpp:42
LayoutType
Positioning strategy applied to a Layout node's direct children.
Definition UIEnums.hpp:29
@ Vertical
Children flow top-to-bottom (column flex semantics).
Definition UIEnums.hpp:31