LeviLamina
Loading...
Searching...
No Matches
IntellisenseHandler.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/world/item/ItemInstance.h"
7
8// auto generated forward declare list
9// clang-format off
11class CommandOrigin;
12class CommandRegistry;
15// clang-format on
16
18public:
19 // IntellisenseHandler inner types declare
20 // clang-format off
22 // clang-format on
23
24 // IntellisenseHandler inner types define
25 struct AutoCompleteMessage {
26 public:
27 // member variables
28 // NOLINTBEGIN
29 ::ll::TypedStorage<8, 32, ::std::string> text;
30 ::ll::TypedStorage<8, 128, ::ItemInstance> itemInstance;
31 // NOLINTEND
32
33 public:
34 // member functions
35 // NOLINTBEGIN
36 MCAPI ~AutoCompleteMessage();
37 // NOLINTEND
38
39 public:
40 // destructor thunk
41 // NOLINTBEGIN
42 MCFOLD void $dtor();
43 // NOLINTEND
44 };
45
46public:
47 // member variables
48 // NOLINTBEGIN
49 ::ll::TypedStorage<8, 24, ::std::vector<::std::string>> mIntellisenseMessages;
50 ::ll::TypedStorage<1, 1, bool> mIsDevConsole;
51 ::ll::TypedStorage<8, 32, ::std::string> mLastTabCompleteMessage;
52 ::ll::TypedStorage<4, 4, int> mLastTabCompleteIndex;
53 ::ll::TypedStorage<1, 1, bool> mInitTabComplete;
54 ::ll::TypedStorage<1, 1, bool> mNeedsLayoutUpdate;
55 ::ll::TypedStorage<4, 4, int> mAutoCompleteGridSize;
56 ::ll::TypedStorage<8, 24, ::std::vector<::IntellisenseHandler::AutoCompleteMessage>> mAutoCompleteMessages;
57 // NOLINTEND
58
59public:
60 // prevent constructor by default
61 IntellisenseHandler();
62
63public:
64 // member functions
65 // NOLINTBEGIN
66 MCAPI explicit IntellisenseHandler(bool isDevConsole);
67
68 MCAPI void _clearMessages();
69
70 MCAPI ::std::unique_ptr<::AutoCompleteInformation> _getAutoCompleteOptions(
71 ::CommandOrigin const& origin,
72 ::std::string const& _cmdLine,
73 uint cursorPositionUnsafe,
74 ::CommandRegistry& registry,
75 bool isPlayerMention
76 ) const;
77
78 MCAPI ::std::unique_ptr<::CommandOrigin>
79 _getCommandOrigin(::std::weak_ptr<::ClientInstanceScreenModel> minecraftScreenModel) const;
80
81 MCAPI void _handleCommandIntellisense(
82 ::ClientInstanceScreenModel& screenModel,
83 ::CommandOrigin const& origin,
84 ::std::string const& currentMessage,
85 uint cursorPositionUnsafe
86 );
87
88 MCAPI void _handlePlayerIntellisense(
89 ::ClientInstanceScreenModel& screenModel,
90 ::CommandOrigin const& origin,
91 ::std::string const& currentMessage,
92 uint cursorPositionUnsafe
93 );
94
95 MCAPI void _updateAutoCompleteMessages(
96 ::AutoCompleteInformation const& autocompleteInfo,
97 ::CommandOrigin const& origin,
98 ::CommandRegistry const& registry,
99 bool isCheatsEnabled,
100 bool isCommand
101 );
102
103 MCAPI void _updateIntellisenseMessages(::CommandSyntaxInformation const& intellisenseInfo);
104
105 MCFOLD int getAutoCompleteGridSize() const;
106
107 MCAPI int getAutoCompleteItemId(int index);
108
109 MCFOLD ::std::vector<::IntellisenseHandler::AutoCompleteMessage> const& getAutoCompleteMessages() const;
110
111 MCAPI ::std::string getAutoCompleteText(int index);
112
113 MCFOLD ::std::vector<::std::string> const& getIntellisenseMessages() const;
114
115 MCFOLD int getLastTabCompleteIndex() const;
116
117 MCFOLD bool getNeedsLayoutUpdate() const;
118
119 MCAPI void handleClickComplete(
120 ::std::weak_ptr<::ClientInstanceScreenModel> minecraftScreenModel,
121 ::std::string& currentMessage,
122 int clickedIndex
123 );
124
125 MCAPI void handleTabComplete(
126 ::std::weak_ptr<::ClientInstanceScreenModel> minecraftScreenModel,
127 ::std::string& currentMessage,
128 int index
129 );
130
131 MCAPI void handleTabComplete(
132 ::std::weak_ptr<::ClientInstanceScreenModel> minecraftScreenModel,
133 ::CommandOrigin const& origin,
134 ::std::string& currentMessage,
135 int index,
136 bool isSlashRequired
137 );
138
139 MCAPI bool isAutoCompleteSuggestion(int gridIndex) const;
140
141 MCAPI void resetTabCompleteProgress();
142
143 MCFOLD void setAutoCompleteGridSize(int val);
144
145 MCFOLD void setNeedsLayoutUpdate(bool val);
146
147 MCAPI void updateIntellisense(
148 ::std::weak_ptr<::ClientInstanceScreenModel> minecraftScreenModel,
149 ::std::string const& currentMessage
150 );
151
152 MCAPI ~IntellisenseHandler();
153 // NOLINTEND
154
155public:
156 // constructor thunks
157 // NOLINTBEGIN
158 MCAPI void* $ctor(bool isDevConsole);
159 // NOLINTEND
160
161public:
162 // destructor thunk
163 // NOLINTBEGIN
164 MCAPI void $dtor();
165 // NOLINTEND
166};
Definition ClientInstanceScreenModel.h:5
Definition CommandOrigin.h:32
Definition CommandRegistry.h:51
Definition IntellisenseHandler.h:5
Definition AutoCompleteInformation.h:10
Definition CommandSyntaxInformation.h:10
Definition IntellisenseHandler.h:13