3#include "mc/_HeaderOutputPredefine.h"
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"
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;
54 ScrollViewComponent();
59 virtual ~ScrollViewComponent() =
default;
61 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
63 virtual void reset() ;
65 virtual void reload(::UIComponent
const& rhs) ;
67 virtual ::ComponentReceiveActionType receive(
68 ::VisualTree& visualTree,
69 ::ScreenInputContext& context,
70 ::UIAnimationController& animationController,
71 ::ScreenEvent
const& screenEvent
74 virtual void onNotifyChildRemoved() ;
76 virtual bool onLayoutChange() ;
82 MCAPI
explicit ScrollViewComponent(::UIControl& owner);
84 MCAPI ::glm::vec2 _getContentSize()
const;
86 MCAPI
bool _handlePointerMove(
87 ::VisualTree& visualTree,
88 ::ScreenInputContext& context,
89 ::UIAnimationController& animationController,
90 ::ScreenEvent
const& screenEvent,
91 ::ComponentReceiveActionType& returnValue
94 MCAPI
bool _handleScrollDirection(
95 ::VisualTree& visualTree,
96 ::ScreenInputContext& context,
97 ::UIAnimationController& animationController,
98 ::ScreenEvent
const& screenEvent,
99 ::ComponentReceiveActionType& returnValue
102 MCAPI
bool _handleTrackScrollButton(
103 ::VisualTree& visualTree,
104 ::ScreenInputContext& context,
105 ::UIAnimationController& animationController,
106 ::ScreenEvent
const& screenEvent,
107 ::ComponentReceiveActionType& returnValue
110 MCAPI
void _makeScrollBarVisible();
112 MCAPI ::ui::AnimationStatus _updateDynamicsAndScrollPosition(::mce::TimeStep
const& timeStep);
114 MCAPI
void _updateScroll(::glm::vec2
const& delta,
bool updateScrollBoxLayout);
116 MCAPI
void _updateScrollBoxSize();
118 MCAPI
void _updateScrollFromScrollBox(::ScreenEvent
const& screenEvent);
120 MCAPI
void _updateTouchScrollbarVisibility(::mce::TimeStep
const& timeStep);
122 MCAPI ::ui::AnimationStatus animationScrollingTick(::mce::TimeStep
const& timeStep);
124 MCAPI
bool handleScrollDirection(
125 ::VisualTree& visualTree,
126 ::UIAnimationController& animationController,
127 ::ScreenInputContext& context,
128 ::glm::vec2
const& position,
129 ::glm::vec2
const& deltaPosition,
137 MCAPI
void* $ctor(::UIControl& owner);
143 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
147 MCAPI
void $reload(::UIComponent
const& rhs);
149 MCAPI ::ComponentReceiveActionType $receive(
150 ::VisualTree& visualTree,
151 ::ScreenInputContext& context,
152 ::UIAnimationController& animationController,
153 ::ScreenEvent
const& screenEvent
156 MCFOLD
void $onNotifyChildRemoved();
158 MCAPI
bool $onLayoutChange();
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5