Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
UIResolvedDef.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/AnimationType.h"
8#include "mc/client/gui/ClipDirection.h"
9#include "mc/client/gui/Draggable.h"
10#include "mc/client/gui/FontSize.h"
11#include "mc/client/gui/OrientationType.h"
12#include "mc/client/gui/PriorityRule.h"
13#include "mc/client/gui/TextAlignment.h"
14#include "mc/client/gui/UIDefType.h"
15#include "mc/client/gui/controls/BindingCondition.h"
16#include "mc/client/gui/controls/BindingType.h"
17#include "mc/client/gui/controls/SliderManagerBehavior.h"
18#include "mc/client/gui/controls/ToggleManagerBehavior.h"
19#include "mc/deps/core/utility/NonOwnerPointer.h"
20#include "mc/deps/json/Value.h"
21
22// auto generated forward declare list
23// clang-format off
25class UIPropertyBag;
26class UiExpression;
27class Vec2;
28namespace mce { class Color; }
29namespace ui { struct SliceSize; }
30// clang-format on
31
32class UIResolvedDef {
33public:
34 // member variables
35 // NOLINTBEGIN
36 ::ll::TypedStorage<1, 1, bool> mIgnored;
37 ::ll::TypedStorage<8, 32, ::std::string const> mDefNamespace;
38 ::ll::TypedStorage<8, 32, ::std::string const> mDefName;
39 ::ll::TypedStorage<8, 8, ::Json::Value const&> mBaseVal;
40 ::ll::TypedStorage<8, 8, ::Json::Value const&> mOverrideVal;
41 ::ll::TypedStorage<8, 16, ::Json::Value> mVariables;
42 ::ll::TypedStorage<8, 8, ::std::vector<::Json::Value*>*> mVariablesStack;
43 ::ll::TypedStorage<8, 16, ::std::set<::std::string, ::std::less<void>>> mUnvalidatedProperties;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 UIResolvedDef& operator=(UIResolvedDef const&);
49 UIResolvedDef(UIResolvedDef const&);
50 UIResolvedDef();
51
52public:
53 // member functions
54 // NOLINTBEGIN
56 ::std::vector<::Json::Value*>* variablesStack,
57 ::std::string_view defNamespace,
58 ::std::string_view defName,
59 ::Json::Value const& baseVal,
60 ::Json::Value const& overrideVal
61 );
62
63 MCNAPI ::Json::Value const& _evaluate(::Json::Value const& value, bool forceExpressionEval) const;
64
65 MCNAPI void _validateProperty(::std::string_view name) const;
66
67 MCNAPI void foreachMemberNames(::std::function<void(::std::string_view)> predicate) const;
68
69 MCNAPI ::ui::AnchorPoint getAsAnchorPoint(::std::string_view key, ::ui::AnchorPoint defaultValue) const;
70
71 MCNAPI ::ui::AnimationType getAsAnimationType(::std::string_view key, ::ui::AnimationType defaultValue) const;
72
73 MCNAPI ::BindingCondition getAsBindingCondition(::std::string_view key) const;
74
75 MCNAPI ::BindingType getAsBindingType(::std::string_view key) const;
76
77 MCNAPI uint getAsButtonId(::std::string_view key, uint defaultValue) const;
78
79 MCNAPI ::ui::ClipDirection getAsClipDirection(::std::string_view key, ::ui::ClipDirection defaultValue) const;
80
81 MCNAPI ::Vec2 getAsClipOffset(::std::string_view key) const;
82
83 MCNAPI ::mce::Color getAsColor(::std::string_view key, ::mce::Color const& defaultValue) const;
84
85 MCNAPI ::ui::Draggable getAsDraggable(::std::string_view key, ::ui::Draggable defaultValue) const;
86
87 MCNAPI ::ui::FontSize getAsFontSize(::std::string_view key, ::ui::FontSize defaultValue) const;
88
89 MCNAPI ::glm::ivec2 getAsGridSize(::std::string_view key, ::glm::ivec2 const& defaultValue) const;
90
91 MCNAPI ::ui::OrientationType getAsOrientation(::std::string_view key, ::ui::OrientationType defaultValue) const;
92
93 MCNAPI ::ui::PriorityRule getAsPriorityRule(::std::string_view key, ::ui::PriorityRule defaultValue) const;
94
95 MCNAPI ::std::unique_ptr<::UIPropertyBag>
96 getAsPropertyBag(::std::string_view key, ::std::unique_ptr<::UIPropertyBag> defaultValue) const;
97
98 MCNAPI ::UiExpression getAsPropetyEvaluation(::std::string_view key) const;
99
100 MCNAPI ::glm::vec2 getAsSize(::std::string_view key, ::glm::vec2 const& defaultValue) const;
101
102 MCNAPI ::ui::SliceSize getAsSliceSize(::std::string_view key, ::ui::SliceSize const& defaultValue) const;
103
104 MCNAPI ::SliderManagerBehavior getAsSliderManagerBehavior(::std::string_view key, ::SliderManagerBehavior) const;
105
106 MCNAPI ::std::string getAsString(::std::string_view key, ::std::string_view defaultValue) const;
107
108 MCNAPI ::std::vector<::std::string>
109 getAsStringVector(::std::string_view key, ::std::vector<::std::string> const& defaultValue) const;
110
111 MCNAPI ::ui::TextAlignment getAsTextAlignment(::std::string_view key, ::ui::TextAlignment defaultValue) const;
112
113 MCNAPI ::std::string getAsTextureString() const;
114
115 MCNAPI ::ToggleManagerBehavior getAsToggleManagerBehavior(::std::string_view key, ::ToggleManagerBehavior) const;
116
117 MCNAPI ::glm::vec2 getAsUV(::std::string_view key, ::glm::vec2 const& defaultValue) const;
118
119 MCNAPI ::glm::vec2 getAsUVSize(::std::string_view key, ::glm::vec2 const& defaultValue) const;
120
121 MCNAPI ::UIDefType getDefType() const;
122
123 MCNAPI ::Json::Value const& getValue(::std::string_view key, bool forceExpressionEval) const;
124
125 MCNAPI bool hasValue(::std::string_view key) const;
126
128 // NOLINTEND
129
130public:
131 // static functions
132 // NOLINTBEGIN
133 MCNAPI static ::UIResolvedDef create(
134 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> defRepo,
135 ::std::vector<::Json::Value*>* variablesStack,
136 ::std::string_view currNamespace,
137 ::std::string_view name
138 );
139
140 MCNAPI static ::UIResolvedDef createWithDef(
141 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> defRepo,
142 ::std::vector<::Json::Value*>* variablesStack,
143 ::std::string_view currNamespace,
144 ::Json::Value const& def
145 );
146
147 MCNAPI static ::Json::Value evaluate(
148 ::Json::Value const& value,
149 ::std::vector<::Json::Value*> const& variablesStack,
150 ::Json::Value const* optionalLocalStack
151 );
152
153 MCNAPI static void parseName(
154 ::std::string_view input,
155 ::std::string& outName,
156 ::std::string& outNamespace,
157 ::std::string& outRef,
158 ::std::vector<::Json::Value*>* variablesStack
159 );
160 // NOLINTEND
161
162public:
163 // static variables
164 // NOLINTBEGIN
165 MCNAPI static ::UIResolvedDef& mNull();
166 // NOLINTEND
167
168public:
169 // constructor thunks
170 // NOLINTBEGIN
171 MCNAPI void* $ctor(
172 ::std::vector<::Json::Value*>* variablesStack,
173 ::std::string_view defNamespace,
174 ::std::string_view defName,
175 ::Json::Value const& baseVal,
176 ::Json::Value const& overrideVal
177 );
178 // NOLINTEND
179
180public:
181 // destructor thunk
182 // NOLINTBEGIN
183 MCNAPI void $dtor();
184 // NOLINTEND
185};
Definition IUIDefRepository.h:5
Definition Value.h:16
Definition UIPropertyBag.h:5
Definition UIResolvedDef.h:5
MCAPI::ui::AnchorPoint getAsAnchorPoint(::std::string_view key, ::ui::AnchorPoint defaultValue) const
MCAPI::BindingType getAsBindingType(::std::string_view key) const
MCAPI::ui::FontSize getAsFontSize(::std::string_view key, ::ui::FontSize defaultValue) const
static MCAPI ::UIResolvedDef createWithDef(::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const > defRepo, ::std::vector<::Json::Value * > *variablesStack, ::std::string_view currNamespace, ::Json::Value const &def)
MCAPI::Json::Value const & getValue(::std::string_view key, bool forceExpressionEval) const
MCAPI::glm::vec2 getAsUVSize(::std::string_view key, ::glm::vec2 const &defaultValue) const
MCAPI uint getAsButtonId(::std::string_view key, uint defaultValue) const
MCAPI bool hasValue(::std::string_view key) const
MCAPI::UIDefType getDefType() const
MCAPI::mce::Color getAsColor(::std::string_view key, ::mce::Color const &defaultValue) const
MCAPI UIResolvedDef(::std::vector<::Json::Value * > *variablesStack, ::std::string_view defNamespace, ::std::string_view defName, ::Json::Value const &baseVal, ::Json::Value const &overrideVal)
MCAPI void $dtor()
static MCAPI ::Json::Value evaluate(::Json::Value const &value, ::std::vector<::Json::Value * > const &variablesStack, ::Json::Value const *optionalLocalStack)
MCAPI::ui::ClipDirection getAsClipDirection(::std::string_view key, ::ui::ClipDirection defaultValue) const
static MCAPI ::UIResolvedDef & mNull()
MCAPI::ui::TextAlignment getAsTextAlignment(::std::string_view key, ::ui::TextAlignment defaultValue) const
MCAPI void * $ctor(::std::vector<::Json::Value * > *variablesStack, ::std::string_view defNamespace, ::std::string_view defName, ::Json::Value const &baseVal, ::Json::Value const &overrideVal)
MCAPI::glm::vec2 getAsUV(::std::string_view key, ::glm::vec2 const &defaultValue) const
MCAPI::ui::Draggable getAsDraggable(::std::string_view key, ::ui::Draggable defaultValue) const
MCAPI::glm::ivec2 getAsGridSize(::std::string_view key, ::glm::ivec2 const &defaultValue) const
MCAPI void _validateProperty(::std::string_view name) const
MCAPI::BindingCondition getAsBindingCondition(::std::string_view key) const
static MCAPI ::UIResolvedDef create(::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const > defRepo, ::std::vector<::Json::Value * > *variablesStack, ::std::string_view currNamespace, ::std::string_view name)
MCAPI::std::string getAsTextureString() const
MCAPI ~UIResolvedDef()
MCAPI::ui::SliceSize getAsSliceSize(::std::string_view key, ::ui::SliceSize const &defaultValue) const
MCAPI::Vec2 getAsClipOffset(::std::string_view key) const
MCAPI ::std::unique_ptr<::UIPropertyBag > getAsPropertyBag(::std::string_view key, ::std::unique_ptr<::UIPropertyBag > defaultValue) const
MCAPI::SliderManagerBehavior getAsSliderManagerBehavior(::std::string_view key, ::SliderManagerBehavior) const
MCAPI::ToggleManagerBehavior getAsToggleManagerBehavior(::std::string_view key, ::ToggleManagerBehavior) const
MCAPI::UiExpression getAsPropetyEvaluation(::std::string_view key) const
MCAPI::std::string getAsString(::std::string_view key, ::std::string_view defaultValue) const
MCAPI::ui::PriorityRule getAsPriorityRule(::std::string_view key, ::ui::PriorityRule defaultValue) const
MCAPI::glm::vec2 getAsSize(::std::string_view key, ::glm::vec2 const &defaultValue) const
MCAPI::ui::AnimationType getAsAnimationType(::std::string_view key, ::ui::AnimationType defaultValue) const
MCAPI void foreachMemberNames(::std::function< void(::std::string_view)> predicate) const
MCAPI::ui::OrientationType getAsOrientation(::std::string_view key, ::ui::OrientationType defaultValue) const
MCAPI ::std::vector<::std::string > getAsStringVector(::std::string_view key, ::std::vector<::std::string > const &defaultValue) const
static MCAPI void parseName(::std::string_view input, ::std::string &outName, ::std::string &outNamespace, ::std::string &outRef, ::std::vector<::Json::Value * > *variablesStack)
MCAPI::Json::Value const & _evaluate(::Json::Value const &value, bool forceExpressionEval) const
Definition UiExpression.h:5
Definition Vec2.h:5
Definition Color.h:13
Definition SliceSize.h:7