Skip to content
LeviMC
English
AutoLightDark
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 MCNAPI ::ItemStack const& _getBook();
50
51 MCNAPI ::Core::PathBuffer<::std::string> _getExportTempDir();
52
53 MCNAPI ::ViewStatus _viewPage(::PageContent const& page);
54
55 MCNAPI void addPageAt(int index, ::PageContent const& page);
56
57 MCNAPI float buildExportFiles(
58 ::std::vector<::PageContent> const& pages,
60 ::JpegCommentWriter& writer,
61 ::std::function<::std::string(::std::string const&)> profanityFilter
62 );
63
64 MCNAPI void deletePage(int index);
65
66 MCNAPI void editPage(int index, ::PageContent const& page);
67
68 MCNAPI bool finalizeBook(::std::string const& title, ::std::string const& author, ::std::string const& authorXUID);
69
70 MCNAPI void fireBookEditedEvent() const;
71
72 MCNAPI void fireBookExportEvent() const;
73
74 MCNAPI void firePageTurnSound(::std::string const& eventName, float volume, float pitch) const;
75
77 ::std::string const& author,
78 ::std::string const& authorXUID,
79 ::std::string const& playerXUID
80 ) const;
81
82 MCNAPI int getLecternBookPage() const;
83
84 MCNAPI ::std::string getPickPhotoInventoryName(int index);
85
86 MCNAPI ::std::string getPickPhotoName(int index);
87
88 MCNAPI ::Core::PathBuffer<::std::string> getScreenshotPath(::PageContent const& page);
89
90 MCNAPI bool lecternHasBook() const;
91
92 MCNAPI bool lecternIsValid() const;
93
94 MCNAPI void populatePickPics(::std::vector<::PageContent> const& pages);
95
96 MCNAPI void startBookExport();
97
98 MCNAPI void swapPages(int page1Index, int page2Index);
99
100 MCNAPI void updateLectern(int page);
101
103 // NOLINTEND
104
105public:
106 // destructor thunk
107 // NOLINTBEGIN
108 MCNAPI void $dtor();
109 // NOLINTEND
110};
Definition BookScreenManager.h:5
MCAPI void startBookExport()
MCAPI void deletePage(int index)
MCAPI void editPage(int index, ::PageContent const &page)
MCAPI void $dtor()
MCAPI ::Core::PathBuffer<::std::string > _getExportTempDir()
MCAPI bool finalizeBook(::std::string const &title, ::std::string const &author, ::std::string const &authorXUID)
MCAPI void fireBookExportEvent() const
MCAPI void updateLectern(int page)
MCAPI::ItemStack const & _getBook()
MCAPI::ViewStatus _viewPage(::PageContent const &page)
MCAPI float buildExportFiles(::std::vector<::PageContent > const &pages, ::ScreenContext &context, ::JpegCommentWriter &writer, ::std::function<::std::string(::std::string const &)> profanityFilter)
MCAPI void populatePickPics(::std::vector<::PageContent > const &pages)
MCAPI ::Core::PathBuffer<::std::string > getScreenshotPath(::PageContent const &page)
MCAPI int getLecternBookPage() const
MCAPI void fireBookEditedEvent() const
MCAPI void firePageTurnSound(::std::string const &eventName, float volume, float pitch) const
MCAPI::std::string getPickPhotoInventoryName(int index)
MCAPI void addPageAt(int index, ::PageContent const &page)
MCAPI ~BookScreenManager()
MCAPI void fireSignedBookOpenedEvent(::std::string const &author, ::std::string const &authorXUID, ::std::string const &playerXUID) const
MCAPI void swapPages(int page1Index, int page2Index)
MCAPI bool lecternHasBook() const
MCAPI::std::string getPickPhotoName(int index)
MCAPI bool lecternIsValid() const
Definition ItemStack.h:26
Definition JpegCommentWriter.h:5
Definition PacketSender.h:17
Definition Player.h:131
Definition ScreenContext.h:5
Definition SyncedPhotoView.h:5
Definition PageContent.h:10
Definition context.h:5