LeviLamina
Loading...
Searching...
No Matches
LayoutVariable.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/screens/LayoutVariableStringType.h"
8#include "mc/client/gui/screens/LayoutVariableType.h"
9
10// auto generated forward declare list
11// clang-format off
12class LayoutRule;
13class UIControl;
14class VariableRef;
15struct PostOperation;
16// clang-format on
17
18class LayoutVariable {
19public:
20 // LayoutVariable inner types declare
21 // clang-format off
22 struct RuleValue;
23 struct MinMaxRuleValue;
24 // clang-format on
25
26 // LayoutVariable inner types define
27 struct RuleValue {};
28
29 struct MinMaxRuleValue {};
30
31public:
32 // member variables
33 // NOLINTBEGIN
34 ::ll::TypedStorage<8, 8, ::UIControl&> mControl;
35 ::ll::TypedStorage<8, 24, ::std::vector<::VariableRef>> mDependsOnMe;
36 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mRuleValue;
37 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LayoutVariable::MinMaxRuleValue>> mMinMaxValue;
38 ::ll::TypedStorage<1, 1, ::LayoutVariableType> mType;
39 bool mIsSatisfied : 1;
40 bool mIsOverriden : 1;
41 // NOLINTEND
42
43public:
44 // prevent constructor by default
45 LayoutVariable& operator=(LayoutVariable const&);
46 LayoutVariable(LayoutVariable const&);
47 LayoutVariable();
48
49public:
50 // member functions
51 // NOLINTBEGIN
52 MCAPI void _addDependsOnMeEntriesForInvalidation(bool checkForDuplicates);
53
54 MCAPI float _getMaxSiblingValue() const;
55
56 MCAPI ::LayoutRule& _getOrCreateMaxRule();
57
58 MCAPI ::LayoutRule& _getOrCreateMinRule();
59
60 MCAPI void _initialize(bool checkForDuplicates);
61
62 MCAPI void _invalidate(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
63
64 MCAPI void
65 _invalidateDependencies(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
66
67 MCAPI void addPostComputationalNeeds(::std::vector<::PostOperation>& postOperations, ::VariableRef& var);
68
69 MCAPI bool isSatisfiable() const;
70
71 MCAPI void overrideGridLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
72
73 MCAPI void overrideRenderableLayoutRule(::UIControl& control, ::LayoutVariableType type);
74
75 MCAPI void overrideStackPanelLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
76
77 MCAPI void removeDeadDependencies();
78
79 MCAPI ::ui::DirtyFlag satisfy();
80
81 MCAPI void setOverrideValue(float inValue);
82
83 MCAPI void setRelativeLayoutRule(::UIControl& control, ::UIControl& relativeTo, ::LayoutVariableType type);
84
85 MCAPI void setStackPanelItemLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
86
87 MCAPI ::std::string toString(::LayoutVariableStringType type) const;
88 // NOLINTEND
89};
Definition LayoutRule.h:5
Definition LayoutVariable.h:5
Definition UIControl.h:5
Definition VariableRef.h:5
Definition LayoutVariable.h:16
Definition LayoutVariable.h:14
Definition PostOperation.h:5