LeviLamina
Loading...
Searching...
No Matches
TextEditContext.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/input/TextRange.h"
7
8// auto generated forward declare list
9// clang-format off
10class IKeyboardProxy;
11// clang-format on
12
13class TextEditContext {
14public:
15 // TextEditContext inner types define
16 enum class CaretUpdate : uchar {};
17
18 enum class TextEditAction : uchar {};
19
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<1, 1, bool> mIsEnabled;
24 ::ll::TypedStorage<1, 1, bool> mCtrlDown;
25 ::ll::TypedStorage<8, 32, ::std::string> mCurrentUtf8Text;
26 ::ll::TypedStorage<4, 4, int> mCaret;
27 ::ll::TypedStorage<1, 1, bool> mHighlightSelection;
28 ::ll::TypedStorage<4, 4, int> mMaxLength;
29 ::ll::TypedStorage<4, 8, ::TextRange> mSelection;
30 ::ll::TypedStorage<8, 8, ::IKeyboardProxy*> mKeyboard;
31 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::IKeyboardProxy>> mKeyboardProxy;
32 // NOLINTEND
33
34public:
35 // member functions
36 // NOLINTBEGIN
37 MCAPI void _feedDiff(::std::string_view oldText, ::std::string_view newText) const;
38
39 MCAPI void _feedInsert(::std::string_view text) const;
40
41 MCAPI void _onCopy();
42
43 MCAPI void _onPaste(::std::wstring const& cbText);
44
45 MCAPI void _replaceSelection(::std::string_view replacementUtf8Text);
46
47 MCAPI void _setText(::std::string_view newUtf8Text);
48
49 MCAPI void feedAction(::TextEditContext::TextEditAction action);
50
51 MCAPI void feedCaretUpdate(::TextEditContext::CaretUpdate caretMovement);
52
53 MCAPI void feedText(::std::string_view utf8Text);
54
55 MCAPI void setCaretLocation(int location);
56
57 MCAPI ~TextEditContext();
58 // NOLINTEND
59
60public:
61 // destructor thunk
62 // NOLINTBEGIN
63 MCAPI void $dtor();
64 // NOLINTEND
65};
Definition IKeyboardProxy.h:5
Definition TextEditContext.h:5