LeviLamina
Loading...
Searching...
No Matches
BookScreenManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/util/ViewStatus.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/world/level/BlockPos.h"
9
10// auto generated forward declare list
11// clang-format off
12class ItemStack;
14class PacketSender;
15class Player;
16class ScreenContext;
17class SyncedPhotoView;
18struct PageContent;
19// clang-format on
20
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 8, ::Player&> mPlayer;
26 ::ll::TypedStorage<4, 16, ::std::optional<::BlockPos>> mLecternPos;
27 ::ll::TypedStorage<4, 4, int> mBookSlot;
28 ::ll::TypedStorage<8, 8, ::PacketSender&> mPacketSender;
29 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::SyncedPhotoView>> mPhotoView;
30 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mPickPictures;
31 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mPickPicturesInventory;
32 ::ll::TypedStorage<8, 24, ::std::vector<::Core::PathBuffer<::std::string>>> mExportFiles;
33 ::ll::TypedStorage<8, 8, uint64> mCurExportPage;
34 ::ll::TypedStorage<8, 8, uint64> mPhotoItemsLimitPage;
35 ::ll::TypedStorage<1, 1, bool> mEdited;
36 ::ll::TypedStorage<1, 1, bool> mIsEdu;
37 ::ll::TypedStorage<1, 1, bool> hasExportedFirstPhoto;
38 // NOLINTEND
39
40public:
41 // prevent constructor by default
42 BookScreenManager& operator=(BookScreenManager const&);
43 BookScreenManager(BookScreenManager const&);
44 BookScreenManager();
45
46public:
47 // member functions
48 // NOLINTBEGIN
49 MCAPI ::ItemStack const& _getBook();
50
51 MCAPI ::Core::PathBuffer<::std::string> _getExportTempDir();
52
53 MCAPI ::ViewStatus _viewPage(::PageContent const& page);
54
55 MCAPI void addPageAt(int index, ::PageContent const& page);
56
57 MCAPI float buildExportFiles(
58 ::std::vector<::PageContent> const& pages,
59 ::ScreenContext& context,
60 ::JpegCommentWriter& writer,
61 ::std::function<::std::string(::std::string const&)> profanityFilter
62 );
63
64 MCAPI void deletePage(int index);
65
66 MCAPI void editPage(int index, ::PageContent const& page);
67
68 MCAPI bool finalizeBook(::std::string const& title, ::std::string const& author, ::std::string const& authorXUID);
69
70 MCAPI void fireBookEditedEvent() const;
71
72 MCAPI void fireBookExportEvent() const;
73
74 MCAPI void firePageTurnSound(::std::string const& eventName, float volume, float pitch) const;
75
76 MCAPI void fireSignedBookOpenedEvent(
77 ::std::string const& author,
78 ::std::string const& authorXUID,
79 ::std::string const& playerXUID
80 ) const;
81
82 MCAPI int getLecternBookPage() const;
83
84 MCAPI ::std::string getPickPhotoInventoryName(int index);
85
86 MCAPI ::std::string getPickPhotoName(int index);
87
88 MCAPI ::Core::PathBuffer<::std::string> getScreenshotPath(::PageContent const& page);
89
90 MCAPI ::std::string const& getSignedAuthor();
91
92 MCAPI ::std::string const& getXUID();
93
94 MCAPI bool lecternHasBook() const;
95
96 MCAPI bool lecternIsValid() const;
97
98 MCAPI void populatePickPics(::std::vector<::PageContent> const& pages);
99
100 MCAPI void startBookExport();
101
102 MCAPI void swapPages(int page1Index, int page2Index);
103
104 MCAPI void updateLectern(int page);
105
106 MCAPI ~BookScreenManager();
107 // NOLINTEND
108
109public:
110 // destructor thunk
111 // NOLINTBEGIN
112 MCAPI void $dtor();
113 // NOLINTEND
114};
Definition BookScreenManager.h:5
Definition ItemStack.h:26
Definition JpegCommentWriter.h:5
Definition PacketSender.h:17
Definition Player.h:129
Definition ScreenContext.h:5
Definition SyncedPhotoView.h:5
Definition PageContent.h:10