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*/ = default;
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& visualTree,
56 ::ScreenInputContext& context,
57 ::UIAnimationController& animationController,
58 ::ScreenEvent const& screenEvent
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 bool checkFocusChangeOverride(::ui::CardinalDirection dir, ::std::string const& checkName) const;
70
71 MCAPI void registerNewLookupMapEntry(
72 ::std::string const& focusID,
73 ::std::unordered_map<::ui::CardinalDirection, ::std::string> const& mapping
74 );
75
76 MCAPI void setFocusChangeOverride(::ui::CardinalDirection dir, ::std::string const& str);
77
78 MCAPI void setFocusIdentifier(::std::string const& str);
79 // NOLINTEND
80
81public:
82 // constructor thunks
83 // NOLINTBEGIN
84 MCAPI void* $ctor(::UIControl& owner);
85 // NOLINTEND
86
87public:
88 // virtual function thunks
89 // NOLINTBEGIN
90 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
91
92 MCAPI void $reset();
93
94 MCAPI ::ComponentReceiveActionType $receive(
95 ::VisualTree& visualTree,
96 ::ScreenInputContext& context,
97 ::UIAnimationController& animationController,
98 ::ScreenEvent const& screenEvent
99 );
100
101 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
102 // NOLINTEND
103};
Definition FocusComponent.h:5
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