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