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 public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI ~MinMaxRuleValue();
48 // NOLINTEND
49
50 public:
51 // destructor thunk
52 // NOLINTBEGIN
53 MCAPI void $dtor();
54 // NOLINTEND
55 };
56
57public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<8, 8, ::UIControl&> mControl;
61 ::ll::TypedStorage<8, 24, ::std::vector<::VariableRef>> mDependsOnMe;
62 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mRuleValue;
63 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LayoutVariable::MinMaxRuleValue>> mMinMaxValue;
64 ::ll::TypedStorage<1, 1, ::LayoutVariableType> mType;
65 bool mIsSatisfied : 1;
66 bool mIsOverriden : 1;
67 // NOLINTEND
68
69public:
70 // prevent constructor by default
71 LayoutVariable& operator=(LayoutVariable const&);
72 LayoutVariable(LayoutVariable const&);
73 LayoutVariable();
74
75public:
76 // member functions
77 // NOLINTBEGIN
78 MCAPI void _addDependsOnMeEntriesForInvalidation(bool checkForDuplicates);
79
80 MCAPI float _getMaxSiblingValue() const;
81
82 MCAPI ::LayoutRule& _getOrCreateMaxRule();
83
84 MCAPI ::LayoutRule& _getOrCreateMinRule();
85
86 MCAPI void _initialize(bool checkForDuplicates);
87
88 MCAPI void _invalidate(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
89
90 MCAPI void
91 _invalidateDependencies(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
92
93 MCAPI void addPostComputationalNeeds(::std::vector<::PostOperation>& postOperations, ::VariableRef& var);
94
95 MCAPI bool isSatisfiable() const;
96
97 MCAPI void overrideGridLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
98
99 MCAPI void overrideRenderableLayoutRule(::UIControl& control, ::LayoutVariableType type);
100
101 MCAPI void overrideStackPanelLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
102
103 MCAPI void removeDeadDependencies();
104
105 MCAPI ::ui::DirtyFlag satisfy();
106
107 MCAPI void setOverrideValue(float inValue);
108
109 MCAPI void setRelativeLayoutRule(::UIControl& control, ::UIControl& relativeTo, ::LayoutVariableType type);
110
111 MCAPI void setStackPanelItemLayoutRule(::UIControl& control, ::UIControl& parent, ::LayoutVariableType type);
112
113 MCAPI ::std::string toString(::LayoutVariableStringType type) const;
114 // NOLINTEND
115};
Definition LayoutVariable.h:5
Definition UIControl.h:5
Definition VariableRef.h:5
Definition LayoutVariable.h:16
Definition LayoutVariable.h:14
Definition PostOperation.h:5