Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
DataDrivenUIRepository.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/NonOwnerPointer.h"
7#include "mc/resources/IStyleTextureInfoProvider.h"
8#include "mc/resources/ResourcePackListener.h"
9#include "mc/resources/interface/IDataDrivenUIRepository.h"
10
11// auto generated forward declare list
12// clang-format off
18namespace Bedrock::PubSub { class Subscription; }
19namespace PuvLoadData { struct TelemetryEventData; }
20namespace SharedTypes::Beta::DataDrivenUI::Styling { struct Style; }
21namespace SharedTypes::v1_21_130::DataDrivenUI { struct ContainerFixedGridLayout; }
22namespace SharedTypes::v1_21_130::DataDrivenUI { struct ContainerLayout; }
23namespace SharedTypes::v1_21_130::DataDrivenUI { struct ContainerTextField; }
24namespace SharedTypes::v1_21_130::DataDrivenUI { struct Context; }
25namespace SharedTypes::v1_21_130::DataDrivenUI { struct ContextList; }
26namespace SharedTypes::v1_21_130::DataDrivenUI { struct ExtensionPoint; }
27namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormButton; }
28namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormCloseButton; }
29namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormDivider; }
30namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormDropdown; }
31namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormHorizontalStack; }
32namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormImage; }
33namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormPanel; }
34namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormScrollView; }
35namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormSlider; }
36namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormSpacing; }
37namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormSwitch; }
38namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormText; }
39namespace SharedTypes::v1_21_130::DataDrivenUI { struct FormTextField; }
40namespace SharedTypes::v1_21_130::DataDrivenUI { struct Panel; }
41namespace SharedTypes::v1_21_130::DataDrivenUI { struct PanelCloseButton; }
42namespace SharedTypes::v1_21_130::DataDrivenUI { struct PanelDecoration; }
43namespace SharedTypes::v1_21_130::DataDrivenUI { struct PanelSpacing; }
44namespace SharedTypes::v1_21_130::DataDrivenUI { struct PanelText; }
45namespace SharedTypes::v1_21_130::DataDrivenUI { struct ScrollableGridLayout; }
46namespace SharedTypes::v1_21_130::DataDrivenUI { struct UIComposition; }
47namespace SharedTypes::v1_21_130::DataDrivenUI { struct UIRoot; }
48namespace SharedTypes::v1_21_130::DataDrivenUI { struct Visibility; }
49namespace mce { class UUID; }
51// clang-format on
52
53class DataDrivenUIRepository : public ::IDataDrivenUIRepository, public ::ResourcePackListener {
54public:
55 // member variables
56 // NOLINTBEGIN
73 // NOLINTEND
74
75public:
76 // prevent constructor by default
77 DataDrivenUIRepository& operator=(DataDrivenUIRepository const&);
78 DataDrivenUIRepository(DataDrivenUIRepository const&);
79 DataDrivenUIRepository();
80
81public:
82 // virtual functions
83 // NOLINTBEGIN
84 virtual ~DataDrivenUIRepository() /*override*/ = default;
85
86 virtual void setStyleTextureInfoProvider(::IStyleTextureInfoProvider& styleTextureInfoProvider) /*override*/;
87
88 virtual void onActiveResourcePacksChanged(::ResourcePackManager&) /*override*/;
89
90 virtual void onJsonResourcesChanged(::ResourcePackManager& resourcePackManager) /*override*/;
91
92 virtual void load(::ResourcePackManager const& resourcePackManager, bool const betaApis) /*override*/;
93
94 virtual bool hasRootDefinition(::std::string const& identifier) const /*override*/;
95
96 virtual ::std::vector<::std::variant<
97 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerFixedGridLayout>,
98 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerTextField>,
99 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ExtensionPoint>,
100 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormButton>,
101 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormCloseButton>,
102 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDivider>,
103 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDropdown>,
104 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormImage>,
105 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormScrollView>,
106 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSlider>,
107 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSpacing>,
108 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSwitch>,
109 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormText>,
110 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormTextField>,
111 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelCloseButton>,
112 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelDecoration>,
113 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelSpacing>,
114 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContextList>,
115 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ScrollableGridLayout>,
116 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelText>,
117 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Visibility>,
118 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormHorizontalStack>>> const&
119 getComposition(::std::string const& identifier) const /*override*/;
120
121 virtual ::mce::UUID const& getCompositionPackId(::std::string const& identifier) const /*override*/;
122
123 virtual ::std::vector<::std::variant<
124 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerLayout>,
125 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Context>,
126 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormPanel>,
127 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Panel>>> const&
128 getRoot(::std::string const& identifier) const /*override*/;
129
130 virtual ::mce::UUID const& getRootPackId(::std::string const& identifier) const /*override*/;
131
132 virtual void getStyles(::std::vector<::SharedTypes::Beta::DataDrivenUI::Styling::Style>& styles) const /*override*/;
133
134 virtual ::std::vector<::std::variant<
135 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerFixedGridLayout>,
136 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerTextField>,
137 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ExtensionPoint>,
138 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormButton>,
139 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormCloseButton>,
140 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDivider>,
141 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDropdown>,
142 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormImage>,
143 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormScrollView>,
144 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSlider>,
145 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSpacing>,
146 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSwitch>,
147 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormText>,
148 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormTextField>,
149 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelCloseButton>,
150 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelDecoration>,
151 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelSpacing>,
152 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContextList>,
153 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ScrollableGridLayout>,
154 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelText>,
155 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Visibility>,
156 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormHorizontalStack>>>
157 getExtensionPointContents(::std::string const& name) const /*override*/;
158
159 virtual ::Bedrock::PubSub::Subscription
160 subscribeToOnCompositionsReloadedAsync(::std::function<void()>&& onCompositionsReloadedAsyncCallback) /*override*/;
161
162 virtual ::std::optional<::IStyleTextureInfoProvider::Info> getStyleTextureInfo(::std::string_view texturePath) const
163 /*override*/;
164 // NOLINTEND
165
166public:
167 // member functions
168 // NOLINTBEGIN
169#ifdef LL_PLAT_C
170 MCNAPI DataDrivenUIRepository(
171 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
172 ::ResourcePackManager& resourcePackManager,
173 ::IMinecraftEventing& eventing,
175 );
176
177 MCNAPI void _initializeLoaders(
180 nullptr_t,
181 nullptr_t,
182 nullptr_t,
186 nullptr_t,
187 nullptr_t,
188 nullptr_t,
190 bool const isBuiltinPack
191 );
192
193 MCNAPI void _initializeStyleContext(
197 nullptr_t,
200 bool const isBuiltinPack,
201 bool const betaApis
202 );
203
204 MCNAPI void _initializeStyleLoader(
208 nullptr_t,
211 bool const isBuiltinPack
212 );
213
214 MCNAPI void _loadAllDataDrivenUIData(::ResourcePackManager const& resourcePackManager);
215
216 MCNAPI bool _parseAndLoadUICompositionData(
217 char const* filenameStr,
218 ::std::string const& fileData,
219 bool const isBuiltinPack,
221 ::mce::UUID const packId
222 );
223
224 MCNAPI bool _parseAndLoadUIRootData(
225 char const* filenameStr,
226 ::std::string const& fileData,
227 bool const isBuiltinPack,
229 ::mce::UUID const packId
230 );
231
232 MCNAPI bool _parseAndLoadUIStyleData(
233 char const* filenameStr,
234 ::std::string const& fileData,
235 bool const isBuiltinPack,
237 ::mce::UUID const packId
238 );
239#endif
240 // NOLINTEND
241
242public:
243 // constructor thunks
244 // NOLINTBEGIN
245#ifdef LL_PLAT_C
246 MCNAPI void* $ctor(
247 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
248 ::ResourcePackManager& resourcePackManager,
249 ::IMinecraftEventing& eventing,
251 );
252#endif
253 // NOLINTEND
254
255public:
256 // virtual function thunks
257 // NOLINTBEGIN
258#ifdef LL_PLAT_C
259 MCNAPI void $setStyleTextureInfoProvider(::IStyleTextureInfoProvider& styleTextureInfoProvider);
260
261 MCNAPI void $onActiveResourcePacksChanged(::ResourcePackManager&);
262
263 MCNAPI void $onJsonResourcesChanged(::ResourcePackManager& resourcePackManager);
264
265 MCNAPI void $load(::ResourcePackManager const& resourcePackManager, bool const betaApis);
266
267 MCNAPI bool $hasRootDefinition(::std::string const& identifier) const;
268
269 MCNAPI ::std::vector<::std::variant<
270 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerFixedGridLayout>,
271 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerTextField>,
272 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ExtensionPoint>,
273 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormButton>,
274 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormCloseButton>,
275 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDivider>,
276 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDropdown>,
277 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormImage>,
278 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormScrollView>,
279 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSlider>,
280 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSpacing>,
281 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSwitch>,
282 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormText>,
283 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormTextField>,
284 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelCloseButton>,
285 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelDecoration>,
286 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelSpacing>,
287 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContextList>,
288 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ScrollableGridLayout>,
289 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelText>,
290 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Visibility>,
291 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormHorizontalStack>>> const&
292 $getComposition(::std::string const& identifier) const;
293
294 MCNAPI ::mce::UUID const& $getCompositionPackId(::std::string const& identifier) const;
295
296 MCNAPI ::std::vector<::std::variant<
297 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerLayout>,
298 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Context>,
299 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormPanel>,
300 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Panel>>> const&
301 $getRoot(::std::string const& identifier) const;
302
303 MCNAPI ::mce::UUID const& $getRootPackId(::std::string const& identifier) const;
304
305 MCNAPI void $getStyles(::std::vector<::SharedTypes::Beta::DataDrivenUI::Styling::Style>& styles) const;
306
307 MCNAPI ::std::vector<::std::variant<
308 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerFixedGridLayout>,
309 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContainerTextField>,
310 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ExtensionPoint>,
311 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormButton>,
312 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormCloseButton>,
313 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDivider>,
314 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormDropdown>,
315 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormImage>,
316 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormScrollView>,
317 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSlider>,
318 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSpacing>,
319 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormSwitch>,
320 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormText>,
321 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormTextField>,
322 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelCloseButton>,
323 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelDecoration>,
324 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelSpacing>,
325 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ContextList>,
326 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::ScrollableGridLayout>,
327 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::PanelText>,
328 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::Visibility>,
329 ::std::shared_ptr<::SharedTypes::v1_21_130::DataDrivenUI::FormHorizontalStack>>>
330 $getExtensionPointContents(::std::string const& name) const;
331
332 MCNAPI ::Bedrock::PubSub::Subscription
333 $subscribeToOnCompositionsReloadedAsync(::std::function<void()>&& onCompositionsReloadedAsyncCallback);
334
335 MCNAPI ::std::optional<::IStyleTextureInfoProvider::Info>
336 $getStyleTextureInfo(::std::string_view texturePath) const;
337#endif
338
339
340 // NOLINTEND
341};
Definition BedrockLoadContext.h:15
Definition NonOwnerPointer.h:9
Definition Subscription.h:10
Definition IDataDrivenUIRepository.h:44
Definition IMinecraftEventing.h:152
Definition IStyleTextureInfoProvider.h:5
Definition LinkedAssetValidator.h:9
Definition _HeaderOutputPredefine.h:407
Definition ResourceLoadManager.h:22
Definition ResourcePackListener.h:10
Definition ResourcePackManager.h:29
Definition UUID.h:8
Definition TelemetryEventData.h:12
Definition Alias.h:14