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 ::std::vector<::PageContent> getBookPages();
83
84 MCFOLD ::std::vector<::Core::PathBuffer<::std::string>> const& getExportFiles();
85
86 MCAPI ::std::optional<::std::string> const getFilteredSignedAuthor();
87
88 MCAPI ::std::optional<::std::string> const getFilteredTitle();
89
90 MCAPI int getLecternBookPage() const;
91
92 MCAPI ::std::string getPickPhotoInventoryName(int index);
93
94 MCAPI ::std::string getPickPhotoName(int index);
95
96 MCAPI ::Core::PathBuffer<::std::string> const* getPickPicture(int index);
97
98 MCAPI ::Core::PathBuffer<::std::string> const* getPickPictureInventory(int index);
99
100 MCAPI uint64 getPickPictureInventorySize();
101
102 MCAPI uint64 getPickPictureSize();
103
104 MCAPI ::Core::PathBuffer<::std::string> getScreenshotPath(::PageContent const& page);
105
106 MCAPI ::std::string const& getSignedAuthor();
107
108 MCAPI ::std::string const& getTitle();
109
110 MCAPI ::std::string const& getXUID();
111
112 MCFOLD bool isOnLectern() const;
113
114 MCAPI bool lecternHasBook() const;
115
116 MCAPI bool lecternIsValid() const;
117
118 MCAPI void populatePickPics(::std::vector<::PageContent> const& pages);
119
120 MCAPI void setExitPage(int page);
121
122 MCAPI void startBookExport();
123
124 MCAPI void swapPages(int page1Index, int page2Index);
125
126 MCAPI float tickBookDownload(::std::vector<::PageContent> const& pages);
127
128 MCAPI void updateLectern(int page);
129
130 MCAPI bool viewPage(::PageContent const& page);
131
132 MCAPI ~BookScreenManager();
133 // NOLINTEND
134
135public:
136 // destructor thunk
137 // NOLINTBEGIN
138 MCAPI void $dtor();
139 // NOLINTEND
140};
Definition BookScreenManager.h:5
Definition ItemStack.h:35
Definition JpegCommentWriter.h:5
Definition PacketSender.h:17
Definition Player.h:137
Definition ScreenContext.h:5
Definition SyncedPhotoView.h:5
Definition PageContent.h:10