LeviLamina
Loading...
Searching...
No Matches
ScreenController.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/GameEventNotification.h"
8#include "mc/client/gui/SceneType.h"
9#include "mc/client/gui/ViewRequest.h"
10#include "mc/client/gui/screens/ScreenViewCommand.h"
11#include "mc/client/gui/screens/interfaces/IScreenController.h"
12#include "mc/deps/input/enums/ButtonState.h"
13#include "mc/platform/brstd/move_only_function.h"
14
15// auto generated forward declare list
16// clang-format off
17class BlockPos;
19class StringHash;
20class TaskGroup;
21class TaskResult;
22struct ActorUniqueID;
25struct ItemRendererData;
28struct ScreenEvent;
32struct UIPropertyBag;
33namespace Json { class Value; }
34namespace mce { class Color; }
35// clang-format on
36
38public:
39 // ScreenController inner types declare
40 // clang-format off
42 // clang-format on
43
44 // ScreenController inner types define
45 enum class PreviousButtonStateRequirement : int {
46 Any = 0,
47 Down = 1,
48 Up = 2,
49 NotDown = 3,
50 NotUp = 4,
51 };
52
53 enum class SliderChangeType : int {
54 AnyChange = 0,
55 NotFinalized = 1,
56 Finalized = 2,
57 };
58
60
61 using FocusMoveEventHandlerCallback =
62 ::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const>;
63
64 using InputModeChangedEventHandlerCallback =
65 ::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const>;
66
67 using PointerHeldEventHandlerCallback =
68 ::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const>;
69
70 using ButtonEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>;
71
72 using TextEventHandlerCallback =
73 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>;
74
75 using ToggleChangeEventHandlerCallback =
76 ::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>;
77
78 using TextEditSelectedStateChangeEventHandlerCallback =
79 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>;
80
81 using SliderChangeEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest(int, float) const>;
82
83 using AnimationEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest() const>;
84
85 using RawInputEventHandlerCallback =
86 ::brstd::move_only_function<::ui::ViewRequest(::RawInputScreenEventData&) const>;
87
88 using ClippedCollectionEventHandlerCallback =
89 ::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>;
90
91 using ClipStateChangeEventHandlerCallback =
92 ::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>;
93
94 using CustomRendererEventHandlerCallback = ::brstd::move_only_function<::ui::ViewRequest() const>;
95
96 using BindPredicate = ::brstd::move_only_function<bool() const>;
97
98 using BindStringCallback = ::brstd::move_only_function<::std::string() const>;
99
100 using BindBoolCallback = ::brstd::move_only_function<bool() const>;
101
102 using BindIntCallback = ::brstd::move_only_function<int() const>;
103
104 using BindFloatCallback = ::brstd::move_only_function<float() const>;
105
106 using BindGridSizeCallback = ::brstd::move_only_function<::glm::ivec2() const>;
107
108 using BindGlobalGridSizeCallback = ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const>;
109
110 using BindColorCallback = ::brstd::move_only_function<::mce::Color() const>;
111
112 using BindColorWithBagCallback = ::brstd::move_only_function<::mce::Color(::UIPropertyBag&) const>;
113
114 using BindCollectionPredicate = ::brstd::move_only_function<bool(int) const>;
115
116 using BindStringForCollectionCallback = ::brstd::move_only_function<::std::string(int) const>;
117
118 using BindBoolForCollectionCallback = ::brstd::move_only_function<bool(int) const>;
119
120 using BindFloatForCollectionCallback = ::brstd::move_only_function<float(int) const>;
121
122 using BindIntForCollectionCallback = ::brstd::move_only_function<int(int) const>;
123
124 using BindColorForCollectionCallback = ::brstd::move_only_function<::mce::Color(int) const>;
125
126 using BindAnyCollectionPredicate = ::brstd::move_only_function<bool(::std::string const&, int) const>;
127
128 using BindItemDataForAnyCollectionCallback =
129 ::brstd::move_only_function<::ItemRendererData(::std::string const&, int) const>;
130
131 using BindStringForAnyCollectionCallback =
132 ::brstd::move_only_function<::std::string(::std::string const&, int) const>;
133
134 using BindBoolForAnyCollectionCallback = ::brstd::move_only_function<bool(::std::string const&, int) const>;
135
136 using BindIntForAnyCollectionCallback = ::brstd::move_only_function<int(::std::string const&, int) const>;
137
138 using BindFloatForAnyCollectionCallback = ::brstd::move_only_function<float(::std::string const&, int) const>;
139
140 using BindDoubleForAnyCollectionCallback = ::brstd::move_only_function<double(::std::string const&, int) const>;
141
142 using BindForAnyCollectionCallback =
143 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const>;
144
145 using BindForCollectionCallback =
146 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&) const>;
147
148 using BindForGlobalCallback = ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const>;
149
150 using ButtonEventCallbackKey = ::std::tuple<uint, ::ButtonState>;
151
152 using ButtonEventCallbackInfo = ::std::tuple<
153 ::ScreenController::PreviousButtonStateRequirement,
154 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>;
155
156 using ButtonEventCallbackInfoVector = ::std::vector<::std::tuple<
157 ::ScreenController::PreviousButtonStateRequirement,
158 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>;
159
160 using ButtonEventCallbackMap = ::std::unordered_map<
161 ::std::tuple<uint, ::ButtonState>,
162 ::std::vector<::std::tuple<
163 ::ScreenController::PreviousButtonStateRequirement,
164 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>,
165 ::ScreenController::ButtonEventCallbackKeyHasher,
166 ::std::equal_to<::std::tuple<uint, ::ButtonState>>>;
167
168 using ButtonInteractedEventCallbackVector =
169 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>;
170
171 using ButtonInteractedEventCallbackMap = ::std::
172 unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>;
173
174 using ToggleChangeEventCallbackVector =
175 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>;
176
177 using ToggleChangeEventCallbackMap = ::std::unordered_map<
178 uint,
179 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>>;
180
181 using TextEditSelectedStateChangeEventCallbackVector =
182 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>;
183
184 using TextEditSelectedStateChangeEventCallbackMap = ::std::unordered_map<
185 uint,
186 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>>;
187
188 using SliderChangeEventHandlerCallbackInfo = ::std::
189 tuple<::ScreenController::SliderChangeType, ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>;
190
191 using SliderChangeEventCallbackVector = ::std::vector<::std::tuple<
192 ::ScreenController::SliderChangeType,
193 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>;
194
195 using SliderChangeEventCallbackMap = ::std::unordered_map<
196 uint,
197 ::std::vector<::std::tuple<
198 ::ScreenController::SliderChangeType,
199 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>>;
200
201 using TextEventHandlerCallbackInfo =
202 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>;
203
204 using TextEventHandlerCallbackVector = ::std::vector<
205 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>;
206
207 using TextEventHandlerCallbackMap = ::std::unordered_map<
208 uint,
209 ::std::vector<
210 ::std::tuple<bool, ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>>;
211
212 using AnimationEventHandlerCallbackVector = ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>;
213
214 using AnimationEventHandlerCallbackMap =
215 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>;
216
217 using ClippedCollectionEventHandlerCallbackVector =
218 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>;
219
220 using ClippedCollectionEventHandlerCallbackMap = ::std::unordered_map<
221 uint,
222 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>>;
223
224 using ClipStateChangeHandlerCallbackVector =
225 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>;
226
227 using ClipStateChangeEventHandlerCallbackMap = ::std::unordered_map<
228 uint,
229 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>>;
230
231 using CustomRendererEventHandlerCallbackVector =
232 ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>;
233
234 using CustomRendererEventHandlerCallbackMap =
235 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>;
236
237public:
238 // member variables
239 // NOLINTBEGIN
240 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&, ::UIPropertyBag const&)>>
241 mControlCreateCallback;
242 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&, ::std::string const&)>>
243 mControlDestroyCallback;
244 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mControlDestroyAllCallback;
245 ::ll::TypedStorage<8, 64, ::std::function<void(::std::string const&)>> mScreenViewSendManualInputEventCallback;
246 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ScreenControllerProxy>> mProxy;
247 ::ll::TypedStorage<1, 1, bool> mCreateInitialized;
248 ::ll::TypedStorage<1, 1, bool> mInitialized;
249 ::ll::TypedStorage<1, 1, bool> mUsesErrorInfo;
250 ::ll::TypedStorage<8, 1408, ::ScreenViewCommand> mScreenViewCommand;
251 ::ll::TypedStorage<1, 1, bool> mIsScrollingLocked;
252 ::ll::TypedStorage<
253 8,
254 64,
255 ::std::unordered_map<
256 ::std::tuple<uint, ::ButtonState>,
257 ::std::vector<::std::tuple<
258 ::ScreenController::PreviousButtonStateRequirement,
259 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>,
260 ::ScreenController::ButtonEventCallbackKeyHasher,
261 ::std::equal_to<::std::tuple<uint, ::ButtonState>>>>
262 mButtonEventCallbackMap;
263 ::ll::TypedStorage<
264 8,
265 64,
266 ::std::
267 unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const>>>>
268 mButtonInteractedEventCallbackMap;
269 ::ll::TypedStorage<8, 64, ::brstd::move_only_function<::ui::ViewRequest(::RawInputScreenEventData&) const>>
270 mRawInputEventHandlerCallback;
271 ::ll::TypedStorage<
272 8,
273 24,
274 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const>>>
275 mFocusMoveEventCallbacks;
276 ::ll::TypedStorage<
277 8,
278 24,
279 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const>>>
280 mInputModeChangedEventCallbacks;
281 ::ll::TypedStorage<
282 8,
283 24,
284 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const>>>
285 mPointerHeldEventCallbacks;
286 ::ll::TypedStorage<
287 8,
288 64,
289 ::std::unordered_map<
290 uint,
291 ::std::vector<::std::tuple<
292 bool,
293 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const>>>>>
294 mTextEditEventCallbackMap;
295 ::ll::TypedStorage<
296 8,
297 64,
298 ::std::unordered_map<
299 uint,
300 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const>>>>
301 mToggleChangeEventCallbackMap;
302 ::ll::TypedStorage<
303 8,
304 64,
305 ::std::unordered_map<
306 uint,
307 ::std::vector<
308 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const>>>>
309 mTextEditSelectedStateChangeEventCallbackMap;
310 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::ScreenController>>> mSubControllers;
311 ::ll::TypedStorage<
312 8,
313 64,
314 ::std::unordered_map<
315 uint,
316 ::std::vector<::std::tuple<
317 ::ScreenController::SliderChangeType,
318 ::brstd::move_only_function<::ui::ViewRequest(int, float) const>>>>>
319 mSliderChangeEventCallbackMap;
320 ::ll::TypedStorage<
321 8,
322 64,
323 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>>
324 mAnimationEventCallbackMap;
325 ::ll::TypedStorage<
326 8,
327 64,
328 ::std::unordered_map<
329 uint,
330 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const>>>>
331 mClippedCollectionEventCallbackMap;
332 ::ll::TypedStorage<
333 8,
334 64,
335 ::std::unordered_map<
336 uint,
337 ::std::vector<::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const>>>>
338 mClipStateChangeEventCallbackMap;
339 ::ll::TypedStorage<
340 8,
341 64,
342 ::std::unordered_map<uint, ::std::vector<::brstd::move_only_function<::ui::ViewRequest() const>>>>
343 mCustomRendererEventHandlerCallbackMap;
344 ::ll::TypedStorage<
345 8,
346 64,
347 ::std::unordered_map<uint, ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&)>>>
348 mBindCallbacks;
349 ::ll::TypedStorage<
350 8,
351 64,
352 ::std::unordered_map<uint, ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&)>>>
353 mCollectionBindCallbacks;
354 ::ll::TypedStorage<
355 8,
356 64,
357 ::std::unordered_map<
358 uint,
359 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&)>>>
360 mAnyCollectionBindCallbacks;
361 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mTaskGroup;
362 // NOLINTEND
363
364public:
365 // prevent constructor by default
366 ScreenController();
367
368public:
369 // virtual functions
370 // NOLINTBEGIN
371 virtual ~ScreenController() /*override*/;
372
373 virtual ::ui::DirtyFlag tick() /*override*/;
374
375 virtual void preFrameTick() /*override*/;
376
377 virtual ::ui::ViewRequest handleEvent(::ScreenEvent& screenEvent) /*override*/;
378
379 virtual ::std::optional<::std::string> getRoute() const /*override*/;
380
381 virtual void setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&) /*override*/;
382
383 virtual void onOpen();
384
385 virtual void queueTitleNarration();
386
387 virtual void onTerminate();
388
389 virtual void onInit();
390
391 virtual void onDelete();
392
393 virtual bool canExit();
394
395 virtual ::ui::ViewRequest tryExit();
396
397 virtual void onCreation();
398
399 virtual void onReload();
400
401 virtual void onLeave();
402
403 virtual void leaveScreen(::std::string const&);
404
405 virtual ::ui::DirtyFlag handleGameEventNotification(::ui::GameEventNotification);
406
407 virtual bool bind(
408 ::std::string const& collectionName,
409 uint collectionNameHash,
410 int collectionIndex,
411 ::std::string const& bindingName,
412 uint bindingNameHash,
413 ::std::string const& bindingNameOverride,
414 ::UIPropertyBag& bag
415 );
416
417 virtual bool bind(
418 ::std::string const& bindingName,
419 uint bindingNameHash,
420 ::std::string const& bindingNameOverride,
421 ::UIPropertyBag& bag
422 );
423
424 virtual void handleLicenseChanged();
425
426 virtual void setAssociatedBlockPos(::BlockPos const& pos);
427
428 virtual void setAssociatedEntityUniqueID(::ActorUniqueID const unqiueID);
429
430 virtual void setSuspendInput(bool);
431
432 virtual void setSuspendDirectionalInput(bool);
433
434 virtual void setViewCommand(::ScreenViewCommand const& callback);
435
436 virtual void addStaticScreenVars(::Json::Value& globalVars);
437
438 virtual ::std::string getAdditionalScreenInfo() const;
439
440 virtual ::std::string getTelemetryOverride() const;
441
442 virtual void addEventProperties(::std::unordered_map<::std::string, ::std::string>&) const;
443
444 virtual ::ui::SceneType getSceneType() const;
445
446 virtual int getScreenVersion() const;
447
448 virtual uint getSceneId() const;
449
450 virtual ::ScreenControllerProxy* getProxy();
451
452 virtual void onEntered();
453
454 virtual void onScreenPushedAbove();
455
456 virtual void onEntering();
457
458 virtual bool _doesScreenHaveExitBehavior() const;
459
460 virtual bool _isContainerScreen() const;
461 // NOLINTEND
462
463public:
464 // member functions
465 // NOLINTBEGIN
466 MCAPI explicit ScreenController(bool useTaskGroup);
467
468 MCAPI uint _getNameId(::std::string const& name) const;
469
470 MCAPI ::ui::ViewRequest _handleButtonEvent(::ScreenEvent& screenEvent);
471
472 MCAPI ::ui::ViewRequest _handleEvent(::ScreenEvent& screenEvent);
473
474 MCAPI void _registerSubController(::std::shared_ptr<::ScreenController> controller);
475
476 MCAPI void bindBool(
477 ::StringHash const& bindingName,
478 ::brstd::move_only_function<bool() const> callback,
479 ::brstd::move_only_function<bool() const> condition
480 );
481
482 MCAPI void bindBoolForAnyCollection(
483 ::StringHash const& bindingName,
484 ::brstd::move_only_function<bool(::std::string const&, int) const> callback,
485 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
486 );
487
488 MCAPI void bindBoolForCollection(
489 ::StringHash const& collectionName,
490 ::StringHash const& bindingName,
491 ::brstd::move_only_function<bool(int) const> callback,
492 ::brstd::move_only_function<bool(int) const> condition
493 );
494
495 MCAPI void bindColor(
496 ::StringHash const& bindingName,
497 ::brstd::move_only_function<::mce::Color() const> callback,
498 ::brstd::move_only_function<bool() const> condition
499 );
500
501 MCAPI void bindColorForCollection(
502 ::StringHash const& collectionName,
503 ::StringHash const& bindingName,
504 ::brstd::move_only_function<::mce::Color(int) const> callback,
505 ::brstd::move_only_function<bool(int) const> condition
506 );
507
508 MCAPI void bindColorWithPropertyBag(
509 ::StringHash const& bindingName,
510 ::brstd::move_only_function<::mce::Color(::UIPropertyBag&) const> callback,
511 ::brstd::move_only_function<bool() const> condition
512 );
513
514 MCAPI void bindDoubleForAnyCollection(
515 ::StringHash const& bindingName,
516 ::brstd::move_only_function<double(::std::string const&, int) const> callback,
517 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
518 );
519
520 MCAPI void bindFloat(
521 ::StringHash const& bindingName,
522 ::brstd::move_only_function<float() const> callback,
523 ::brstd::move_only_function<bool() const> condition
524 );
525
526 MCAPI void bindFloatForAnyCollection(
527 ::StringHash const& bindingName,
528 ::brstd::move_only_function<float(::std::string const&, int) const> callback,
529 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
530 );
531
532 MCAPI void bindFloatForCollection(
533 ::StringHash const& collectionName,
534 ::StringHash const& bindingName,
535 ::brstd::move_only_function<float(int) const> callback,
536 ::brstd::move_only_function<bool(int) const> condition
537 );
538
539 MCAPI void bindForAnyCollection(
540 ::StringHash const& bindingName,
541 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const> callback,
542 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
543 );
544
545 MCAPI void bindForAnyCollection(
546 ::StringHash const& bindingName,
547 ::brstd::move_only_function<void(::std::string const&, int, ::std::string const&, ::UIPropertyBag&) const>
548 callback,
549 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
550 );
551
552 MCAPI void bindForCollection(
553 ::StringHash const& collectionName,
554 ::StringHash const& bindingName,
555 ::brstd::move_only_function<void(int, ::std::string const&, ::UIPropertyBag&) const> func
556 );
557
558 MCAPI void bindForGlobal(
559 ::StringHash const& bindingName,
560 ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const> func
561 );
562
563 MCAPI void bindForGlobalGridSize(
564 ::StringHash const& bindingName,
565 ::brstd::move_only_function<void(::std::string const&, ::UIPropertyBag&) const> callback,
566 ::brstd::move_only_function<bool() const> condition
567 );
568
569 MCAPI void bindGridSize(
570 ::StringHash const& bindingName,
571 ::brstd::move_only_function<::glm::ivec2() const> callback,
572 ::brstd::move_only_function<bool() const> condition
573 );
574
575 MCAPI void bindInt(
576 ::StringHash const& bindingName,
577 ::brstd::move_only_function<int() const> callback,
578 ::brstd::move_only_function<bool() const> condition
579 );
580
581 MCAPI void bindIntForAnyCollection(
582 ::StringHash const& bindingName,
583 ::brstd::move_only_function<int(::std::string const&, int) const> callback,
584 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
585 );
586
587 MCAPI void bindIntForCollection(
588 ::StringHash const& collectionName,
589 ::StringHash const& bindingName,
590 ::brstd::move_only_function<int(int) const> callback,
591 ::brstd::move_only_function<bool(int) const> condition
592 );
593
594 MCAPI void bindItemDataForAnyCollection(
595 ::StringHash const& bindingName,
596 ::brstd::move_only_function<::ItemRendererData(::std::string const&, int) const> callback,
597 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
598 );
599
600 MCAPI void bindString(
601 ::StringHash const& bindingName,
602 ::brstd::move_only_function<::std::string() const> callback,
603 ::brstd::move_only_function<bool() const> condition
604 );
605
606 MCAPI void bindStringForAnyCollection(
607 ::StringHash const& bindingName,
608 ::brstd::move_only_function<::std::string(::std::string const&, int) const> callback,
609 ::brstd::move_only_function<bool(::std::string const&, int) const> condition
610 );
611
612 MCAPI void bindStringForCollection(
613 ::StringHash const& collectionName,
614 ::StringHash const& bindingName,
615 ::brstd::move_only_function<::std::string(int) const> callback,
616 ::brstd::move_only_function<bool(int) const> condition
617 );
618
619 MCAPI bool hasFinishedAsyncTasks() const;
620
621 MCAPI void queueAsyncTask(::brstd::move_only_function<::TaskResult()>&& task, ::std::function<void()>&& callback);
622
623 MCAPI void
624 registerAnimationEventHandler(uint eventId, ::brstd::move_only_function<::ui::ViewRequest() const> callback);
625
626 MCAPI void registerButtonEventHandler(
627 uint buttonId,
628 ::ButtonState currentState,
629 ::ButtonState previousState,
630 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
631 );
632
633 MCAPI void registerButtonEventHandler(
634 uint buttonId,
635 ::ButtonState currentState,
636 ::ScreenController::PreviousButtonStateRequirement previousStateRequirement,
637 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
638 );
639
640 MCAPI void registerButtonInteractedHandler(
641 uint buttonId,
642 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
643 );
644
645 MCAPI void registerButtonPressedHandler(
646 uint buttonId,
647 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
648 );
649
650 MCAPI void registerButtonReleasedHandler(
651 uint buttonId,
652 ::brstd::move_only_function<::ui::ViewRequest(::UIPropertyBag*) const> callback
653 );
654
655 MCAPI void registerClipStateChangeEventHandler(
656 uint eventId,
657 ::brstd::move_only_function<::ui::ViewRequest(bool, ::UIPropertyBag&) const> callback
658 );
659
660 MCAPI void registerClippedCollectionEventHandler(
661 ::StringHash const& collectionName,
662 ::brstd::move_only_function<::ui::ViewRequest(int, int, ::UIPropertyBag&) const> callback
663 );
664
665 MCAPI void
666 registerCustomRendererEventHandler(uint eventId, ::brstd::move_only_function<::ui::ViewRequest() const> callback);
667
668 MCAPI void registerFocusMovedEventHandler(
669 ::brstd::move_only_function<::ui::ViewRequest(::FocusMoveScreenEventData&) const> callback
670 );
671
672 MCAPI void registerInputModechangedEventHandler(
673 ::brstd::move_only_function<::ui::ViewRequest(::InputModeChangeScreenEventData&) const> callback
674 );
675
676 MCAPI void registerPointerHeldEventHandler(
677 ::brstd::move_only_function<::ui::ViewRequest(::PointerHeldScreenEventData&) const> callback
678 );
679
680 MCAPI void registerSliderChangedEventHandler(
681 uint buttonId,
682 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
683 );
684
685 MCAPI void registerSliderFinishedEventHandler(
686 uint buttonId,
687 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
688 );
689
690 MCAPI void registerSliderNotFinishedEventHandler(
691 uint buttonId,
692 ::brstd::move_only_function<::ui::ViewRequest(int, float) const> callback
693 );
694
695 MCAPI void registerTextEditChangedEventHandler(
696 uint buttonId,
697 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
698 );
699
700 MCAPI void registerTextEditFinishedEventHandler(
701 uint buttonId,
702 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
703 );
704
705 MCAPI void registerTextEditSelectedStateChangeEventHandler(
706 uint buttonId,
707 ::brstd::move_only_function<::ui::ViewRequest(::TextEditSelectedStateChangeEventData&) const> callback
708 );
709
710 MCAPI void registerTextEventHandler(
711 ::brstd::move_only_function<::ui::ViewRequest(::TextEditScreenEventData&, int) const> callback
712 );
713
714 MCAPI void registerToggleChangeEventHandler(
715 uint buttonId,
716 ::brstd::move_only_function<::ui::ViewRequest(::ToggleChangeEventData&) const> callback
717 );
718
719 MCAPI void
720 setControlFactoryCreateCallback(::std::function<void(::std::string const&, ::UIPropertyBag const&)> callback);
721
722 MCAPI void setControlFactoryDestroyAllCallback(::std::function<void(::std::string const&)> callback);
723
724 MCAPI void
725 setControlFactoryDestroyCallback(::std::function<void(::std::string const&, ::std::string const&)> callback);
726 // NOLINTEND
727
728public:
729 // constructor thunks
730 // NOLINTBEGIN
731 MCAPI void* $ctor(bool useTaskGroup);
732 // NOLINTEND
733
734public:
735 // destructor thunk
736 // NOLINTBEGIN
737 MCAPI void $dtor();
738 // NOLINTEND
739
740public:
741 // virtual function thunks
742 // NOLINTBEGIN
743 MCAPI ::ui::DirtyFlag $tick();
744
745 MCFOLD void $preFrameTick();
746
747 MCAPI ::ui::ViewRequest $handleEvent(::ScreenEvent& screenEvent);
748
749 MCFOLD ::std::optional<::std::string> $getRoute() const;
750
751 MCFOLD void $setScreenState(::std::vector<::std::pair<::std::string_view, ::std::string_view>> const&);
752
753 MCAPI void $onOpen();
754
755 MCAPI void $queueTitleNarration();
756
757 MCFOLD void $onTerminate();
758
759 MCAPI void $onInit();
760
761 MCFOLD void $onDelete();
762
763 MCAPI bool $canExit();
764
765 MCFOLD ::ui::ViewRequest $tryExit();
766
767 MCAPI void $onCreation();
768
769 MCFOLD void $onReload();
770
771 MCAPI void $onLeave();
772
773 MCFOLD void $leaveScreen(::std::string const&);
774
775 MCAPI bool $bind(
776 ::std::string const& collectionName,
777 uint collectionNameHash,
778 int collectionIndex,
779 ::std::string const& bindingName,
780 uint bindingNameHash,
781 ::std::string const& bindingNameOverride,
782 ::UIPropertyBag& bag
783 );
784
785 MCAPI bool $bind(
786 ::std::string const& bindingName,
787 uint bindingNameHash,
788 ::std::string const& bindingNameOverride,
789 ::UIPropertyBag& bag
790 );
791
792 MCFOLD void $handleLicenseChanged();
793
794 MCFOLD void $setAssociatedBlockPos(::BlockPos const& pos);
795
796 MCFOLD void $setAssociatedEntityUniqueID(::ActorUniqueID const unqiueID);
797
798 MCFOLD void $setSuspendInput(bool);
799
800 MCFOLD void $setSuspendDirectionalInput(bool);
801
802 MCAPI void $setViewCommand(::ScreenViewCommand const& callback);
803
804 MCFOLD void $addStaticScreenVars(::Json::Value& globalVars);
805
806 MCFOLD ::std::string $getAdditionalScreenInfo() const;
807
808 MCFOLD ::std::string $getTelemetryOverride() const;
809
810 MCFOLD void $addEventProperties(::std::unordered_map<::std::string, ::std::string>&) const;
811
812 MCFOLD ::ui::SceneType $getSceneType() const;
813
814 MCFOLD int $getScreenVersion() const;
815
816 MCFOLD uint $getSceneId() const;
817
818 MCFOLD ::ScreenControllerProxy* $getProxy();
819
820 MCFOLD void $onEntered();
821
822 MCFOLD void $onScreenPushedAbove();
823
824 MCFOLD void $onEntering();
825
826 MCFOLD bool $_doesScreenHaveExitBehavior() const;
827
828 MCFOLD bool $_isContainerScreen() const;
829 // NOLINTEND
830
831public:
832 // vftables
833 // NOLINTBEGIN
834 MCNAPI static void** $vftable();
835 // NOLINTEND
836};
Definition BlockPos.h:19
Definition IScreenController.h:5
Definition Value.h:16
Definition ScreenControllerProxy.h:5
Definition ScreenController.h:5
static MCAPI void ** $vftable()
Definition StringHash.h:5
Definition TaskGroup.h:53
Definition TaskResult.h:5
Definition Color.h:13
Definition ActorUniqueID.h:5
Definition FocusMoveScreenEventData.h:5
Definition InputModeChangeScreenEventData.h:5
Definition ItemRendererData.h:5
Definition PointerHeldScreenEventData.h:5
Definition RawInputScreenEventData.h:5
Definition ScreenController.h:17
Definition ScreenEvent.h:5
Definition TextEditScreenEventData.h:5
Definition TextEditSelectedStateChangeEventData.h:5
Definition ToggleChangeEventData.h:5
Definition UIPropertyBag.h:5