LeviLamina
Loading...
Searching...
No Matches
ISceneStack.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/GameEventNotification.h"
7#include "mc/client/gui/SceneType.h"
8#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
9#include "mc/platform/brstd/function_ref.h"
10
11// auto generated forward declare list
12// clang-format off
13class AbstractScene;
14class OptionRegistry;
15class SceneStackProxy;
16struct ScreenThreshold;
17namespace Bedrock::PubSub { class Subscription; }
18namespace OreUI { struct RouteAction; }
19// clang-format on
20
22public:
23 // ISceneStack inner types declare
24 // clang-format off
25 struct SceneElement;
26 // clang-format on
27
28 // ISceneStack inner types define
29 struct SceneElement {
30 public:
31 // member variables
32 // NOLINTBEGIN
33 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::AbstractScene>> mScene;
34 ::ll::TypedStorage<1, 1, bool> mHasCompletedPrepop;
35 // NOLINTEND
36
37 public:
38 // virtual functions
39 // NOLINTBEGIN
40 virtual ~SceneElement() = default;
41 // NOLINTEND
42 };
43
44 using SceneChangeCallback = ::std::function<void(::AbstractScene&)>;
45
46 using PrePushSceneCallback = ::std::function<void(::AbstractScene&)>;
47
48 using PushSceneCallback =
49 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>;
50
51 using PrePopSceneCallback = ::std::function<void(::AbstractScene*)>;
52
53 using PopSceneCallback =
54 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>;
55
56 using PostFlushCallback = ::std::function<void()>;
57
58 using VoidSceneVisitor = ::brstd::function_ref<void(::AbstractScene&)>;
59
60 using BoolSceneVisitor = ::brstd::function_ref<bool(::AbstractScene&)>;
61
62 using BoolConstSceneVisitor = ::brstd::function_ref<bool(::AbstractScene const&)>;
63
64public:
65 // virtual functions
66 // NOLINTBEGIN
67 virtual ~ISceneStack() /*override*/ = default;
68
69 virtual void reload() = 0;
70
71 virtual void setOptions(::std::weak_ptr<::OptionRegistry> options) = 0;
72
73 virtual void
74 registerSceneChangeCallback(void* token, ::std::function<void(::AbstractScene&)> sceneChangeCallback) = 0;
75
76 virtual void unregisterSceneChangeCallback(void* token) = 0;
77
78 virtual void
79 registerPrePushSceneCallback(void* token, ::std::function<void(::AbstractScene&)> prePushSceneCallback) = 0;
80
81 virtual void unregisterPrePushSceneCallback(void* token) = 0;
82
83 virtual void registerPushSceneCallback(
84 void* token,
85 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>
86 pushSceneCallback
87 ) = 0;
88
89 virtual void unregisterPushSceneCallback(void* token) = 0;
90
91 virtual void
92 registerPrePopSceneCallback(void* token, ::std::function<void(::AbstractScene*)> prePopSceneCallback) = 0;
93
94 virtual void unregisterPrePopSceneCallback(void* token) = 0;
95
96 virtual void registerPopSceneCallback(
97 void* token,
98 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>
99 popSceneCallback
100 ) = 0;
101
102 virtual void unregisterPopSceneCallback(void* token) = 0;
103
104 virtual void forEachVisibleScreen(
105 ::brstd::function_ref<void(::AbstractScene&)> callback,
106 bool tickedLastFrame,
107 bool splitscreenRenderBypassThisFrame
108 ) = 0;
109
110 virtual void forEachScreen(::brstd::function_ref<bool(::AbstractScene&)> callback, bool topDown) = 0;
111
112 virtual void
113 forEachScreenConst(::brstd::function_ref<bool(::AbstractScene const&)> callback, bool topDown) const = 0;
114
115 virtual void forEachAlwaysAcceptInputScreen(
116 ::brstd::function_ref<void(::AbstractScene&)> callback,
117 ::AbstractScene const* ignoreScreen
118 ) = 0;
119
120 virtual void forEachAlwaysAcceptInputScreenWithTop(::brstd::function_ref<void(::AbstractScene&)> callback) = 0;
121
122 virtual void pushScreenWithRouteAction(
123 ::std::shared_ptr<::AbstractScene> newScreen,
124 ::OreUI::RouteAction const& routeAction
125 ) = 0;
126
127 virtual void popScreenWithRouteAction(::OreUI::RouteAction const& routeAction) = 0;
128
129 virtual void pushScreen(::std::shared_ptr<::AbstractScene> newScreen, bool flush) = 0;
130
131 virtual void schedulePopScreen(int totalPopNumber) = 0;
132
133 virtual void schedulePopScreenWithExpectedNames(::std::vector<::std::string> const& expectedScreenNames) = 0;
134
135 virtual void flushStack(
136 bool immediate,
137 bool ignoreNotFlushableFlag,
138 bool ignoreTransitions,
139 ::std::function<void()> postFlushCallback
140 ) = 0;
141
142 virtual void deferUpdatesUntilNextTick() = 0;
143
144 virtual ::std::optional<uint64> getFirstSceneIndexOfSceneType(::ui::SceneType sceneType) const = 0;
145
146 virtual bool popScreensBackTo(::ui::SceneType const sceneType) = 0;
147
148 virtual bool popScreensBackToFirstInstanceOf(::ui::SceneType const sceneType) = 0;
149
150 virtual bool popTopScreensOfType(::ui::SceneType const sceneType) = 0;
151
152 virtual bool update() = 0;
153
154 virtual void resetScreenChangeDirtyFlag() = 0;
155
156 virtual bool hasChangedThisFrame() const = 0;
157
158 virtual bool isEmpty() const = 0;
159
160 virtual uint64 getSize() const = 0;
161
162 virtual void setScreenTickingFlag(bool screenIsTicking) = 0;
163
164 virtual bool getScreenTickingFlag() const = 0;
165
166 virtual ::ui::SceneType getNonTerminatingSceneType() const = 0;
167
168 virtual ::std::vector<::std::string> getScreenNames() const = 0;
169
170 virtual ::std::vector<::std::string> getScreenTelemetryNames() const = 0;
171
172 virtual ::std::string getScreenName() const = 0;
173
174 virtual ::std::string getScreenTelemetry() const = 0;
175
176 virtual ::std::string const& getLastPoppedScreenName() const = 0;
177
178 virtual void handleLicenseChanged() = 0;
179
180 virtual void onGameEventNotification(::ui::GameEventNotification notification) = 0;
181
182 virtual ::AbstractScene* getTopScene() = 0;
183
184 virtual ::AbstractScene const* getTopScene() const = 0;
185
186 virtual ::std::shared_ptr<::AbstractScene> getTopSceneShared() const = 0;
187
188 virtual ::AbstractScene* getActiveScene() = 0;
189
190 virtual ::AbstractScene const* getActiveScene() const = 0;
191
192 virtual ::std::shared_ptr<::AbstractScene> getSharedNonTerminatingActiveScene() = 0;
193
194 virtual ::std::shared_ptr<::AbstractScene const> const getSharedNonTerminatingActiveScene() const = 0;
195
196 virtual ::gsl::span<::ISceneStack::SceneElement const> getScreenStackView() const = 0;
197
198 virtual int getScheduledPopCount() const = 0;
199
200 virtual bool isScreenReplaceable() const = 0;
201
202 virtual void handleTextChar(::std::string const& inputUtf8) = 0;
203
204 virtual void setBufferTextCharEvents(bool pushTextCharEvents) = 0;
205
206 virtual bool isBufferingTextCharEvents() const = 0;
207
208 virtual bool isOnSceneStack(::ui::SceneType sceneType) const = 0;
209
210 virtual bool isOnSceneStack(::std::string const& screenName) const = 0;
211
212 virtual ::SceneStackProxy* getProxy() = 0;
213
214 virtual bool hasScheduledScreens() const = 0;
215
216 virtual bool hasScheduledEvents() const = 0;
217
218 virtual void setScreenThreshold(::ScreenThreshold const& screenThreshold) = 0;
219
220 virtual ::Bedrock::PubSub::Subscription registerSceneStackDestroyedListener(::std::function<void()> callback) = 0;
221 // NOLINTEND
222};
Definition AbstractScene.h:5
Definition EnableNonOwnerReferences.h:7
Definition Subscription.h:10
Definition ISceneStack.h:5
Definition OptionRegistry.h:5
Definition SceneStackProxy.h:5
Definition ISceneStack.h:13
Definition RouteAction.h:7
Definition ScreenThreshold.h:5