LeviLamina
Loading...
Searching...
No Matches
FocusComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/CardinalDirection.h"
7#include "mc/client/gui/controls/ComponentReceiveActionType.h"
8#include "mc/client/gui/controls/UIComponent.h"
9
10// auto generated forward declare list
11// clang-format off
12class FocusManager;
15class UIControl;
16class VisualTree;
17struct ScreenEvent;
18// clang-format on
19
20class FocusComponent : public ::UIComponent {
21public:
22 // member variables
23 // NOLINTBEGIN
24 ::ll::TypedStorage<8, 8, ::FocusManager*> mFocusManager;
25 ::ll::TypedStorage<4, 4, int> mDefaultFocusPrecedence;
26 ::ll::TypedStorage<4, 8, ::glm::vec2> mCapturedFocusPoint;
27 ::ll::TypedStorage<8, 32, ::std::string> mFocusIdentifier;
28 ::ll::TypedStorage<8, 64, ::std::unordered_map<::ui::CardinalDirection, ::std::string>> mDirectionalFocusOverrides;
29 ::ll::TypedStorage<
30 8,
31 64,
32 ::std::unordered_map<::std::string, ::std::unordered_map<::ui::CardinalDirection, ::std::string>>>
33 mNamedMappingLookupData;
34 bool mFocusEnabled : 1;
35 bool mFocusWrapEnabled : 1;
36 bool mFocusPointCaptured : 1;
37 bool mFocusMagnetEnabled : 1;
38 bool mResetOnFocusLost : 1;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 FocusComponent();
44
45public:
46 // virtual functions
47 // NOLINTBEGIN
48 virtual ~FocusComponent() /*override*/;
49
50 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
51
52 virtual void reset() /*override*/;
53
54 virtual ::ComponentReceiveActionType receive(
55 ::VisualTree& screenEvent,
56 ::ScreenInputContext&,
57 ::UIAnimationController&,
58 ::ScreenEvent const&
59 ) /*override*/;
60
61 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
62 // NOLINTEND
63
64public:
65 // member functions
66 // NOLINTBEGIN
67 MCAPI explicit FocusComponent(::UIControl& owner);
68
69 MCAPI void _captureFocusPoint();
70
71 MCAPI bool checkFocusChangeOverride(::ui::CardinalDirection dir, ::std::string const& checkName) const;
72
73 MCFOLD int getDefaultFocusPrecedence() const;
74
75 MCAPI bool getFocusEnabled() const;
76
77 MCFOLD ::std::string const& getFocusIdentifier() const;
78
79 MCAPI bool getFocusMagnetEnabled() const;
80
81 MCAPI bool getFocusWrapEnabled() const;
82
83 MCAPI bool getResetOnFocusLost() const;
84
85 MCAPI bool hasFocusChangeOverride(::ui::CardinalDirection dir) const;
86
87 MCFOLD void initialize(::FocusManager& manager);
88
89 MCAPI void registerNewLookupMapEntry(
90 ::std::string const& focusID,
91 ::std::unordered_map<::ui::CardinalDirection, ::std::string> const& mapping
92 );
93
94 MCFOLD void setDefaultFocusPrecedence(int precedence);
95
96 MCAPI void setFocusChangeOverride(::ui::CardinalDirection dir, ::std::string const& str);
97
98 MCAPI void setFocusEnabled(bool focusEnabled);
99
100 MCAPI void setFocusIdentifier(::std::string const& str);
101
102 MCAPI void setFocusMagnetEnabled(bool focusMagnetEnabled);
103
104 MCAPI void setFocusWrapEnabled(bool focusWrapEnabled);
105
106 MCAPI void setResetOnFocusLost(bool resetOnFocusLost);
107 // NOLINTEND
108
109public:
110 // constructor thunks
111 // NOLINTBEGIN
112 MCAPI void* $ctor(::UIControl& owner);
113 // NOLINTEND
114
115public:
116 // destructor thunk
117 // NOLINTBEGIN
118 MCAPI void $dtor();
119 // NOLINTEND
120
121public:
122 // virtual function thunks
123 // NOLINTBEGIN
124 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
125
126 MCAPI void $reset();
127
128 MCAPI ::ComponentReceiveActionType
129 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent const&);
130
131 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
132 // NOLINTEND
133
134public:
135 // vftables
136 // NOLINTBEGIN
137 MCNAPI static void** $vftable();
138 // NOLINTEND
139};
Definition FocusComponent.h:5
static MCAPI void ** $vftable()
Definition FocusManager.h:5
Definition ScreenInputContext.h:5
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ScreenEvent.h:5