3#include "mc/_HeaderOutputPredefine.h"
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"
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;
47 bool mFollowsCursor : 1;
48 bool mFollowsCursorInsideParent : 1;
50 bool mInheritMaxSiblingWidth : 1;
51 bool mInheritMaxSiblingHeight : 1;
52 bool mIsDelayingLayout : 1;
53 bool mIsInitialized : 1;
63 virtual ~LayoutComponent() ;
65 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
67 virtual void reset() ;
69 virtual ::ComponentReceiveActionType receive(
70 ::VisualTree& screenEvent,
71 ::ScreenInputContext&,
72 ::UIAnimationController&,
76 virtual void onNotifyChildAdded() ;
78 virtual void onAdded() ;
80 virtual void onRemoved() ;
86 MCAPI
explicit LayoutComponent(::UIControl& owner);
88 MCAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
90 MCAPI
void _initialize(::std::shared_ptr<::LayoutVariables>& layoutVariables,
bool initializeInactive);
92 MCAPI
void _initializeVariables();
94 MCAPI
bool _isVariableIsSupported(::LayoutVariableType type)
const;
96 MCAPI
int _recursiveInitialize(
97 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
98 bool initializeInactive,
99 bool initializeTemplate
102 MCAPI ::ui::AnchorPoint getAnchorFrom()
const;
104 MCAPI ::ui::AnchorPoint getAnchorTo()
const;
106 MCFOLD ::ui::Draggable getDraggable()
const;
108 MCAPI
bool getInheritMaxSiblingHeight()
const;
110 MCAPI
bool getInheritMaxSiblingWidth()
const;
112 MCFOLD ::ui::LayoutOffset
const& getMaxSize()
const;
114 MCFOLD ::ui::LayoutOffset
const& getMinSize()
const;
116 MCFOLD ::ui::LayoutOffset
const& getOffset()
const;
118 MCFOLD ::glm::vec2
const& getOffsetDelta()
const;
120 MCAPI ::glm::vec2
const getPositionMinusOffsetDelta()
const;
122 MCFOLD
int getPriority()
const;
124 MCAPI ::ui::PriorityRule getPriorityRule()
const;
126 MCFOLD ::ui::LayoutOffset
const& getSize()
const;
128 MCAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
130 MCAPI
bool hasMaxSize()
const;
132 MCAPI
bool hasOffsetAxisType(::LayoutVariableType axis, ::ui::LayoutAxisOffsetContainerType checkType)
const;
134 MCAPI
bool hasSizeAxisType(::LayoutVariableType axis, ::ui::LayoutAxisOffsetContainerType checkType)
const;
136 MCAPI
void invalidateVariableDependencies(::VariableRef& var,
bool forceInvalidation);
138 MCAPI
bool isActive()
const;
140 MCAPI
bool isDelayingLayout()
const;
142 MCAPI
bool isInitialized()
const;
144 MCAPI
void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes,
bool forceInvalidation);
146 MCAPI
int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables,
bool initializeInactive);
148 MCAPI
void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
150 MCAPI
void removeDeadDependencies();
152 MCAPI
void removeDependencies();
154 MCAPI
void removeReferencesToMe();
156 MCAPI
void setAnchorFrom(::ui::AnchorPoint anchorFrom);
158 MCAPI
void setAnchorTo(::ui::AnchorPoint anchorTo);
160 MCAPI
void setContained(
bool contained);
162 MCAPI
void setDelayLayout(
bool delayLayout);
164 MCAPI
void setDraggable(::ui::Draggable draggable);
166 MCAPI
void setFollowsCursor(
bool followsCursor);
168 MCAPI
void setFollowsCursorInsideParent(
bool followsCursorInsideParent);
170 MCAPI
void setInactive();
172 MCAPI
void setInheritMaxSiblingHeight(
bool inheritMaxSiblingHeight);
174 MCAPI
void setInheritMaxSiblingWidth(
bool inheritMaxSiblingWidth);
176 MCAPI
void setMaxSize(::ui::LayoutOffset
const& size);
178 MCAPI
void setMinSize(::ui::LayoutOffset
const& size);
180 MCAPI
void setOffset(::ui::LayoutOffset
const& offset);
182 MCAPI
void setOffsetDelta(::glm::vec2
const& offsetDelta, ::UIControl
const*
const primaryControl);
184 MCAPI
void setPriority(
int priority);
186 MCAPI
void setPriorityRule(::ui::PriorityRule priorityRule);
188 MCAPI
void setSize(::ui::LayoutOffset
const& size);
190 MCAPI
void setVariableOverrideValue(::LayoutVariableType type,
float value);
196 MCAPI
void* $ctor(::UIControl& owner);
208 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
212 MCAPI ::ComponentReceiveActionType
213 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent
const&);
215 MCAPI
void $onNotifyChildAdded();
217 MCAPI
void $onAdded();
219 MCAPI
void $onRemoved();
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 VariableRef.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5