3#include "mc/_HeaderOutputPredefine.h"
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"
27namespace mce {
class Color; }
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;
48 UIResolvedDef& operator=(UIResolvedDef
const&);
49 UIResolvedDef(UIResolvedDef
const&);
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
63 MCAPI ::Json::Value
const& _evaluate(::Json::Value
const& value,
bool forceExpressionEval)
const;
65 MCAPI
void _pushVariables();
67 MCAPI
void _validateProperty(::std::string_view name)
const;
69 MCAPI
void foreachMemberNames(::std::function<
void(::std::string_view)> predicate)
const;
71 MCAPI ::ui::AnchorPoint getAsAnchorPoint(::std::string_view key, ::ui::AnchorPoint defaultValue)
const;
73 MCAPI ::ui::AnimationType getAsAnimationType(::std::string_view key, ::ui::AnimationType defaultValue)
const;
75 MCAPI ::BindingCondition getAsBindingCondition(::std::string_view key)
const;
77 MCAPI ::BindingType getAsBindingType(::std::string_view key)
const;
79 MCAPI
bool getAsBool(::std::string_view key,
bool defaultValue)
const;
81 MCAPI uint getAsButtonId(::std::string_view key, uint defaultValue)
const;
83 MCAPI ::ui::ClipDirection getAsClipDirection(::std::string_view key, ::ui::ClipDirection defaultValue)
const;
85 MCAPI ::mce::Color getAsColor(::std::string_view key, ::mce::Color
const& defaultValue)
const;
87 MCAPI ::ui::Draggable getAsDraggable(::std::string_view key, ::ui::Draggable defaultValue)
const;
89 MCAPI
float getAsFloat(::std::string_view key,
float defaultValue)
const;
91 MCAPI ::ui::FontSize getAsFontSize(::std::string_view key, ::ui::FontSize defaultValue)
const;
93 MCAPI ::glm::ivec2 getAsGridSize(::std::string_view key, ::glm::ivec2
const& defaultValue)
const;
95 MCAPI
int getAsInt(::std::string_view key,
int defaultValue)
const;
97 MCAPI ::ui::LayoutOffset getAsLayoutSize(::std::string_view key, ::ui::LayoutOffset
const& defaultValue)
const;
99 MCAPI ::ui::OrientationType getAsOrientation(::std::string_view key, ::ui::OrientationType defaultValue)
const;
101 MCAPI ::ui::PriorityRule getAsPriorityRule(::std::string_view key, ::ui::PriorityRule defaultValue)
const;
103 MCAPI ::std::unique_ptr<::UIPropertyBag>
104 getAsPropertyBag(::std::string_view key, ::std::unique_ptr<::UIPropertyBag> defaultValue)
const;
106 MCAPI ::UiExpression getAsPropetyEvaluation(::std::string_view key)
const;
108 MCAPI ::glm::vec2 getAsSize(::std::string_view key, ::glm::vec2
const& defaultValue)
const;
110 MCAPI ::ui::SliceSize getAsSliceSize(::std::string_view key, ::ui::SliceSize
const& defaultValue)
const;
112 MCAPI ::SliderManagerBehavior getAsSliderManagerBehavior(::std::string_view key, ::SliderManagerBehavior)
const;
114 MCAPI ::std::string getAsString(::std::string_view key, ::std::string_view defaultValue)
const;
116 MCAPI ::std::vector<::std::string>
117 getAsStringVector(::std::string_view key, ::std::vector<::std::string>
const& defaultValue)
const;
119 MCAPI ::ui::TextAlignment getAsTextAlignment(::std::string_view key, ::ui::TextAlignment defaultValue)
const;
121 MCAPI ::std::string getAsTextureString()
const;
123 MCAPI ::ToggleManagerBehavior getAsToggleManagerBehavior(::std::string_view key, ::ToggleManagerBehavior)
const;
125 MCAPI ::glm::vec2 getAsUV(::std::string_view key, ::glm::vec2
const& defaultValue)
const;
127 MCAPI ::UIDefType getDefType()
const;
129 MCAPI ::Json::Value
const& getValue(::std::string_view key,
bool forceExpressionEval)
const;
131 MCAPI
bool hasValue(::std::string_view key)
const;
133 MCAPI ~UIResolvedDef();
139 MCAPI static ::std::string
140 _replaceVarsInRefString(::std::string_view refString, ::std::vector<::Json::Value*>* variablesStack);
142 MCAPI static ::UIResolvedDef create(
143 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> defRepo,
144 ::std::vector<::Json::Value*>* variablesStack,
145 ::std::string_view currNamespace,
146 ::std::string_view name
149 MCAPI static ::UIResolvedDef createWithDef(
150 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> defRepo,
151 ::std::vector<::Json::Value*>* variablesStack,
152 ::std::string_view currNamespace,
153 ::Json::Value
const& def
156 MCAPI static ::Json::Value evaluate(
157 ::Json::Value
const& value,
158 ::std::vector<::Json::Value*>
const& variablesStack,
159 ::Json::Value
const* optionalLocalStack
162 MCAPI
static void parseName(
163 ::std::string_view input,
164 ::std::string& outName,
165 ::std::string& outNamespace,
166 ::std::string& outRef,
167 ::std::vector<::Json::Value*>* variablesStack
174 MCAPI static ::UIResolvedDef& mNull();
181 ::std::vector<::Json::Value*>* variablesStack,
182 ::std::string_view defNamespace,
183 ::std::string_view defName,
184 ::Json::Value
const& baseVal,
185 ::Json::Value
const& overrideVal
Definition IUIDefRepository.h:5
Definition UIPropertyBag.h:5
Definition UIResolvedDef.h:5
Definition UiExpression.h:5
Definition LayoutOffset.h:7