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 VisualTree;
20struct ScreenEvent;
21// clang-format on
22
23class TextEditComponent : public ::UIComponent {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<4, 4, uint> mMaxLength;
28 ::ll::TypedStorage<1, 1, bool> mConstrainToRect;
29 ::ll::TypedStorage<1, 1, bool> mEnabledNewline;
30 ::ll::TypedStorage<4, 4, ::TextType> mTextType;
31 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
32 ::ll::TypedStorage<4, 16, ::mce::Color> mPlaceHolderHoverColor;
33 ::ll::TypedStorage<4, 16, ::mce::Color> mPlaceHolderDefaultColor;
34 ::ll::TypedStorage<1, 1, bool> mHover;
35 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mVirtualKeyboardBufferControl;
36 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mLabelControl;
37 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mPlaceHolderControl;
38 ::ll::TypedStorage<8, 32, ::std::string> mGridCollectionName;
39 ::ll::TypedStorage<4, 4, uint> mTextEditComponentId;
40 ::ll::TypedStorage<1, 1, bool> mCanBeDeselected;
41 ::ll::TypedStorage<1, 1, bool> mSelected;
42 ::ll::TypedStorage<1, 1, bool> mFocused;
43 ::ll::TypedStorage<1, 1, bool> mAlwaysListening;
44 // NOLINTEND
45
46public:
47 // prevent constructor by default
48 TextEditComponent();
49
50public:
51 // virtual functions
52 // NOLINTBEGIN
53 virtual ~TextEditComponent() /*override*/ = default;
54
55 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
56
57 virtual void reload(::UIComponent const& rhs) /*override*/;
58
59 virtual void reset() /*override*/;
60
61 virtual ::ComponentReceiveActionType receive(
62 ::VisualTree& visualTree,
63 ::ScreenInputContext& context,
64 ::UIAnimationController& animationController,
65 ::ScreenEvent const& screenEvent
66 ) /*override*/;
67
68 virtual void onVisibilityChanged(bool visible) /*override*/;
69
70 virtual ::std::string const& getTextToSpeechComponentValue() const /*override*/;
71 // NOLINTEND
72
73public:
74 // member functions
75 // NOLINTBEGIN
76 MCAPI explicit TextEditComponent(::UIControl& owner);
77
78 MCAPI void _click(float x, float y) const;
79
80 MCAPI void _hidePlaceHolderControl();
81
82 MCAPI void _showPlaceHolderControl();
83
84 MCAPI bool _textFitsInControl(::std::string const& text) const;
85
86 MCAPI void deselectControl();
87
88 MCAPI ::RectangleArea getMinTextArea() const;
89
90 MCAPI ::std::string getText() const;
91
92 MCAPI ::RectangleArea getTextArea() const;
93
94 MCAPI void handleFocusSet(bool focused);
95
96 MCAPI ::TextCharEventResult handleTextCharEvent(::VisualTree& visualTree, ::std::string const& inputUtf8);
97
98 MCAPI void registerPropertyChangedNotifications();
99
100 MCAPI void selectControl();
101
102 MCAPI void setText(::std::string const& text);
103
104 MCAPI bool trySetText(::std::string text);
105 // NOLINTEND
106
107public:
108 // constructor thunks
109 // NOLINTBEGIN
110 MCAPI void* $ctor(::UIControl& owner);
111 // NOLINTEND
112
113public:
114 // virtual function thunks
115 // NOLINTBEGIN
116 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
117
118 MCAPI void $reload(::UIComponent const& rhs);
119
120 MCAPI void $reset();
121
122 MCAPI ::ComponentReceiveActionType $receive(
123 ::VisualTree& visualTree,
124 ::ScreenInputContext& context,
125 ::UIAnimationController& animationController,
126 ::ScreenEvent const& screenEvent
127 );
128
129 MCAPI void $onVisibilityChanged(bool visible);
130
131 MCAPI ::std::string const& $getTextToSpeechComponentValue() const;
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCNAPI static void** $vftable();
138 // NOLINTEND
139};
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 VisualTree.h:5
Definition ScreenEvent.h:5