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
31 using SceneChangeCallback = ::std::function<void(::AbstractScene&)>;
32
33 using PrePushSceneCallback = ::std::function<void(::AbstractScene&)>;
34
35 using PushSceneCallback =
36 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>;
37
38 using PrePopSceneCallback = ::std::function<void(::AbstractScene*)>;
39
40 using PopSceneCallback =
41 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>;
42
43 using PostFlushCallback = ::std::function<void()>;
44
45 using VoidSceneVisitor = ::brstd::function_ref<void(::AbstractScene&)>;
46
47 using BoolSceneVisitor = ::brstd::function_ref<bool(::AbstractScene&)>;
48
49 using BoolConstSceneVisitor = ::brstd::function_ref<bool(::AbstractScene const&)>;
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 virtual ~ISceneStack() /*override*/;
55
56 virtual void reload() = 0;
57
58 virtual void setOptions(::std::weak_ptr<::Options>) = 0;
59
60 virtual void registerSceneChangeCallback(void*, ::std::function<void(::AbstractScene&)>) = 0;
61
62 virtual void unregisterSceneChangeCallback(void*) = 0;
63
64 virtual void registerPrePushSceneCallback(void*, ::std::function<void(::AbstractScene&)>) = 0;
65
66 virtual void unregisterPrePushSceneCallback(void*) = 0;
67
68 virtual void registerPushSceneCallback(
69 void*,
70 ::std::function<void(::std::shared_ptr<::AbstractScene>, ::std::optional<::OreUI::RouteAction>)>
71 ) = 0;
72
73 virtual void unregisterPushSceneCallback(void*) = 0;
74
75 virtual void registerPrePopSceneCallback(void*, ::std::function<void(::AbstractScene*)>) = 0;
76
77 virtual void unregisterPrePopSceneCallback(void*) = 0;
78
79 virtual void registerPopSceneCallback(
80 void*,
81 ::std::function<void(::std::shared_ptr<::AbstractScene>, bool, ::std::optional<::OreUI::RouteAction>)>
82 ) = 0;
83
84 virtual void unregisterPopSceneCallback(void*) = 0;
85
86 virtual void forEachVisibleScreen(::brstd::function_ref<void(::AbstractScene&)>, bool, bool) = 0;
87
88 virtual void forEachScreen(::brstd::function_ref<bool(::AbstractScene&)>, bool) = 0;
89
90 virtual void forEachScreenConst(::brstd::function_ref<bool(::AbstractScene const&)>, bool) const = 0;
91
92 virtual void
93 forEachAlwaysAcceptInputScreen(::brstd::function_ref<void(::AbstractScene&)>, ::AbstractScene const*) = 0;
94
95 virtual void forEachAlwaysAcceptInputScreenWithTop(::brstd::function_ref<void(::AbstractScene&)>) = 0;
96
97 virtual void pushScreenWithRouteAction(::std::shared_ptr<::AbstractScene>, ::OreUI::RouteAction const&) = 0;
98
99 virtual void popScreenWithRouteAction(::OreUI::RouteAction const&) = 0;
100
101 virtual void pushScreen(::std::shared_ptr<::AbstractScene>, bool) = 0;
102
103 virtual void schedulePopScreen(int) = 0;
104
105 virtual void schedulePopScreenWithExpectedNames(::std::vector<::std::string> const&) = 0;
106
107 virtual void flushStack(bool, bool, bool, ::std::function<void()>) = 0;
108
109 virtual void deferUpdatesUntilNextTick() = 0;
110
111 virtual ::std::optional<uint64> getFirstSceneIndexOfSceneType(::ui::SceneType) const = 0;
112
113 virtual bool popScreensBackTo(::ui::SceneType const) = 0;
114
115 virtual bool popScreensBackToFirstInstanceOf(::ui::SceneType const) = 0;
116
117 virtual bool popTopScreensOfType(::ui::SceneType const) = 0;
118
119 virtual bool update() = 0;
120
121 virtual void resetScreenChangeDirtyFlag() = 0;
122
123 virtual bool hasChangedThisFrame() const = 0;
124
125 virtual bool isEmpty() const = 0;
126
127 virtual uint64 getSize() const = 0;
128
129 virtual void setScreenTickingFlag(bool) = 0;
130
131 virtual bool getScreenTickingFlag() const = 0;
132
133 virtual ::ui::SceneType getNonTerminatingSceneType() const = 0;
134
135 virtual ::std::vector<::std::string> getScreenNames() const = 0;
136
137 virtual ::std::vector<::std::string> getScreenTelemetryNames() const = 0;
138
139 virtual ::std::string getScreenName() const = 0;
140
141 virtual ::std::string getScreenTelemetry() const = 0;
142
143 virtual ::std::string const& getLastPoppedScreenName() const = 0;
144
145 virtual void handleLicenseChanged() = 0;
146
147 virtual void onGameEventNotification(::ui::GameEventNotification) = 0;
148
149 virtual ::AbstractScene* getTopScene() = 0;
150
151 virtual ::AbstractScene const* getTopScene() const = 0;
152
153 virtual ::std::shared_ptr<::AbstractScene> getTopSceneShared() const = 0;
154
155 virtual ::AbstractScene* getActiveScene() = 0;
156
157 virtual ::AbstractScene const* getActiveScene() const = 0;
158
159 virtual ::std::shared_ptr<::AbstractScene> getSharedNonTerminatingActiveScene() = 0;
160
161 virtual ::std::shared_ptr<::AbstractScene const> const getSharedNonTerminatingActiveScene() const = 0;
162
163 virtual ::gsl::span<::ISceneStack::SceneElement const> getScreenStackView() const = 0;
164
165 virtual int getScheduledPopCount() const = 0;
166
167 virtual bool isScreenReplaceable() const = 0;
168
169 virtual void handleTextChar(::std::string const&) = 0;
170
171 virtual void setBufferTextCharEvents(bool) = 0;
172
173 virtual bool isBufferingTextCharEvents() const = 0;
174
175 virtual bool isOnSceneStack(::ui::SceneType) const = 0;
176
177 virtual bool isOnSceneStack(::std::string const&) const = 0;
178
179 virtual ::SceneStackProxy* getProxy() = 0;
180
181 virtual bool hasScheduledScreens() const = 0;
182
183 virtual bool hasScheduledEvents() const = 0;
184
185 virtual void setScreenThreshold(::ScreenThreshold const&) = 0;
186
187 virtual ::Bedrock::PubSub::Subscription registerSceneStackDestroyedListener(::std::function<void()>) = 0;
188 // NOLINTEND
189
190public:
191 // destructor thunk
192 // NOLINTBEGIN
193 MCFOLD void $dtor();
194 // NOLINTEND
195
196public:
197 // virtual function thunks
198 // NOLINTBEGIN
199
200 // NOLINTEND
201};
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 ISceneStack.h:13
Definition RouteAction.h:7
Definition ScreenThreshold.h:5