3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/AnchorPoint.h"
7#include "mc/client/gui/Draggable.h"
8#include "mc/client/gui/LayoutOffset.h"
9#include "mc/client/gui/PriorityRule.h"
10#include "mc/client/gui/controls/ComponentReceiveActionType.h"
11#include "mc/client/gui/controls/UIComponent.h"
12#include "mc/client/gui/screens/LayoutVariableType.h"
30 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::LayoutVariables>> mAllVariables;
31 ::ll::TypedStorage<8, 88, ::std::array<::std::unique_ptr<::LayoutVariable>, 11>> mControlVariables;
32 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorFrom;
33 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorTo;
34 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mOffset;
35 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mSize;
36 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMinSize;
37 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMaxSize;
38 ::ll::TypedStorage<4, 8, ::glm::vec2> mOffsetDelta;
39 ::ll::TypedStorage<4, 8, ::glm::vec2> mGridDimensions;
40 ::ll::TypedStorage<4, 8, ::glm::vec2> mDragPosition;
41 ::ll::TypedStorage<1, 1, ::ui::Draggable> mDraggable;
42 ::ll::TypedStorage<1, 1, ::ui::PriorityRule> mPriorityRule;
43 ::ll::TypedStorage<4, 4, int> mPriority;
44 bool mIsBeingDragged : 1;
46 bool mFollowsCursor : 1;
47 bool mFollowsCursorInsideParent : 1;
49 bool mInheritMaxSiblingWidth : 1;
50 bool mInheritMaxSiblingHeight : 1;
51 bool mIsDelayingLayout : 1;
52 bool mIsInitialized : 1;
58 virtual ~LayoutComponent() =
default;
60 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
62 virtual void reset() ;
64 virtual ::ComponentReceiveActionType receive(
65 ::VisualTree& visualTree,
66 ::ScreenInputContext& context,
67 ::UIAnimationController& animationController,
68 ::ScreenEvent
const& screenEvent
71 virtual void onNotifyChildAdded() ;
73 virtual void onAdded() ;
75 virtual void onRemoved() ;
81 MCAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
83 MCAPI
void _initialize(::std::shared_ptr<::LayoutVariables>& layoutVariables,
bool initializeInactive);
85 MCAPI
void _initializeVariables();
87 MCAPI
int _recursiveInitialize(
88 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
89 bool initializeInactive,
90 bool initializeTemplate
93 MCAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
95 MCAPI
void invalidateVariableDependencies(::VariableRef& var,
bool forceInvalidation);
97 MCAPI
void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes,
bool forceInvalidation);
99 MCAPI
int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables,
bool initializeInactive);
101 MCAPI
void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
103 MCAPI
void removeDependencies();
105 MCAPI
void setOffset(::ui::LayoutOffset
const& offset);
107 MCAPI
void setOffsetDelta(::glm::vec2
const& offsetDelta, ::UIControl
const*
const primaryControl);
109 MCAPI
void setSize(::ui::LayoutOffset
const& size);
111 MCAPI
void setVariableOverrideValue(::LayoutVariableType type,
float value);
117 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
121 MCAPI ::ComponentReceiveActionType $receive(
122 ::VisualTree& visualTree,
123 ::ScreenInputContext& context,
124 ::UIAnimationController& animationController,
125 ::ScreenEvent
const& screenEvent
128 MCAPI
void $onNotifyChildAdded();
130 MCAPI
void $onAdded();
132 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