LeviLamina
Loading...
Searching...
No Matches
LayoutComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/AnchorPoint.h"
7#include "mc/client/gui/Draggable.h"
8#include "mc/client/gui/LayoutAxisOffsetContainerType.h"
9#include "mc/client/gui/LayoutOffset.h"
10#include "mc/client/gui/PriorityRule.h"
11#include "mc/client/gui/controls/ComponentReceiveActionType.h"
12#include "mc/client/gui/controls/UIComponent.h"
13#include "mc/client/gui/screens/LayoutVariableType.h"
14
15// auto generated forward declare list
16// clang-format off
17class LayoutVariable;
18class LayoutVariables;
21class UIControl;
22class VariableRef;
23class VisualTree;
24struct ScreenEvent;
25// clang-format on
26
27class LayoutComponent : public ::UIComponent {
28public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::LayoutVariables>> mAllVariables;
32 ::ll::TypedStorage<8, 88, ::std::array<::std::unique_ptr<::LayoutVariable>, 11>> mControlVariables;
33 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mOffset;
34 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mSize;
35 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMinSize;
36 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMaxSize;
37 ::ll::TypedStorage<4, 8, ::glm::vec2> mOffsetDelta;
38 ::ll::TypedStorage<4, 8, ::glm::vec2> mGridDimensions;
39 ::ll::TypedStorage<4, 8, ::glm::vec2> mDragPosition;
40 ::ll::TypedStorage<1, 1, ::ui::Draggable> mDraggable;
41 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorFrom;
42 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorTo;
43 ::ll::TypedStorage<1, 1, ::ui::PriorityRule> mPriorityRule;
44 ::ll::TypedStorage<4, 4, int> mPriority;
45 bool mIsBeingDragged : 1;
46 bool mContained : 1;
47 bool mFollowsCursor : 1;
48 bool mFollowsCursorInsideParent : 1;
49 bool mActive : 1;
50 bool mInheritMaxSiblingWidth : 1;
51 bool mInheritMaxSiblingHeight : 1;
52 bool mIsDelayingLayout : 1;
53 bool mIsInitialized : 1;
54 // NOLINTEND
55
56public:
57 // prevent constructor by default
58 LayoutComponent();
59
60public:
61 // virtual functions
62 // NOLINTBEGIN
63 virtual ~LayoutComponent() /*override*/;
64
65 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
66
67 virtual void reset() /*override*/;
68
69 virtual ::ComponentReceiveActionType receive(
70 ::VisualTree& screenEvent,
71 ::ScreenInputContext&,
72 ::UIAnimationController&,
73 ::ScreenEvent const&
74 ) /*override*/;
75
76 virtual void onNotifyChildAdded() /*override*/;
77
78 virtual void onAdded() /*override*/;
79
80 virtual void onRemoved() /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI explicit LayoutComponent(::UIControl& owner);
87
88 MCAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
89
90 MCAPI void _initialize(::std::shared_ptr<::LayoutVariables>& layoutVariables, bool initializeInactive);
91
92 MCAPI void _initializeVariables();
93
94 MCAPI bool _isVariableIsSupported(::LayoutVariableType type) const;
95
96 MCAPI int _recursiveInitialize(
97 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
98 bool initializeInactive,
99 bool initializeTemplate
100 );
101
102 MCAPI ::ui::AnchorPoint getAnchorFrom() const;
103
104 MCAPI ::ui::AnchorPoint getAnchorTo() const;
105
106 MCFOLD ::ui::Draggable getDraggable() const;
107
108 MCAPI bool getInheritMaxSiblingHeight() const;
109
110 MCAPI bool getInheritMaxSiblingWidth() const;
111
112 MCFOLD ::ui::LayoutOffset const& getMaxSize() const;
113
114 MCFOLD ::ui::LayoutOffset const& getMinSize() const;
115
116 MCFOLD ::ui::LayoutOffset const& getOffset() const;
117
118 MCFOLD ::glm::vec2 const& getOffsetDelta() const;
119
120 MCAPI ::glm::vec2 const getPositionMinusOffsetDelta() const;
121
122 MCFOLD int getPriority() const;
123
124 MCAPI ::ui::PriorityRule getPriorityRule() const;
125
126 MCFOLD ::ui::LayoutOffset const& getSize() const;
127
128 MCAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
129
130 MCAPI bool hasMaxSize() const;
131
132 MCAPI bool hasOffsetAxisType(::LayoutVariableType axis, ::ui::LayoutAxisOffsetContainerType checkType) const;
133
134 MCAPI bool hasSizeAxisType(::LayoutVariableType axis, ::ui::LayoutAxisOffsetContainerType checkType) const;
135
136 MCAPI void invalidateVariableDependencies(::VariableRef& var, bool forceInvalidation);
137
138 MCAPI bool isActive() const;
139
140 MCAPI bool isDelayingLayout() const;
141
142 MCAPI bool isInitialized() const;
143
144 MCAPI void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes, bool forceInvalidation);
145
146 MCAPI int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables, bool initializeInactive);
147
148 MCAPI void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
149
150 MCAPI void removeDeadDependencies();
151
152 MCAPI void removeDependencies();
153
154 MCAPI void removeReferencesToMe();
155
156 MCAPI void setAnchorFrom(::ui::AnchorPoint anchorFrom);
157
158 MCAPI void setAnchorTo(::ui::AnchorPoint anchorTo);
159
160 MCAPI void setContained(bool contained);
161
162 MCAPI void setDelayLayout(bool delayLayout);
163
164 MCAPI void setDraggable(::ui::Draggable draggable);
165
166 MCAPI void setFollowsCursor(bool followsCursor);
167
168 MCAPI void setFollowsCursorInsideParent(bool followsCursorInsideParent);
169
170 MCAPI void setInactive();
171
172 MCAPI void setInheritMaxSiblingHeight(bool inheritMaxSiblingHeight);
173
174 MCAPI void setInheritMaxSiblingWidth(bool inheritMaxSiblingWidth);
175
176 MCAPI void setMaxSize(::ui::LayoutOffset const& size);
177
178 MCAPI void setMinSize(::ui::LayoutOffset const& size);
179
180 MCAPI void setOffset(::ui::LayoutOffset const& offset);
181
182 MCAPI void setOffsetDelta(::glm::vec2 const& offsetDelta, ::UIControl const* const primaryControl);
183
184 MCAPI void setPriority(int priority);
185
186 MCAPI void setPriorityRule(::ui::PriorityRule priorityRule);
187
188 MCAPI void setSize(::ui::LayoutOffset const& size);
189
190 MCAPI void setVariableOverrideValue(::LayoutVariableType type, float value);
191 // NOLINTEND
192
193public:
194 // constructor thunks
195 // NOLINTBEGIN
196 MCAPI void* $ctor(::UIControl& owner);
197 // NOLINTEND
198
199public:
200 // destructor thunk
201 // NOLINTBEGIN
202 MCAPI void $dtor();
203 // NOLINTEND
204
205public:
206 // virtual function thunks
207 // NOLINTBEGIN
208 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
209
210 MCAPI void $reset();
211
212 MCAPI ::ComponentReceiveActionType
213 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent const&);
214
215 MCAPI void $onNotifyChildAdded();
216
217 MCAPI void $onAdded();
218
219 MCAPI void $onRemoved();
220 // NOLINTEND
221
222public:
223 // vftables
224 // NOLINTBEGIN
225 MCNAPI static void** $vftable();
226 // NOLINTEND
227};
Definition LayoutComponent.h:5
static MCAPI void ** $vftable()
Definition LayoutVariable.h:5
Definition LayoutVariables.h:5
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VariableRef.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5