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 Options;
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();
41 // NOLINTEND
42
43 public:
44 // destructor thunk
45 // NOLINTBEGIN
46 MCAPI void $dtor();
47 // NOLINTEND
48
49 public:
50 // vftables
51 // NOLINTBEGIN
52 MCNAPI static void** $vftable();
53 // NOLINTEND
54 };
55
56 using SceneChangeCallback = ::std::function<void(::AbstractScene&)>;
57
58 using PrePushSceneCallback = ::std::function<void(::AbstractScene&)>;
59
60 using PushSceneCallback =
61 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>;
62
63 using PrePopSceneCallback = ::std::function<void(::AbstractScene*)>;
64
65 using PopSceneCallback =
66 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>;
67
68 using PostFlushCallback = ::std::function<void()>;
69
70 using VoidSceneVisitor = ::brstd::function_ref<void(::AbstractScene&)>;
71
72 using BoolSceneVisitor = ::brstd::function_ref<bool(::AbstractScene&)>;
73
74 using BoolConstSceneVisitor = ::brstd::function_ref<bool(::AbstractScene const&)>;
75
76public:
77 // virtual functions
78 // NOLINTBEGIN
79 virtual ~ISceneStack() /*override*/;
80
81 virtual void reload() = 0;
82
83 virtual void setOptions(::std::weak_ptr<::Options> options) = 0;
84
85 virtual void
86 registerSceneChangeCallback(void* token, ::std::function<void(::AbstractScene&)> sceneChangeCallback) = 0;
87
88 virtual void unregisterSceneChangeCallback(void* token) = 0;
89
90 virtual void
91 registerPrePushSceneCallback(void* token, ::std::function<void(::AbstractScene&)> prePushSceneCallback) = 0;
92
93 virtual void unregisterPrePushSceneCallback(void* token) = 0;
94
95 virtual void registerPushSceneCallback(
96 void* token,
97 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>
98 pushSceneCallback
99 ) = 0;
100
101 virtual void unregisterPushSceneCallback(void* token) = 0;
102
103 virtual void
104 registerPrePopSceneCallback(void* token, ::std::function<void(::AbstractScene*)> prePopSceneCallback) = 0;
105
106 virtual void unregisterPrePopSceneCallback(void* token) = 0;
107
108 virtual void registerPopSceneCallback(
109 void* token,
110 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>
111 popSceneCallback
112 ) = 0;
113
114 virtual void unregisterPopSceneCallback(void* token) = 0;
115
116 virtual void forEachVisibleScreen(
117 ::brstd::function_ref<void(::AbstractScene&)> callback,
118 bool tickedLastFrame,
119 bool splitscreenRenderBypassThisFrame
120 ) = 0;
121
122 virtual void forEachScreen(::brstd::function_ref<bool(::AbstractScene&)> callback, bool topDown) = 0;
123
124 virtual void
125 forEachScreenConst(::brstd::function_ref<bool(::AbstractScene const&)> callback, bool topDown) const = 0;
126
127 virtual void forEachAlwaysAcceptInputScreen(
128 ::brstd::function_ref<void(::AbstractScene&)> callback,
129 ::AbstractScene const* ignoreScreen
130 ) = 0;
131
132 virtual void forEachAlwaysAcceptInputScreenWithTop(::brstd::function_ref<void(::AbstractScene&)> callback) = 0;
133
134 virtual void pushScreenWithRouteAction(
135 ::std::shared_ptr<::AbstractScene> newScreen,
136 ::OreUI::RouteAction const& routeAction
137 ) = 0;
138
139 virtual void popScreenWithRouteAction(::OreUI::RouteAction const& routeAction) = 0;
140
141 virtual void pushScreen(::std::shared_ptr<::AbstractScene> newScreen, bool flush) = 0;
142
143 virtual void schedulePopScreen(int totalPopNumber) = 0;
144
145 virtual void schedulePopScreenWithExpectedNames(::std::vector<::std::string> const& expectedScreenNames) = 0;
146
147 virtual void flushStack(
148 bool immediate,
149 bool ignoreNotFlushableFlag,
150 bool ignoreTransitions,
151 ::std::function<void()> postFlushCallback
152 ) = 0;
153
154 virtual void deferUpdatesUntilNextTick() = 0;
155
156 virtual ::std::optional<uint64> getFirstSceneIndexOfSceneType(::ui::SceneType sceneType) const = 0;
157
158 virtual bool popScreensBackTo(::ui::SceneType const sceneType) = 0;
159
160 virtual bool popScreensBackToFirstInstanceOf(::ui::SceneType const sceneType) = 0;
161
162 virtual bool popTopScreensOfType(::ui::SceneType const sceneType) = 0;
163
164 virtual bool update() = 0;
165
166 virtual void resetScreenChangeDirtyFlag() = 0;
167
168 virtual bool hasChangedThisFrame() const = 0;
169
170 virtual bool isEmpty() const = 0;
171
172 virtual uint64 getSize() const = 0;
173
174 virtual void setScreenTickingFlag(bool screenIsTicking) = 0;
175
176 virtual bool getScreenTickingFlag() const = 0;
177
178 virtual ::ui::SceneType getNonTerminatingSceneType() const = 0;
179
180 virtual ::std::vector<::std::string> getScreenNames() const = 0;
181
182 virtual ::std::vector<::std::string> getScreenTelemetryNames() const = 0;
183
184 virtual ::std::string getScreenName() const = 0;
185
186 virtual ::std::string getScreenTelemetry() const = 0;
187
188 virtual ::std::string const& getLastPoppedScreenName() const = 0;
189
190 virtual void handleLicenseChanged() = 0;
191
192 virtual void onGameEventNotification(::ui::GameEventNotification notification) = 0;
193
194 virtual ::AbstractScene* getTopScene() = 0;
195
196 virtual ::AbstractScene const* getTopScene() const = 0;
197
198 virtual ::std::shared_ptr<::AbstractScene> getTopSceneShared() const = 0;
199
200 virtual ::AbstractScene* getActiveScene() = 0;
201
202 virtual ::AbstractScene const* getActiveScene() const = 0;
203
204 virtual ::std::shared_ptr<::AbstractScene> getSharedNonTerminatingActiveScene() = 0;
205
206 virtual ::std::shared_ptr<::AbstractScene const> const getSharedNonTerminatingActiveScene() const = 0;
207
208 virtual ::gsl::span<::ISceneStack::SceneElement const> getScreenStackView() const = 0;
209
210 virtual int getScheduledPopCount() const = 0;
211
212 virtual bool isScreenReplaceable() const = 0;
213
214 virtual void handleTextChar(::std::string const& inputUtf8) = 0;
215
216 virtual void setBufferTextCharEvents(bool pushTextCharEvents) = 0;
217
218 virtual bool isBufferingTextCharEvents() const = 0;
219
220 virtual bool isOnSceneStack(::ui::SceneType sceneType) const = 0;
221
222 virtual bool isOnSceneStack(::std::string const& screenName) const = 0;
223
224 virtual ::SceneStackProxy* getProxy() = 0;
225
226 virtual bool hasScheduledScreens() const = 0;
227
228 virtual bool hasScheduledEvents() const = 0;
229
230 virtual void setScreenThreshold(::ScreenThreshold const& screenThreshold) = 0;
231
232 virtual ::Bedrock::PubSub::Subscription registerSceneStackDestroyedListener(::std::function<void()> callback) = 0;
233 // NOLINTEND
234
235public:
236 // destructor thunk
237 // NOLINTBEGIN
238 MCFOLD void $dtor();
239 // NOLINTEND
240
241public:
242 // virtual function thunks
243 // NOLINTBEGIN
244
245 // NOLINTEND
246};
Definition AbstractScene.h:5
Definition EnableNonOwnerReferences.h:7
Definition Subscription.h:10
Definition ISceneStack.h:5
Definition Options.h:5
Definition SceneStackProxy.h:5
Definition function_ref.h:60
Definition ISceneStack.h:13
static MCAPI void ** $vftable()
Definition RouteAction.h:7
Definition ScreenThreshold.h:5