Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
EditorHotbarCollectionService.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/WeakRef.h"
7#include "mc/deps/script_core/runtime/scripting/Result_deprecated.h"
8#include "mc/editor/EditorHotbarCollectionServiceProvider.h"
9#include "mc/editor/services/IEditorService.h"
10#include "mc/editor/services/PayloadStoreHelper.h"
11
12// auto generated forward declare list
13// clang-format off
14class HashedString;
15namespace Bedrock::PubSub { class Subscription; }
16namespace Editor { class HotbarCollectionBase; }
18namespace Editor { struct EditorHotbarCollectionEventActiveHotbarChanged; }
19namespace Editor { struct EditorHotbarCollectionEventCollectionRemoved; }
20namespace Editor { struct EditorHotbarCollectionEventCollectionUpdated; }
21namespace Editor { struct EditorHotbarCollectionEventElementUpdated; }
24namespace Editor { struct EditorHotbarCollectionEventHotbarRemoved; }
25namespace Editor { struct EditorHotbarCollectionEventHotbarUpdated; }
26namespace Editor { struct EditorHotbarCollectionEventSelectedIndexChanged; }
27namespace Editor::Network { class HotbarCollectionActiveCollectionChangedPayload; }
28namespace Editor::Network { class HotbarCollectionChangedPayload; }
29namespace Editor::Network { class HotbarCollectionRemovedPayload; }
30// clang-format on
31
32namespace Editor::Services {
33
34class EditorHotbarCollectionService : public ::Editor::Services::IEditorService,
37public:
38 // member variables
39 // NOLINTBEGIN
45 // NOLINTEND
46
47public:
48 // prevent constructor by default
49 EditorHotbarCollectionService& operator=(EditorHotbarCollectionService const&);
50 EditorHotbarCollectionService(EditorHotbarCollectionService const&);
51 EditorHotbarCollectionService();
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual ~EditorHotbarCollectionService() /*override*/ = default;
57
58 virtual ::Scripting::Result_deprecated<void> init() /*override*/;
59
60 virtual ::Scripting::Result_deprecated<void> quit() /*override*/;
61
62 virtual ::std::string_view getServiceName() const /*override*/;
63
64 virtual bool hasCollectionWithId(::HashedString const&) const /*override*/;
65
66 virtual ::WeakRef<::Editor::HotbarCollectionBase> getCollection(::HashedString const&) const /*override*/;
67
68 virtual ::std::vector<::HashedString> getAllCollectionIds() const /*override*/;
69
70 virtual ::WeakRef<::Editor::HotbarCollectionBase> getActiveCollection() const /*override*/;
71
72 virtual ::Scripting::Result_deprecated<::Bedrock::PubSub::Subscription> registerHotbarCollectionEventListener(
73 ::HashedString const&,
74 ::std::function<void(::std::variant<
82 ) /*override*/;
83
84 virtual bool isServerSide() const = 0;
85
86 virtual void _handleHotbarCollectionChangedPayload(::Editor::Network::HotbarCollectionChangedPayload const&) = 0;
87
88 virtual void _handleHotbarCollectionRemovedPayload(::Editor::Network::HotbarCollectionRemovedPayload const&) = 0;
89
90 virtual void _handleHotbarCollectionActiveCollectionChangedPayload(
92 ) = 0;
93
94 virtual void _handleHotbarCollectionServiceEvent(
95 ::std::variant<
99 ) = 0;
100
101 virtual void _handleHotbarCollectionEvent(
102 ::std::variant<
110 ) = 0;
111 // NOLINTEND
112};
113
114} // namespace Editor::Services
Definition Subscription.h:10
Definition HotbarCollectionBase.h:36
Definition HotbarCollectionActiveCollectionChangedPayload.h:16
Definition HotbarCollectionChangedPayload.h:16
Definition HotbarCollectionRemovedPayload.h:16
Definition EditorHotbarCollectionServiceProvider.h:26
Definition IEditorService.h:11
Definition PayloadStoreHelper.h:7
Definition HashedString.h:5
Definition EditorHotbarCollectionEventActiveCollectionChanged.h:7
Definition EditorHotbarCollectionEventActiveHotbarChanged.h:7
Definition EditorHotbarCollectionEventCollectionRemoved.h:7
Definition EditorHotbarCollectionEventCollectionUpdated.h:7
Definition EditorHotbarCollectionEventElementUpdated.h:7
Definition EditorHotbarCollectionEventHotbarDisplayNameChanged.h:7
Definition EditorHotbarCollectionEventHotbarElementDisplayNameChanged.h:7
Definition EditorHotbarCollectionEventHotbarRemoved.h:7
Definition EditorHotbarCollectionEventHotbarUpdated.h:7
Definition EditorHotbarCollectionEventSelectedIndexChanged.h:7
Definition Alias.h:14