LeviLamina
Loading...
Searching...
No Matches
UIControlFactory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/ChildInsertPosition.h"
7#include "mc/client/gui/FontHandle.h"
8#include "mc/client/gui/TileDirection.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10#include "mc/deps/json/Value.h"
11
12// auto generated forward declare list
13// clang-format off
17class UIAnim;
18class UIControl;
20class UIResolvedDef;
21class UISoundPlayer;
22// clang-format on
23
24class UIControlFactory : public ::std::enable_shared_from_this<::UIControlFactory> {
25public:
26 // member variables
27 // NOLINTBEGIN
28 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const>> mUIDefRepository;
29 ::ll::TypedStorage<8, 8, ::UISoundPlayer const&> mSoundPlayer;
30 ::ll::TypedStorage<8, 32, ::std::string> mCurrentNamespace;
31 ::ll::TypedStorage<8, 16, ::Json::Value> mGlobalVars;
32 ::ll::TypedStorage<8, 24, ::std::vector<::Json::Value*>> mVariablesStack;
33 ::ll::TypedStorage<8, 80, ::FontHandle> mFontHandle;
34 ::ll::TypedStorage<8, 80, ::FontHandle> mRuneFontHandle;
35 ::ll::TypedStorage<8, 80, ::FontHandle> mUnicodeFontHandle;
36 ::ll::TypedStorage<8, 80, ::FontHandle> mSmoothFontHandle;
37 ::ll::TypedStorage<1, 1, bool> mLowMemoryMode;
38 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mInitialSelectedControl;
39 // NOLINTEND
40
41public:
42 // prevent constructor by default
43 UIControlFactory& operator=(UIControlFactory const&);
44 UIControlFactory(UIControlFactory const&);
45 UIControlFactory();
46
47public:
48 // member functions
49 // NOLINTBEGIN
50 MCAPI UIControlFactory(
51 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
52 ::Json::Value const& globalVars,
53 ::UISoundPlayer const& soundPlayer,
54 ::FontHandle fontHandle,
55 ::FontHandle runeFontHandle,
56 ::FontHandle unicodeFontHandle,
57 ::FontHandle smoothFontHandle,
58 bool isLowMemory
59 );
60
61 MCAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIControl& ownerControl);
62
63 MCAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIResolvedDef& def, ::UIControl& ownerControl);
64
65 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
66 ::UIControlFactoryContext const& templateControl,
67 ::UIControl const& parent,
68 ::UIControl* childInsertPosition,
69 ::ui::ChildInsertPosition
70 );
71
72 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
73 ::UIControlFactoryContext const& context,
74 ::std::string_view name,
75 ::ControlScreenAction& controlScreenAction,
76 ::UIControl* parent,
77 ::ui::ChildInsertPosition childInsertPosition,
78 ::Json::Value* additionalVars,
79 bool isTemplateControl
80 );
81
82 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeFromResolvedDef(
83 ::UIControlFactoryContext const& context,
84 ::UIResolvedDef const& resolvedDef,
85 ::UIControl* parentControl,
86 ::ControlScreenAction& controlScreenAction,
87 ::ui::ChildInsertPosition childInsertPosition,
88 bool isTemplateControl
89 );
90
91 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeRootOnly(
92 ::UIControlFactoryContext const& context,
93 ::std::string_view name,
94 ::ControlScreenAction& controlScreenAction
95 );
96
97 MCAPI ::std::shared_ptr<::UIControl> _createFromResolvedDef(
98 ::UIControlFactoryContext const& context,
99 ::UIResolvedDef const& resolvedDef,
100 ::UIControl* parentControl,
101 ::ControlScreenAction& controlScreenAction,
102 ::ui::ChildInsertPosition childInsertPosition,
103 bool isTemplateControl
104 );
105
106 MCAPI void _createGradientRenderer(::CustomRenderComponent& customRenderComponent, ::UIResolvedDef const& def);
107
108 MCAPI void _createScrollTrack(::UIControl& control, ::UIResolvedDef const& def);
109
110 MCAPI ::FontHandle _getFontFromFontType(::std::string const& fontType) const;
111
112 MCAPI void _populateAnchoredOffsetComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
113
114 MCAPI void _populateAnimations(::UIResolvedDef const& def, ::UIControl& control);
115
116 MCAPI void _populateButtonComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
117
118 MCAPI void _populateCollectionComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
119
120 MCAPI void _populateCollectionItemComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
121
122 MCAPI void _populateControl(::UIResolvedDef const& def, ::UIControl& control);
123
124 MCAPI void _populateCustomFrameUpdateComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
125
126 MCAPI void _populateCustomRenderComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
127
128 MCAPI void _populateDataBindingComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
129
130 MCAPI void _populateDebugRendererComponent(::UIResolvedDef const& def, ::UIControl& control);
131
132 MCAPI void _populateDropdownComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
133
134 MCAPI void _populateFactoryComponent(
135 ::UIControlFactoryContext const& context,
136 ::UIResolvedDef const& def,
137 ::UIControl& ownerControl
138 );
139
140 MCAPI void _populateFocusComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
141
142 MCAPI void _populateFocusContainerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
143
144 MCAPI void _populateGestureComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
145
146 MCAPI void _populateGridComponent(
147 ::UIControlFactoryContext const& context,
148 ::UIResolvedDef const& def,
149 ::UIControl& ownerControl
150 );
151
152 MCAPI void _populateGridItemComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
153
154 MCAPI void _populateImageCyclingComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
155
156 MCAPI void _populateInputComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
157
158 MCAPI void _populateLayoutComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
159
160 MCAPI void _populatePageIndicatorGridComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
161
162 MCAPI void _populatePageIndicatorManagerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
163
164 MCAPI void _populateScreenComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
165
166 MCAPI void _populateScrollViewComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
167
168 MCAPI void _populateScrollbarBoxComponent(::UIResolvedDef const& ownerControl, ::UIControl&);
169
170 MCAPI void _populateSelectionWheelComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
171
172 MCAPI void _populateSliderBoxComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
173
174 MCAPI void _populateSliderComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
175
176 MCAPI void _populateSliderGroupManagerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
177
178 MCAPI void _populateSoundComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, bool alwaysCreate);
179
180 MCAPI void _populateSpriteComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
181
182 MCAPI void _populateStackPanelComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
183
184 MCAPI void _populateTextComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
185
186 MCAPI void _populateTextCyclingComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
187
188 MCAPI void _populateTextEditComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
189
190 MCAPI void
191 _populateTextToSpeechComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, int controlPriorityDefault);
192
193 MCAPI void _populateTextToSpeechContainerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
194
195 MCAPI void _populateToggleComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
196
197 MCAPI void _populateToggleGroupManagerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
198
199 MCAPI void _populateTooltipTriggerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
200
201 MCAPI void
202 _postCreate(::UIControlFactoryContext const& context, ::UIControl& control, ::UIResolvedDef const& controlDef);
203
204 MCAPI ::ui::TileDirection const
205 _resolveTileDirection(::UIResolvedDef const& ownerDef, ::UIControl& propertyName, ::std::string const&);
206
207 MCAPI void _setName(::UIControl& control, ::UIResolvedDef const& def, ::std::string const& defaultName);
208
209 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
210 ::UIControl const& templateControl,
211 ::UIControl* parent,
212 ::ui::ChildInsertPosition childInsertPosition
213 );
214
215 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
216 ::std::string_view name,
217 ::ControlScreenAction& controlScreenAction,
218 ::UIControl* parent,
219 ::ui::ChildInsertPosition childInsertPosition,
220 ::Json::Value* additionalVars,
221 bool isTemplateControl
222 );
223
224 MCAPI ::std::shared_ptr<::UIControl>
225 createControlTreeRootOnly(::std::string_view name, ::ControlScreenAction& controlScreenAction);
226
227 MCAPI ::std::shared_ptr<::UIControl> getInitSelectedControl() const;
228
229 MCAPI void setGlobalVars(::Json::Value const& globalVars);
230
231 MCAPI ~UIControlFactory();
232 // NOLINTEND
233
234public:
235 // constructor thunks
236 // NOLINTBEGIN
237 MCAPI void* $ctor(
238 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
239 ::Json::Value const& globalVars,
240 ::UISoundPlayer const& soundPlayer,
241 ::FontHandle fontHandle,
242 ::FontHandle runeFontHandle,
243 ::FontHandle unicodeFontHandle,
244 ::FontHandle smoothFontHandle,
245 bool isLowMemory
246 );
247 // NOLINTEND
248
249public:
250 // destructor thunk
251 // NOLINTBEGIN
252 MCAPI void $dtor();
253 // NOLINTEND
254};
Definition ControlScreenAction.h:5
Definition CustomRenderComponent.h:5
Definition IUIDefRepository.h:5
Definition UIAnim.h:5
Definition UIControlFactoryContext.h:5
Definition UIControlFactory.h:5
Definition UIControl.h:5
Definition UIResolvedDef.h:5
Definition UISoundPlayer.h:5