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"
29 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::LayoutVariables>> mAllVariables;
30 ::ll::TypedStorage<8, 88, ::std::array<::std::unique_ptr<::LayoutVariable>, 11>> mControlVariables;
31 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mOffset;
32 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mSize;
33 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMinSize;
34 ::ll::TypedStorage<8, 56, ::ui::LayoutOffset> mMaxSize;
35 ::ll::TypedStorage<4, 8, ::glm::vec2> mOffsetDelta;
36 ::ll::TypedStorage<4, 8, ::glm::vec2> mGridDimensions;
37 ::ll::TypedStorage<4, 8, ::glm::vec2> mDragPosition;
38 ::ll::TypedStorage<1, 1, ::ui::Draggable> mDraggable;
39 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorFrom;
40 ::ll::TypedStorage<1, 1, ::ui::AnchorPoint> mAnchorTo;
41 ::ll::TypedStorage<1, 1, ::ui::PriorityRule> mPriorityRule;
42 ::ll::TypedStorage<4, 4, int> mPriority;
43 bool mIsBeingDragged : 1;
45 bool mFollowsCursor : 1;
46 bool mFollowsCursorInsideParent : 1;
48 bool mInheritMaxSiblingWidth : 1;
49 bool mInheritMaxSiblingHeight : 1;
50 bool mIsDelayingLayout : 1;
51 bool mIsInitialized : 1;
57 virtual ~LayoutComponent() =
default;
59 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
61 virtual void reset() ;
63 virtual ::ComponentReceiveActionType receive(
64 ::VisualTree& visualTree,
65 ::ScreenInputContext& context,
66 ::UIAnimationController& animationController,
67 ::ScreenEvent
const& screenEvent
70 virtual void onNotifyChildAdded() ;
72 virtual void onAdded() ;
74 virtual void onRemoved() ;
80 MCAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
82 MCAPI
bool _isVariableIsSupported(::LayoutVariableType type)
const;
84 MCAPI
int _recursiveInitialize(
85 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
86 bool initializeInactive,
87 bool initializeTemplate
90 MCAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
92 MCAPI
void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes,
bool forceInvalidation);
94 MCAPI
int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables,
bool initializeInactive);
96 MCAPI
void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
98 MCAPI
void removeDeadDependencies();
100 MCAPI
void removeDependencies();
102 MCAPI
void setMaxSize(::ui::LayoutOffset
const& size);
104 MCAPI
void setMinSize(::ui::LayoutOffset
const& size);
106 MCAPI
void setOffset(::ui::LayoutOffset
const& offset);
108 MCAPI
void setOffsetDelta(::glm::vec2
const& offsetDelta, ::UIControl
const*
const primaryControl);
110 MCAPI
void setSize(::ui::LayoutOffset
const& size);
116 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
120 MCAPI ::ComponentReceiveActionType $receive(
121 ::VisualTree& visualTree,
122 ::ScreenInputContext& context,
123 ::UIAnimationController& animationController,
124 ::ScreenEvent
const& screenEvent
127 MCAPI
void $onNotifyChildAdded();
129 MCAPI
void $onAdded();
131 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 VisualTree.h:5
Definition ScreenEvent.h:5