Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
HotbarCollectionBase.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/game_refs/EnableGetWeakRef.h"
7#include "mc/deps/game_refs/OwnerPtr.h"
8#include "mc/editor/IHotbarCollection.h"
9#include "mc/editor/IHotbarCollectionPayloadHandler.h"
10
11// auto generated forward declare list
12// clang-format off
13class HashedString;
14namespace Editor { class Hotbar; }
15namespace Editor { struct EditorHotbarCollectionEventActiveHotbarChanged; }
16namespace Editor { struct EditorHotbarCollectionEventElementUpdated; }
19namespace Editor { struct EditorHotbarCollectionEventHotbarRemoved; }
20namespace Editor { struct EditorHotbarCollectionEventHotbarUpdated; }
21namespace Editor { struct EditorHotbarCollectionEventSelectedIndexChanged; }
22namespace Editor::Network { class HotbarCollectionActiveHotbarChangedPayload; }
23namespace Editor::Network { class HotbarCollectionElementChangedPayload; }
24namespace Editor::Network { class HotbarCollectionHotbarChangedPayload; }
25namespace Editor::Network { class HotbarCollectionHotbarDisplayNameChangedPayload; }
26namespace Editor::Network { class HotbarCollectionHotbarElementDisplayNameChangedPayload; }
27namespace Editor::Network { class HotbarCollectionHotbarRemovedPayload; }
28namespace Editor::Network { class HotbarCollectionSelectedIndexChangedPayload; }
29namespace Editor::Network { class PayloadServiceProvider; }
30// clang-format on
31
32namespace Editor {
33
34class HotbarCollectionBase : public ::Editor::IHotbarCollectionPayloadHandler,
36 public ::EnableGetWeakRef<::Editor::HotbarCollectionBase> {
37public:
38 // HotbarCollectionBase inner types define
39 enum class EmptyCollectionPolicy : int {
40 Disallowed = 0,
41 Allowed = 1,
42 };
43
44public:
45 // member variables
46 // NOLINTBEGIN
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
61 HotbarCollectionBase& operator=(HotbarCollectionBase const&);
62 HotbarCollectionBase(HotbarCollectionBase const&);
63 HotbarCollectionBase();
64
65public:
66 // virtual functions
67 // NOLINTBEGIN
68 virtual ~HotbarCollectionBase() /*override*/ = default;
69
70 virtual ::HashedString const& getRegistryId() const /*override*/;
71
72 virtual bool isAllowed(::HashedString const&) const /*override*/;
73
74 virtual void _tryDispatchEvent(
75 ::std::variant<
83 ) const /*override*/;
84
85 virtual ::Editor::Network::PayloadServiceProvider* _getPayloadServiceProvider() const /*override*/;
86
87 virtual bool _isServerSide() const /*override*/;
88
89 virtual void _handleHotbarCollectionActiveHotbarChangedPayload(
91 ) /*override*/;
92
93 virtual void _handleHotbarCollectionSelectedIndexChangedPayload(
95 ) /*override*/;
96
97 virtual void _handleHotbarCollectionElementChangedPayload(
99 ) /*override*/;
100
101 virtual void _handleHotbarCollectionHotbarChangedPayload(
103 ) /*override*/;
104
105 virtual void _handleHotbarCollectionHotbarRemovedPayload(
107 ) /*override*/;
108
109 virtual void _handleHotbarCollectionHotbarDisplayNameChangedPayload(
111 ) /*override*/;
112
113 virtual void _handleHotbarCollectionHotbarElementDisplayNameChangedPayload(
115 ) /*override*/;
116 // NOLINTEND
117};
118
119} // namespace Editor
Definition Hotbar.h:20
Definition IHotbarCollectionPayloadHandler.h:18
Definition IHotbarCollection.h:23
Definition HotbarCollectionActiveHotbarChangedPayload.h:16
Definition HotbarCollectionElementChangedPayload.h:16
Definition HotbarCollectionHotbarChangedPayload.h:16
Definition HotbarCollectionHotbarDisplayNameChangedPayload.h:16
Definition HotbarCollectionHotbarElementDisplayNameChangedPayload.h:16
Definition HotbarCollectionHotbarRemovedPayload.h:16
Definition HotbarCollectionSelectedIndexChangedPayload.h:16
Definition PayloadServiceProvider.h:20
Definition EnableGetWeakRef.h:6
Definition HashedString.h:5
Definition EditorHotbarCollectionEventActiveHotbarChanged.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