LeviLamina
Loading...
Searching...
No Matches
ToggleComponent.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/controls/ComponentReceiveActionType.h"
7#include "mc/client/gui/controls/UIComponent.h"
8
9// auto generated forward declare list
10// clang-format off
13class UIControl;
14class VisualTree;
18struct ScreenEvent;
19// clang-format on
20
21class ToggleComponent : public ::UIComponent {
22public:
23 // member variables
24 // NOLINTBEGIN
25 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mCheckedStateControl;
26 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mUncheckedStateControl;
27 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mCheckedHoverStateControl;
28 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mUncheckedHoverStateControl;
29 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mCheckedLockedStateControl;
30 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mCheckedLockedHoverStateControl;
31 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mUncheckedLockedStateControl;
32 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mUncheckedLockedHoverStateControl;
33 bool mChecked : 1;
34 bool mHover : 1;
35 bool mRadioToggleGroup : 1;
36 bool mDefaultState : 1;
37 bool mEnableDirectionalToggling : 1;
38 ::ll::TypedStorage<8, 32, ::std::string> mGridCollectionName;
39 ::ll::TypedStorage<4, 4, uint> mToggleNameId;
40 ::ll::TypedStorage<4, 4, uint> mToggleOnButtonId;
41 ::ll::TypedStorage<4, 4, uint> mToggleOffButtonId;
42 ::ll::TypedStorage<4, 4, int> mForcedIndex;
43 ::ll::TypedStorage<4, 4, int> mDefaultGroupSelectedIndex;
44 ::ll::TypedStorage<8, 32, ::std::string> mTTSValueOn;
45 ::ll::TypedStorage<8, 32, ::std::string> mTTSValueOff;
46 ::ll::TypedStorage<8, 32, ::std::string> mDescriptiveText;
47 // NOLINTEND
48
49public:
50 // prevent constructor by default
51 ToggleComponent();
52
53public:
54 // virtual functions
55 // NOLINTBEGIN
56 virtual ~ToggleComponent() /*override*/;
57
58 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
59
60 virtual void reset() /*override*/;
61
62 virtual ::ComponentReceiveActionType receive(::ScreenEvent const& screenEvent) /*override*/;
63
64 virtual ::ComponentReceiveActionType receive(
65 ::VisualTree& visualTree,
66 ::ScreenInputContext& context,
67 ::UIAnimationController& screenEvent,
68 ::ScreenEvent const&
69 ) /*override*/;
70
71 virtual ::std::string const& getTextToSpeechComponentValue() const /*override*/;
72 // NOLINTEND
73
74public:
75 // member functions
76 // NOLINTBEGIN
77 MCAPI explicit ToggleComponent(::UIControl& owner);
78
79 MCAPI void _handleButtonEvent(
80 ::VisualTree& visualTree,
81 ::ScreenInputContext& context,
82 ::ButtonScreenEventData const& buttonData
83 );
84
85 MCAPI void _handleControllerDirectionEvent(
86 ::VisualTree& visualTree,
87 ::ScreenInputContext& context,
88 ::ControllerDirectionEventData const& controllerData
89 );
90
91 MCAPI void
92 _handleHoverEvent(::VisualTree& visualTree, ::ScreenInputContext& context, ::HoverScreenEventData const& hoverData);
93
94 MCAPI void _setChecked(::ScreenInputContext& context, bool checked, bool toggledByButtonClick);
95
96 MCFOLD void _setVisible(::std::weak_ptr<::UIControl>& control, bool visible);
97
98 MCAPI void _updateControlVisibility();
99
100 MCAPI void _updateToggleGroupState(::VisualTree& visualTree, bool toggleState);
101
102 MCFOLD ::std::weak_ptr<::UIControl> getCheckedHoverStateControl() const;
103
104 MCAPI ::std::weak_ptr<::UIControl> getCheckedLockedHoverStateControl() const;
105
106 MCAPI ::std::weak_ptr<::UIControl> getCheckedLockedStateControl() const;
107
108 MCFOLD ::std::weak_ptr<::UIControl> getCheckedStateControl() const;
109
110 MCAPI bool getEnableDirectionalToggling() const;
111
112 MCAPI int getGroupIndex() const;
113
114 MCFOLD uint const& getToggleGroup() const;
115
116 MCFOLD ::std::weak_ptr<::UIControl> getUncheckedHoverStateControl() const;
117
118 MCAPI ::std::weak_ptr<::UIControl> getUncheckedLockedHoverStateControl() const;
119
120 MCAPI ::std::weak_ptr<::UIControl> getUncheckedLockedStateControl() const;
121
122 MCFOLD ::std::weak_ptr<::UIControl> getUncheckedStateControl() const;
123
124 MCAPI bool isChecked() const;
125
126 MCAPI bool isRadioToggleGroup() const;
127
128 MCAPI void resetDefaultState();
129
130 MCAPI void resetHoverState();
131
132 MCAPI void setChecked(bool checked);
133
134 MCAPI void setForcedGroupIndex(int forcedIndex);
135 // NOLINTEND
136
137public:
138 // constructor thunks
139 // NOLINTBEGIN
140 MCAPI void* $ctor(::UIControl& owner);
141 // NOLINTEND
142
143public:
144 // destructor thunk
145 // NOLINTBEGIN
146 MCAPI void $dtor();
147 // NOLINTEND
148
149public:
150 // virtual function thunks
151 // NOLINTBEGIN
152 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
153
154 MCAPI void $reset();
155
156 MCAPI ::ComponentReceiveActionType $receive(::ScreenEvent const& screenEvent);
157
158 MCAPI ::ComponentReceiveActionType $receive(
159 ::VisualTree& visualTree,
160 ::ScreenInputContext& context,
161 ::UIAnimationController& screenEvent,
162 ::ScreenEvent const&
163 );
164
165 MCAPI ::std::string const& $getTextToSpeechComponentValue() const;
166 // NOLINTEND
167
168public:
169 // vftables
170 // NOLINTBEGIN
171 MCNAPI static void** $vftable();
172 // NOLINTEND
173};
Definition ScreenInputContext.h:5
Definition ToggleComponent.h:5
static MCAPI void ** $vftable()
Definition UIAnimationController.h:5
Definition UIComponent.h:5
Definition UIControl.h:5
Definition VisualTree.h:5
Definition ButtonScreenEventData.h:5
Definition ControllerDirectionEventData.h:5
Definition HoverScreenEventData.h:5
Definition ScreenEvent.h:5