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/LayoutRule.h"
8#include "mc/client/gui/screens/LayoutVariableStringType.h"
9#include "mc/client/gui/screens/LayoutVariableType.h"
10
11// auto generated forward declare list
12// clang-format off
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 public:
29 // member variables
30 // NOLINTBEGIN
31 ::ll::TypedStorage<4, 4, float> mValue;
32 ::ll::TypedStorage<8, 24, ::LayoutRule> mRule;
33 // NOLINTEND
34 };
35
36 struct MinMaxRuleValue {
37 public:
38 // member variables
39 // NOLINTBEGIN
40 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mMinValue;
41 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mMaxValue;
42 // NOLINTEND
43 };
44
45public:
46 // member variables
47 // NOLINTBEGIN
48 ::ll::TypedStorage<8, 8, ::UIControl&> mControl;
49 ::ll::TypedStorage<8, 24, ::std::vector<::VariableRef>> mDependsOnMe;
50 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mRuleValue;
51 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LayoutVariable::MinMaxRuleValue>> mMinMaxValue;
52 ::ll::TypedStorage<1, 1, ::LayoutVariableType> mType;
53 bool mIsSatisfied : 1;
54 bool mIsOverriden : 1;
55 // NOLINTEND
56
57public:
58 // prevent constructor by default
59 LayoutVariable& operator=(LayoutVariable const&);
60 LayoutVariable(LayoutVariable const&);
61 LayoutVariable();
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI LayoutVariable(::UIControl& control, ::LayoutVariableType type);
67
68 MCAPI void _addDependsOnMeEntriesForInvalidation(bool checkForDuplicates);
69
70 MCAPI void _clearSatisfied();
71
72 MCAPI float _getMaxSiblingValue() const;
73
74 MCAPI void _initialize(bool checkForDuplicates);
75
76 MCAPI void _invalidate(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
77
78 MCAPI void
79 _invalidateDependencies(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
80
81 MCAPI void _removeDependsOnMeEntries();
82
83 MCAPI void addPostComputationalNeeds(::std::vector<::PostOperation>& postOperations, ::VariableRef& var);
84
85 MCAPI void clearOverrideValue();
86
87 MCAPI void initialize();
88
89 MCAPI bool isSatisfiable() const;
90
91 MCAPI void overrideGridLayoutRule(::UIControl& control, ::UIControl& type, ::LayoutVariableType);
92
93 MCAPI void overrideRenderableLayoutRule(::UIControl& control, ::LayoutVariableType type);
94
95 MCAPI void overrideStackPanelLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
96
97 MCAPI void removeDeadDependencies();
98
99 MCAPI void removeDependencies();
100
101 MCAPI ::ui::DirtyFlag satisfy();
102
103 MCAPI void setGridItemLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
104
105 MCAPI void setOverrideValue(float inValue);
106
107 MCAPI void setRelativeLayoutRule(::UIControl& control, ::UIControl& relativeTo, ::LayoutVariableType type);
108
109 MCAPI void setStackPanelItemLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
110
111 MCAPI ::std::string toString(::LayoutVariableStringType type) const;
112
113 MCAPI ~LayoutVariable();
114 // NOLINTEND
115
116public:
117 // constructor thunks
118 // NOLINTBEGIN
119 MCAPI void* $ctor(::UIControl& control, ::LayoutVariableType type);
120 // NOLINTEND
121
122public:
123 // destructor thunk
124 // NOLINTBEGIN
125 MCAPI void $dtor();
126 // NOLINTEND
127};
Definition LayoutVariable.h:5
Definition UIControl.h:5
Definition VariableRef.h:5
Definition LayoutVariable.h:16
Definition LayoutVariable.h:14
Definition PostOperation.h:5