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/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/json/Value.h"
9
10// auto generated forward declare list
11// clang-format off
14class FontRepository;
16class UIAnim;
17class UIControl;
19class UIResolvedDef;
20class UISoundPlayer;
21// clang-format on
22
23class UIControlFactory : public ::std::enable_shared_from_this<::UIControlFactory> {
24public:
25 // member variables
26 // NOLINTBEGIN
27 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const>> mUIDefRepository;
28 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::FontRepository const>> mFontRepository;
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<1, 1, bool> mLowMemoryMode;
34 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mInitialSelectedControl;
35 // NOLINTEND
36
37public:
38 // prevent constructor by default
39 UIControlFactory& operator=(UIControlFactory const&);
40 UIControlFactory(UIControlFactory const&);
41 UIControlFactory();
42
43public:
44 // member functions
45 // NOLINTBEGIN
46 MCAPI UIControlFactory(
47 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
48 ::Json::Value const& globalVars,
49 ::UISoundPlayer const& soundPlayer,
50 ::Bedrock::NotNullNonOwnerPtr<::FontRepository const> fontRepository,
51 bool isLowMemory
52 );
53
54 MCAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIResolvedDef& def, ::UIControl& ownerControl);
55
56 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
57 ::UIControlFactoryContext const&,
58 ::UIControl const& templateControl,
59 ::UIControl* parent,
60 ::ui::ChildInsertPosition childInsertPosition
61 );
62
63 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
64 ::UIControlFactoryContext const& context,
65 ::std::string_view name,
66 ::ControlScreenAction& controlScreenAction,
67 ::UIControl* parent,
68 ::ui::ChildInsertPosition childInsertPosition,
69 ::Json::Value* additionalVars,
70 bool isTemplateControl
71 );
72
73 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeFromResolvedDef(
74 ::UIControlFactoryContext const& context,
75 ::UIResolvedDef const& resolvedDef,
76 ::UIControl* parentControl,
77 ::ControlScreenAction& controlScreenAction,
78 ::ui::ChildInsertPosition childInsertPosition,
79 bool isTemplateControl
80 );
81
82 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeRootOnly(
83 ::UIControlFactoryContext const& context,
84 ::std::string_view name,
85 ::ControlScreenAction& controlScreenAction
86 );
87
88 MCAPI ::std::shared_ptr<::UIControl> _createFromResolvedDef(
89 ::UIControlFactoryContext const& context,
90 ::UIResolvedDef const& resolvedDef,
91 ::UIControl* parentControl,
92 ::ControlScreenAction& controlScreenAction,
93 ::ui::ChildInsertPosition childInsertPosition,
94 bool isTemplateControl
95 );
96
97 MCAPI void _populateControl(::UIResolvedDef const& def, ::UIControl& control);
98
99 MCAPI void _populateDataBindingComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
100
101 MCAPI void _populateFocusComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
102
103 MCAPI void _populateGridComponent(
104 ::UIControlFactoryContext const& context,
105 ::UIResolvedDef const& def,
106 ::UIControl& ownerControl
107 );
108
109 MCAPI void _populateInputComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
110
111 MCAPI void _populateLayoutComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
112
113 MCAPI void _populateSoundComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, bool alwaysCreate);
114
115 MCAPI void _populateSpriteComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
116
117 MCAPI void _populateTextComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
118
119 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
120 ::UIControl const& templateControl,
121 ::UIControl* parent,
122 ::ui::ChildInsertPosition childInsertPosition
123 );
124
125 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
126 ::std::string_view name,
127 ::ControlScreenAction& controlScreenAction,
128 ::UIControl* parent,
129 ::ui::ChildInsertPosition childInsertPosition,
130 ::Json::Value* additionalVars,
131 bool isTemplateControl
132 );
133
134 MCAPI ::std::shared_ptr<::UIControl>
135 createControlTreeRootOnly(::std::string_view name, ::ControlScreenAction& controlScreenAction);
136
137 MCAPI ~UIControlFactory();
138 // NOLINTEND
139
140public:
141 // static functions
142 // NOLINTBEGIN
143 MCAPI static void
144 _createGradientRenderer(::CustomRenderComponent& customRenderComponent, ::UIResolvedDef const& def);
145
146 MCAPI static void _populateButtonComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
147
148 MCAPI static void _populateCollectionComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
149
150 MCAPI static void _populateDebugRendererComponent(::UIResolvedDef const& def, ::UIControl& control);
151
152 MCAPI static void _populateGestureComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
153
154 MCAPI static void _populatePageIndicatorManagerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
155
156 MCAPI static void
157 _populateTextToSpeechComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, int controlPriorityDefault);
158
159 MCAPI static void _populateToggleComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
160 // NOLINTEND
161
162public:
163 // constructor thunks
164 // NOLINTBEGIN
165 MCAPI void* $ctor(
166 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
167 ::Json::Value const& globalVars,
168 ::UISoundPlayer const& soundPlayer,
169 ::Bedrock::NotNullNonOwnerPtr<::FontRepository const> fontRepository,
170 bool isLowMemory
171 );
172 // NOLINTEND
173
174public:
175 // destructor thunk
176 // NOLINTBEGIN
177 MCAPI void $dtor();
178 // NOLINTEND
179};
Definition ControlScreenAction.h:5
Definition CustomRenderComponent.h:5
Definition FontRepository.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