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;
15// clang-format on
16
17class LayoutVariable {
18public:
19 // LayoutVariable inner types declare
20 // clang-format off
21 struct RuleValue;
22 struct MinMaxRuleValue;
23 // clang-format on
24
25 // LayoutVariable inner types define
26 struct RuleValue {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 4, float> mValue;
31 ::ll::TypedStorage<8, 24, ::LayoutRule> mRule;
32 // NOLINTEND
33 };
34
35 struct MinMaxRuleValue {
36 public:
37 // member variables
38 // NOLINTBEGIN
39 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mMinValue;
40 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mMaxValue;
41 // NOLINTEND
42 };
43
44public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 8, ::UIControl&> mControl;
48 ::ll::TypedStorage<8, 24, ::std::vector<::VariableRef>> mDependsOnMe;
49 ::ll::TypedStorage<8, 32, ::LayoutVariable::RuleValue> mRuleValue;
50 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::LayoutVariable::MinMaxRuleValue>> mMinMaxValue;
51 ::ll::TypedStorage<1, 1, ::LayoutVariableType> mType;
52 bool mIsSatisfied : 1;
53 bool mIsOverriden : 1;
54 // NOLINTEND
55
56public:
57 // prevent constructor by default
58 LayoutVariable& operator=(LayoutVariable const&);
59 LayoutVariable(LayoutVariable const&);
60 LayoutVariable();
61
62public:
63 // member functions
64 // NOLINTBEGIN
65 MCAPI float _getMaxSiblingValue() const;
66
67 MCAPI void _initialize(bool checkForDuplicates);
68
69 MCAPI void _invalidate(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
70
71 MCAPI void
72 _invalidateDependencies(::std::function<void(::VariableRef const&)> invalidCallback, bool forceInvalidation);
73
74 MCAPI bool isSatisfiable() const;
75
76 MCAPI void overrideRenderableLayoutRule(::UIControl& control, ::LayoutVariableType type);
77
78 MCAPI void removeDeadDependencies();
79
80 MCAPI void removeDependencies();
81
82 MCAPI ::ui::DirtyFlag satisfy();
83
84 MCAPI void setOverrideValue(float inValue);
85
86 MCAPI void setRelativeLayoutRule(::UIControl& control, ::UIControl& relativeTo, ::LayoutVariableType const type);
87
88 MCAPI ::std::string toString(::LayoutVariableStringType type) const;
89
90 MCAPI ~LayoutVariable();
91 // NOLINTEND
92
93public:
94 // destructor thunk
95 // NOLINTBEGIN
96 MCAPI void $dtor();
97 // NOLINTEND
98};
Definition LayoutVariable.h:5
Definition UIControl.h:5
Definition VariableRef.h:5
Definition LayoutVariable.h:16
Definition LayoutVariable.h:14