3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/oreui/routing/RouteHistoryAction.h"
7#include "mc/client/gui/oreui/routing/RouterAction.h"
8#include "mc/client/gui/oreui/routing/RouterHistory.h"
9#include "mc/client/gui/oreui/routing/RouterLocation.h"
10#include "mc/deps/core/utility/NonOwnerPointer.h"
11#include "mc/deps/core/utility/pub_sub/Publisher.h"
17namespace Bedrock::PubSub::ThreadModel {
struct MultiThreaded; }
34 enum class RouterPushMode :
int {
43 ::ll::TypedStorage<8, 160, ::std::optional<::OreUI::RouterLocation>> mOldLocation;
44 ::ll::TypedStorage<8, 160, ::std::optional<::OreUI::RouterLocation>> mCurrentLocation;
48 using OnRouteChangedCallback = void(
49 ::std::optional<::OreUI::RouterLocation>
const&,
50 ::std::optional<::OreUI::RouterLocation>
const&,
57 ::ll::TypedStorage<8, 128, ::OreUI::RouterHistory> mHistory;
58 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IRouteMatcher const>> mRouteMatcher;
59 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>> mSceneStack;
63 ::Bedrock::PubSub::Publisher<
65 ::std::optional<::OreUI::RouterLocation>
const&,
66 ::std::optional<::OreUI::RouterLocation>
const&,
69 ::Bedrock::PubSub::ThreadModel::MultiThreaded,
71 mOnRouteChangedPublisher;
72 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler>> mPrerequisiteHandler;
73 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::RouterEventing>> mEventing;
74 ::ll::TypedStorage<1, 1, bool> mIsNotifyingListeners;
75 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::Router::DeferredChangeNotification>> mDeferredChangeNotifications;
86 ::std::unique_ptr<::OreUI::IRouteMatcher const> routeMatcher,
87 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
88 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
89 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
92 MCAPI
void _handleSceneStackPop(
93 ::std::shared_ptr<::AbstractScene>
const& newTopScreen,
95 ::std::optional<::OreUI::RouteAction>
const& routeAction
98 MCAPI
void _handleSceneStackPush(
99 ::std::shared_ptr<::AbstractScene>
const& newScreen,
100 ::std::optional<::OreUI::RouteAction>
const& routeAction
103 MCAPI
void _onChange(
104 ::std::optional<::OreUI::RouterLocation>
const& oldLocation,
105 ::std::optional<::OreUI::RouterLocation>
const& currentLocation
108 MCAPI
bool _pushRoute(::std::string
const& route, ::OreUI::Router::RouterPushMode mode);
110 MCAPI
void _replaceCurrentRouteInHistory(::std::string
const& newRoute, ::OreUI::RouteHistoryAction action);
112 MCAPI ::std::optional<::OreUI::RouterLocation> getCurrentLocation()
const;
116 MCAPI
bool isCurrentRoute(::std::string_view route)
const;
118 MCAPI
bool replaceRoute(::std::string
const& route);
120 MCAPI
void replaceRouteMatcher(::std::unique_ptr<::OreUI::IRouteMatcher> newRouteMatcher);
128 MCAPI static ::std::add_lvalue_reference_t<char const[]> BEDROCK_PREFIX();
135 ::std::unique_ptr<::OreUI::IRouteMatcher const> routeMatcher,
136 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
137 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
138 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
Definition AbstractScene.h:5
Definition ISceneStack.h:5
Definition IRouteMatcher.h:7
Definition IRoutePrerequisiteHandler.h:7
Definition RouterEventing.h:7
Definition MultiThreaded.h:7
Definition RouteAction.h:7