3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/CardinalDirection.h"
7#include "mc/client/gui/controls/ComponentReceiveActionType.h"
8#include "mc/client/gui/controls/UIComponent.h"
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;
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;
48 virtual ~FocusComponent() ;
50 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner)
const ;
52 virtual void reset() ;
54 virtual ::ComponentReceiveActionType receive(
55 ::VisualTree& screenEvent,
56 ::ScreenInputContext&,
57 ::UIAnimationController&,
61 virtual ::ComponentReceiveActionType receive(::ScreenEvent
const& screenEvent) ;
67 MCAPI
explicit FocusComponent(::UIControl& owner);
69 MCAPI
void _captureFocusPoint();
71 MCAPI
bool checkFocusChangeOverride(::ui::CardinalDirection dir, ::std::string
const& checkName)
const;
73 MCFOLD
int getDefaultFocusPrecedence()
const;
75 MCAPI
bool getFocusEnabled()
const;
77 MCFOLD ::std::string
const& getFocusIdentifier()
const;
79 MCAPI
bool getFocusMagnetEnabled()
const;
81 MCAPI
bool getFocusWrapEnabled()
const;
83 MCAPI
bool getResetOnFocusLost()
const;
85 MCAPI
bool hasFocusChangeOverride(::ui::CardinalDirection dir)
const;
87 MCFOLD
void initialize(::FocusManager& manager);
89 MCAPI
void registerNewLookupMapEntry(
90 ::std::string
const& focusID,
91 ::std::unordered_map<::ui::CardinalDirection, ::std::string>
const& mapping
94 MCFOLD
void setDefaultFocusPrecedence(
int precedence);
96 MCAPI
void setFocusChangeOverride(::ui::CardinalDirection dir, ::std::string
const& str);
98 MCAPI
void setFocusEnabled(
bool focusEnabled);
100 MCAPI
void setFocusIdentifier(::std::string
const& str);
102 MCAPI
void setFocusMagnetEnabled(
bool focusMagnetEnabled);
104 MCAPI
void setFocusWrapEnabled(
bool focusWrapEnabled);
106 MCAPI
void setResetOnFocusLost(
bool resetOnFocusLost);
112 MCAPI
void* $ctor(::UIControl& owner);
124 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner)
const;
128 MCAPI ::ComponentReceiveActionType
129 $receive(::VisualTree& screenEvent, ::ScreenInputContext&, ::UIAnimationController&, ::ScreenEvent
const&);
131 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent
const& screenEvent);
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 VisualTree.h:5
Definition ScreenEvent.h:5