LeviLamina
Loading...
Searching...
No Matches
ScrollViewComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/ComponentReceiveActionType.h"
7#include "mc/client/gui/controls/ScrollbarDynamics.h"
8#include "mc/client/gui/controls/UIComponent.h"
9#include "mc/client/gui/screens/AnimationStatus.h"
10#include "mc/deps/input/enums/ButtonState.h"
11
12// auto generated forward declare list
13// clang-format off
16class UIControl;
17class VisualTree;
18struct ScreenEvent;
19namespace mce { struct TimeStep; }
20// clang-format on
21
23public:
24 // member variables
25 // NOLINTBEGIN
26 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mScrollViewPort;
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mScrollContent;
28 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mScrollTrack;
29 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mScrollBox;
30 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mBoxAndTrackPanel;
31 ::ll::TypedStorage<4, 4, uint> mTrackScrollButtonId;
32 ::ll::TypedStorage<4, 4, uint> mTouchScrollButtonId;
33 ::ll::TypedStorage<4, 4, uint> mScrollingActiveEventId;
34 ::ll::TypedStorage<4, 4, uint> mScrollBarReleasedEventId;
35 ::ll::TypedStorage<4, 4, uint> mScrollBarBottomEventId;
36 ::ll::TypedStorage<1, 1, ::ButtonState> mLastTouchButtonState;
37 ::ll::TypedStorage<1, 1, ::ButtonState> mLastScrollBoxPressedState;
38 ::ll::TypedStorage<4, 4, float> mDistanceForScrollEventsToPassOn;
39 ::ll::TypedStorage<4, 4, float> mScrollSpeed;
40 ::ll::TypedStorage<1, 1, bool> mGestureControlMode;
41 ::ll::TypedStorage<1, 1, bool> mAlwaysHandleScrolling;
42 ::ll::TypedStorage<1, 1, bool> mTouchMode;
43 ::ll::TypedStorage<1, 1, bool> mAllowScrollEvenWhenContentFits;
44 ::ll::TypedStorage<1, 1, bool> mScrollbarAlwaysVisible;
45 ::ll::TypedStorage<4, 68, ::ScrollbarDynamics> mScrollbarDynamics;
46 ::ll::TypedStorage<1, 1, bool> mTouchScrollBarVisible;
47 ::ll::TypedStorage<4, 4, float> mTouchScrollBarIntensity;
48 ::ll::TypedStorage<1, 1, bool> mJumpToBottomOnUpdate;
49 ::ll::TypedStorage<4, 4, float> mContentSize;
50 // NOLINTEND
51
52public:
53 // prevent constructor by default
54 ScrollViewComponent();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual ~ScrollViewComponent() /*override*/ = default;
60
61 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
62
63 virtual void reset() /*override*/;
64
65 virtual void reload(::UIComponent const& rhs) /*override*/;
66
67 virtual ::ComponentReceiveActionType receive(
68 ::VisualTree& visualTree,
69 ::ScreenInputContext& context,
70 ::UIAnimationController& animationController,
71 ::ScreenEvent const& screenEvent
72 ) /*override*/;
73
74 virtual void onNotifyChildRemoved() /*override*/;
75
76 virtual bool onLayoutChange() /*override*/;
77 // NOLINTEND
78
79public:
80 // member functions
81 // NOLINTBEGIN
82 MCAPI explicit ScrollViewComponent(::UIControl& owner);
83
84 MCAPI ::glm::vec2 _getContentSize() const;
85
86 MCAPI bool _handlePointerMove(
87 ::VisualTree& visualTree,
88 ::ScreenInputContext& context,
89 ::UIAnimationController& animationController,
90 ::ScreenEvent const& screenEvent,
91 ::ComponentReceiveActionType& returnValue
92 );
93
94 MCAPI bool _handleScrollDirection(
95 ::VisualTree& visualTree,
96 ::ScreenInputContext& context,
97 ::UIAnimationController& animationController,
98 ::ScreenEvent const& screenEvent,
99 ::ComponentReceiveActionType& returnValue
100 );
101
102 MCAPI bool _handleTrackScrollButton(
103 ::VisualTree& visualTree,
104 ::ScreenInputContext& context,
105 ::UIAnimationController& animationController,
106 ::ScreenEvent const& screenEvent,
107 ::ComponentReceiveActionType& returnValue
108 );
109
110 MCAPI void _makeScrollBarVisible();
111
112 MCAPI ::ui::AnimationStatus _updateDynamicsAndScrollPosition(::mce::TimeStep const& timeStep);
113
114 MCAPI void _updateScroll(::glm::vec2 const& delta, bool updateScrollBoxLayout);
115
116 MCAPI void _updateScrollBoxSize();
117
118 MCAPI void _updateScrollFromScrollBox(::ScreenEvent const& screenEvent);
119
120 MCAPI void _updateTouchScrollbarVisibility(::mce::TimeStep const& timeStep);
121
122 MCAPI ::ui::AnimationStatus animationScrollingTick(::mce::TimeStep const& timeStep);
123
124 MCAPI bool handleScrollDirection(
125 ::VisualTree& visualTree,
126 ::UIAnimationController& animationController,
127 ::ScreenInputContext& context,
128 ::glm::vec2 const& position,
129 ::glm::vec2 const& deltaPosition,
130 bool alreadyHandled
131 );
132 // NOLINTEND
133
134public:
135 // constructor thunks
136 // NOLINTBEGIN
137 MCAPI void* $ctor(::UIControl& owner);
138 // NOLINTEND
139
140public:
141 // virtual function thunks
142 // NOLINTBEGIN
143 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
144
145 MCAPI void $reset();
146
147 MCAPI void $reload(::UIComponent const& rhs);
148
149 MCAPI ::ComponentReceiveActionType $receive(
150 ::VisualTree& visualTree,
151 ::ScreenInputContext& context,
152 ::UIAnimationController& animationController,
153 ::ScreenEvent const& screenEvent
154 );
155
156 MCFOLD void $onNotifyChildRemoved();
157
158 MCAPI bool $onLayoutChange();
159 // NOLINTEND
160
161public:
162 // vftables
163 // NOLINTBEGIN
164 MCNAPI static void** $vftable();
165 // NOLINTEND
166};
Definition ScreenInputContext.h:5
Definition ScrollViewComponent.h:5
static MCAPI void ** $vftable()
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5
Definition TimeStep.h:7