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; }
33 enum class RouterPushMode :
int {
42 ::ll::TypedStorage<8, 160, ::std::optional<::OreUI::RouterLocation>> mOldLocation;
43 ::ll::TypedStorage<8, 160, ::std::optional<::OreUI::RouterLocation>> mCurrentLocation;
47 using OnRouteChangedCallback = void(
48 ::std::optional<::OreUI::RouterLocation>
const&,
49 ::std::optional<::OreUI::RouterLocation>
const&,
56 ::ll::TypedStorage<8, 128, ::OreUI::RouterHistory> mHistory;
57 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IRouteMatcher const>> mRouteMatcher;
58 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>> mSceneStack;
62 ::Bedrock::PubSub::Publisher<
64 ::std::optional<::OreUI::RouterLocation>
const&,
65 ::std::optional<::OreUI::RouterLocation>
const&,
68 ::Bedrock::PubSub::ThreadModel::MultiThreaded,
70 mOnRouteChangedPublisher;
71 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler>> mPrerequisiteHandler;
72 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::OreUI::RouterEventing>> mEventing;
73 ::ll::TypedStorage<1, 1, bool> mIsNotifyingListeners;
74 ::ll::TypedStorage<8, 24, ::std::vector<::OreUI::Router::DeferredChangeNotification>> mDeferredChangeNotifications;
85 ::std::unique_ptr<::OreUI::IRouteMatcher const> routeMatcher,
86 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
87 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
88 ::Bedrock::NotNullNonOwnerPtr<::ISceneStack>
const& sceneStack
91 MCAPI ::std::vector<::OreUI::RouterLocation> _buildProjectedHistory()
const;
94 ::std::optional<::OreUI::RouterLocation>
const& oldLocation,
95 ::std::optional<::OreUI::RouterLocation>
const& currentLocation
98 MCAPI
bool _pushRoute(::std::string
const& route, ::OreUI::Router::RouterPushMode mode);
100 MCAPI
void _replaceCurrentRouteInHistory(
101 ::std::string
const& newRoute,
102 ::OreUI::RouteHistoryAction action,
103 ::std::shared_ptr<::AbstractScene>
const& scene
106 MCAPI ::std::optional<::OreUI::RouterLocation> getCurrentLocation()
const;
110 MCAPI
bool isCurrentRoute(::std::string_view route)
const;
112 MCAPI
bool replaceRoute(::std::string
const& route);
114 MCAPI
void replaceRouteMatcher(::std::unique_ptr<::OreUI::IRouteMatcher> newRouteMatcher);
122 MCAPI static ::std::add_lvalue_reference_t<char const[]> BEDROCK_PREFIX();
129 ::std::unique_ptr<::OreUI::IRouteMatcher const> routeMatcher,
130 ::std::unique_ptr<::OreUI::IRoutePrerequisiteHandler> prerequisiteHandler,
131 ::std::unique_ptr<::OreUI::RouterEventing> routerEventing,
132 ::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