Skip to content
LeviMC
English
AutoLightDark
LeviLamina
Loading...
Searching...
No Matches
MinecraftKeyboardManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/input/KeyboardManager.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8
9// auto generated forward declare list
10// clang-format off
11class GuiData;
12class IClientInstance;
13class RectangleArea;
14class Vec2;
15// clang-format on
16
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<1, 1, bool> mDelayedInputResume;
22 bool mIsKeyboardActive : 1;
23 bool mIsKeyboardEnabled : 1;
24 bool mKeyboardClosedEvent : 1;
25 ::ll::TypedStorage<4, 4, float> mKeyboardForcedHeight;
26 ::ll::TypedStorage<8, 64, ::std::function<void()>> mResumeInputCallback;
27 ::ll::TypedStorage<8, 64, ::std::function<void(int)>> mDisableInputToOtherClientsCallback;
28 ::ll::TypedStorage<8, 8, ::IClientInstance&> mClientInstance;
29 ::ll::TypedStorage<1, 1, bool> mWasEnabledWithMultiline;
30 ::ll::TypedStorage<1, 1, bool> mIsNumbersOnly;
31 ::ll::TypedStorage<4, 4, int> mMaxLength;
32 // NOLINTEND
33
34public:
35 // prevent constructor by default
36 MinecraftKeyboardManager& operator=(MinecraftKeyboardManager const&);
37 MinecraftKeyboardManager(MinecraftKeyboardManager const&);
38 MinecraftKeyboardManager();
39
40public:
41 // virtual functions
42 // NOLINTBEGIN
43 virtual ~MinecraftKeyboardManager() /*override*/ = default;
44
45 virtual bool tryEnableKeyboard(
46 ::std::string const& currentText,
47 int maxLength,
48 bool limitInput,
49 bool numbersOnly,
50 bool isMultiline,
51 ::Vec2 const& position,
52 float controlHeight
53 ) /*override*/;
54
55 virtual bool isFullScreenKeyboard() const /*override*/;
56
57 virtual void disableKeyboard() /*override*/;
58
59 virtual bool canActivateKeyboard() /*override*/;
60
61 virtual bool isKeyboardEnabled() const /*override*/;
62
63 virtual bool isKeyboardActive() const /*override*/;
64
65 virtual bool wasEnabledWithMultiline() const /*override*/;
66
67 virtual bool isNumbersOnly() const /*override*/;
68
69 virtual int getMaxLength() const /*override*/;
70
71 virtual void setResumeInputCallback(::std::function<void()> callback);
72
73 virtual void setDisableInputToOtherClientsCallback(::std::function<void(int)> callback);
74
75 virtual bool tryClaimKeyboardOwnership() /*override*/;
76
77 virtual void releaseKeyboardOwnership() /*override*/;
78
79 virtual void setForcedHeight(float height) /*override*/;
80
81 virtual float getKeyboardHeight() const /*override*/;
82
83 virtual bool getKeyboardClosedEvent() /*override*/;
84
85 virtual void clearKeyboardClosedEvent() /*override*/;
86
87 virtual void updateTextEditBoxPosition(
88 ::RectangleArea const& controlPosition,
89 ::Vec2 const& caretPosition,
90 ::Vec2 const& caretSize
91 ) /*override*/;
92 // NOLINTEND
93
94public:
95 // member functions
96 // NOLINTBEGIN
97 MCNAPI ::Bedrock::NotNullNonOwnerPtr<::GuiData const> _getGuiData() const;
98
99 MCNAPI float _getGuiScale() const;
100
101 MCNAPI float _getInvGuiScale() const;
102 // NOLINTEND
103
104public:
105 // static variables
106 // NOLINTBEGIN
107 MCNAPI static int& mGlobalKeyboardOwnerId();
108 // NOLINTEND
109
110public:
111 // virtual function thunks
112 // NOLINTBEGIN
114 ::std::string const& currentText,
115 int maxLength,
116 bool limitInput,
117 bool numbersOnly,
118 bool isMultiline,
119 ::Vec2 const& position,
120 float controlHeight
121 );
122
123 MCNAPI bool $isFullScreenKeyboard() const;
124
125 MCNAPI void $disableKeyboard();
126
127 MCNAPI bool $canActivateKeyboard();
128
129 MCNAPI bool $isKeyboardEnabled() const;
130
131 MCNAPI bool $isKeyboardActive() const;
132
133 MCNAPI bool $wasEnabledWithMultiline() const;
134
135 MCNAPI bool $isNumbersOnly() const;
136
137 MCNAPI int $getMaxLength() const;
138
139 MCNAPI void $setResumeInputCallback(::std::function<void()> callback);
140
141 MCNAPI void $setDisableInputToOtherClientsCallback(::std::function<void(int)> callback);
142
144
146
147 MCNAPI void $setForcedHeight(float height);
148
149 MCNAPI float $getKeyboardHeight() const;
150
152
154
156 ::RectangleArea const& controlPosition,
157 ::Vec2 const& caretPosition,
158 ::Vec2 const& caretSize
159 );
160 // NOLINTEND
161
162public:
163 // vftables
164 // NOLINTBEGIN
165 MCNAPI static void** $vftable();
166 // NOLINTEND
167};
Definition GuiData.h:5
Definition IClientInstance.h:5
Definition KeyboardManager.h:5
Definition MinecraftKeyboardManager.h:5
MCAPI void $setForcedHeight(float height)
MCAPI bool $isFullScreenKeyboard() const
MCAPI bool $isNumbersOnly() const
MCAPI bool $getKeyboardClosedEvent()
MCAPI int $getMaxLength() const
MCAPI void $updateTextEditBoxPosition(::RectangleArea const &controlPosition, ::Vec2 const &caretPosition, ::Vec2 const &caretSize)
MCAPI ::Bedrock::NotNullNonOwnerPtr<::GuiData const > _getGuiData() const
MCAPI float $getKeyboardHeight() const
MCAPI bool $tryEnableKeyboard(::std::string const &currentText, int maxLength, bool limitInput, bool numbersOnly, bool isMultiline, ::Vec2 const &position, float controlHeight)
MCAPI bool $tryClaimKeyboardOwnership()
MCAPI void $setResumeInputCallback(::std::function< void()> callback)
MCAPI bool $canActivateKeyboard()
static MCAPI int & mGlobalKeyboardOwnerId()
MCAPI void $clearKeyboardClosedEvent()
MCAPI float _getGuiScale() const
MCAPI bool $isKeyboardEnabled() const
MCAPI float _getInvGuiScale() const
MCAPI void $disableKeyboard()
MCAPI bool $wasEnabledWithMultiline() const
MCAPI void $releaseKeyboardOwnership()
static MCAPI void ** $vftable()
MCAPI void $setDisableInputToOtherClientsCallback(::std::function< void(int)> callback)
MCAPI bool $isKeyboardActive() const
Definition RectangleArea.h:5
Definition Vec2.h:5
STL namespace.