LeviLamina
Loading...
Searching...
No Matches
TextEditComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/FontHandle.h"
7#include "mc/client/gui/controls/ComponentReceiveActionType.h"
8#include "mc/client/gui/controls/TextCharEventResult.h"
9#include "mc/client/gui/controls/TextType.h"
10#include "mc/client/gui/controls/UIComponent.h"
11#include "mc/deps/core/math/Color.h"
12
13// auto generated forward declare list
14// clang-format off
15class RectangleArea;
18class UIControl;
19class UIPropertyBag;
20class VisualTree;
21struct ScreenEvent;
22// clang-format on
23
24class TextEditComponent : public ::UIComponent {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<4, 4, uint> mMaxLength;
29 ::ll::TypedStorage<1, 1, bool> mConstrainToRect;
30 ::ll::TypedStorage<1, 1, bool> mEnabledNewline;
31 ::ll::TypedStorage<4, 4, ::TextType> mTextType;
32 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
33 ::ll::TypedStorage<4, 16, ::mce::Color> mPlaceHolderHoverColor;
34 ::ll::TypedStorage<4, 16, ::mce::Color> mPlaceHolderDefaultColor;
35 ::ll::TypedStorage<1, 1, bool> mHover;
36 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mVirtualKeyboardBufferControl;
37 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mLabelControl;
38 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mPlaceHolderControl;
39 ::ll::TypedStorage<8, 32, ::std::string> mGridCollectionName;
40 ::ll::TypedStorage<4, 4, uint> mTextEditComponentId;
41 ::ll::TypedStorage<1, 1, bool> mCanBeDeselected;
42 ::ll::TypedStorage<1, 1, bool> mSelected;
43 ::ll::TypedStorage<1, 1, bool> mFocused;
44 ::ll::TypedStorage<1, 1, bool> mAlwaysListening;
45 // NOLINTEND
46
47public:
48 // prevent constructor by default
49 TextEditComponent();
50
51public:
52 // virtual functions
53 // NOLINTBEGIN
54 virtual ~TextEditComponent() /*override*/;
55
56 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
57
58 virtual void reload(::UIComponent const& rhs) /*override*/;
59
60 virtual void reset() /*override*/;
61
62 virtual ::ComponentReceiveActionType receive(
63 ::VisualTree& screenEvent,
64 ::ScreenInputContext&,
65 ::UIAnimationController&,
66 ::ScreenEvent const&
67 ) /*override*/;
68
69 virtual void onVisibilityChanged(bool visible) /*override*/;
70
71 virtual ::std::string const& getTextToSpeechComponentValue() const /*override*/;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI explicit TextEditComponent(::UIControl& owner);
78
79 MCAPI void _click(float x, float y) const;
80
81 MCAPI void _hidePlaceHolderControl();
82
83 MCAPI void _removeHoverTextColor();
84
85 MCAPI void _setHoverTextColor();
86
87 MCAPI void _showPlaceHolderControl();
88
89 MCAPI bool _textFitsInControl(::std::string const& text) const;
90
91 MCAPI bool canBeDeselected() const;
92
93 MCAPI void deselectControl();
94
95 MCAPI bool getAlwaysListening() const;
96
97 MCAPI float getCaretHeightOffset() const;
98
99 MCAPI int getCollectionIndex() const;
100
101 MCAPI bool getEnabledNewline() const;
102
103 MCAPI ::FontHandle getFontHandle() const;
104
105 MCAPI ::UIPropertyBag* getLabelPropertyBag() const;
106
107 MCFOLD int getMaxLength() const;
108
109 MCAPI ::RectangleArea getMinTextArea() const;
110
111 MCAPI ::std::string getText() const;
112
113 MCAPI ::RectangleArea getTextArea() const;
114
115 MCAPI uint getTextEditComponentId() const;
116
117 MCAPI void handleFocusGained();
118
119 MCAPI void handleFocusLost();
120
121 MCAPI void handleFocusSet(bool focused);
122
123 MCAPI ::TextCharEventResult handleTextCharEvent(::VisualTree& visualTree, ::std::string const& inputUtf8);
124
125 MCAPI bool isNumbersOnly() const;
126
127 MCAPI void registerPropertyChangedNotifications();
128
129 MCAPI void selectControl();
130
131 MCAPI void setCanBeDeselected(bool deselected);
132
133 MCAPI void setText(::std::string const& text);
134
135 MCAPI bool trySetText(::std::string text);
136
137 MCAPI void updateCaretBlink(float dt);
138 // NOLINTEND
139
140public:
141 // constructor thunks
142 // NOLINTBEGIN
143 MCAPI void* $ctor(::UIControl& owner);
144 // NOLINTEND
145
146public:
147 // destructor thunk
148 // NOLINTBEGIN
149 MCAPI void $dtor();
150 // NOLINTEND
151
152public:
153 // virtual function thunks
154 // NOLINTBEGIN
155 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
156
157 MCAPI void $reload(::UIComponent const& rhs);
158
159 MCAPI void $reset();
160
161 MCAPI ::ComponentReceiveActionType
162 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent const&);
163
164 MCAPI void $onVisibilityChanged(bool visible);
165
166 MCAPI ::std::string const& $getTextToSpeechComponentValue() const;
167 // NOLINTEND
168
169public:
170 // vftables
171 // NOLINTBEGIN
172 MCNAPI static void** $vftable();
173 // NOLINTEND
174};
Definition RectangleArea.h:5
Definition ScreenInputContext.h:5
Definition TextEditComponent.h:5
static MCAPI void ** $vftable()
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition UIPropertyBag.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5