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/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"
13
14// auto generated forward declare list
15// clang-format off
16class LayoutVariable;
17class LayoutVariables;
20class UIControl;
21class VariableRef;
22class VisualTree;
23struct ScreenEvent;
24// clang-format on
25
26class LayoutComponent : public ::UIComponent {
27public:
28 // member variables
29 // NOLINTBEGIN
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;
45 bool mContained : 1;
46 bool mFollowsCursor : 1;
47 bool mFollowsCursorInsideParent : 1;
48 bool mActive : 1;
49 bool mInheritMaxSiblingWidth : 1;
50 bool mInheritMaxSiblingHeight : 1;
51 bool mIsDelayingLayout : 1;
52 bool mIsInitialized : 1;
53 // NOLINTEND
54
55public:
56 // virtual functions
57 // NOLINTBEGIN
58 virtual ~LayoutComponent() /*override*/ = default;
59
60 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
61
62 virtual void reset() /*override*/;
63
64 virtual ::ComponentReceiveActionType receive(
65 ::VisualTree& visualTree,
66 ::ScreenInputContext& context,
67 ::UIAnimationController& animationController,
68 ::ScreenEvent const& screenEvent
69 ) /*override*/;
70
71 virtual void onNotifyChildAdded() /*override*/;
72
73 virtual void onAdded() /*override*/;
74
75 virtual void onRemoved() /*override*/;
76 // NOLINTEND
77
78public:
79 // member functions
80 // NOLINTBEGIN
81 MCAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
82
83 MCAPI void _initialize(::std::shared_ptr<::LayoutVariables>& layoutVariables, bool initializeInactive);
84
85 MCAPI void _initializeVariables();
86
87 MCAPI int _recursiveInitialize(
88 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
89 bool initializeInactive,
90 bool initializeTemplate
91 );
92
93 MCAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
94
95 MCAPI void invalidateVariableDependencies(::VariableRef& var, bool forceInvalidation);
96
97 MCAPI void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes, bool forceInvalidation);
98
99 MCAPI int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables, bool initializeInactive);
100
101 MCAPI void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
102
103 MCAPI void removeDependencies();
104
105 MCAPI void setOffset(::ui::LayoutOffset const& offset);
106
107 MCAPI void setOffsetDelta(::glm::vec2 const& offsetDelta, ::UIControl const* const primaryControl);
108
109 MCAPI void setSize(::ui::LayoutOffset const& size);
110
111 MCAPI void setVariableOverrideValue(::LayoutVariableType type, float value);
112 // NOLINTEND
113
114public:
115 // virtual function thunks
116 // NOLINTBEGIN
117 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
118
119 MCAPI void $reset();
120
121 MCAPI ::ComponentReceiveActionType $receive(
122 ::VisualTree& visualTree,
123 ::ScreenInputContext& context,
124 ::UIAnimationController& animationController,
125 ::ScreenEvent const& screenEvent
126 );
127
128 MCAPI void $onNotifyChildAdded();
129
130 MCAPI void $onAdded();
131
132 MCAPI void $onRemoved();
133 // NOLINTEND
134
135public:
136 // vftables
137 // NOLINTBEGIN
138 MCNAPI static void** $vftable();
139 // NOLINTEND
140};
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