Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI ::std::shared_ptr<::LayoutVariables> _getLayoutVariables();
81
82 MCNAPI bool _isVariableIsSupported(::LayoutVariableType type) const;
83
85 ::std::shared_ptr<::LayoutVariables>& layoutVariables,
86 bool initializeInactive,
87 bool initializeTemplate
88 );
89
90 MCNAPI ::LayoutVariable* getVariable(::LayoutVariableType type);
91
92 MCNAPI void layout(::std::initializer_list<::LayoutVariableType> invalidateVariableTypes, bool forceInvalidation);
93
94 MCNAPI int recursiveInitialize(::std::shared_ptr<::LayoutVariables>& layoutVariables, bool initializeInactive);
95
96 MCNAPI void reinitialize(::std::initializer_list<::LayoutVariableType> variableTypes);
97
99
100 MCNAPI void removeDependencies();
101
102 MCNAPI void setMaxSize(::ui::LayoutOffset const& size);
103
104 MCNAPI void setMinSize(::ui::LayoutOffset const& size);
105
106 MCNAPI void setOffset(::ui::LayoutOffset const& offset);
107
108 MCNAPI void setOffsetDelta(::glm::vec2 const& offsetDelta, ::UIControl const* const primaryControl);
109
110 MCNAPI void setSize(::ui::LayoutOffset const& size);
111 // NOLINTEND
112
113public:
114 // virtual function thunks
115 // NOLINTBEGIN
116 MCNAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
117
118 MCNAPI void $reset();
119
120 MCNAPI ::ComponentReceiveActionType $receive(
121 ::VisualTree& visualTree,
123 ::UIAnimationController& animationController,
124 ::ScreenEvent const& screenEvent
125 );
126
127 MCNAPI void $onNotifyChildAdded();
128
129 MCNAPI void $onAdded();
130
131 MCNAPI void $onRemoved();
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCNAPI static void** $vftable();
138 // NOLINTEND
139};
Definition LayoutComponent.h:5
MCAPI void setSize(::ui::LayoutOffset const &size)
MCAPI bool _isVariableIsSupported(::LayoutVariableType type) const
MCAPI int recursiveInitialize(::std::shared_ptr<::LayoutVariables > &layoutVariables, bool initializeInactive)
MCAPI void $onAdded()
MCAPI void layout(::std::initializer_list<::LayoutVariableType > invalidateVariableTypes, bool forceInvalidation)
MCAPI ::std::shared_ptr<::LayoutVariables > _getLayoutVariables()
MCAPI void removeDeadDependencies()
MCAPI void removeDependencies()
MCAPI void $reset()
MCAPI ::std::unique_ptr<::UIComponent > $clone(::UIControl &cloneOwner) const
MCAPI void setMinSize(::ui::LayoutOffset const &size)
MCAPI::LayoutVariable * getVariable(::LayoutVariableType type)
static MCAPI void ** $vftable()
MCAPI int _recursiveInitialize(::std::shared_ptr<::LayoutVariables > &layoutVariables, bool initializeInactive, bool initializeTemplate)
MCAPI void setOffset(::ui::LayoutOffset const &offset)
MCAPI void setOffsetDelta(::glm::vec2 const &offsetDelta, ::UIControl const *const primaryControl)
MCAPI::ComponentReceiveActionType $receive(::VisualTree &visualTree, ::ScreenInputContext &context, ::UIAnimationController &animationController, ::ScreenEvent const &screenEvent)
MCAPI void $onRemoved()
MCAPI void reinitialize(::std::initializer_list<::LayoutVariableType > variableTypes)
MCAPI void $onNotifyChildAdded()
MCAPI void setMaxSize(::ui::LayoutOffset const &size)
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
Definition context.h:5
Definition LayoutOffset.h:7