3#include "mc/_HeaderOutputPredefine.h"
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"
24class UIControlFactory :
public ::std::enable_shared_from_this<::UIControlFactory> {
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;
43 UIControlFactory& operator=(UIControlFactory
const&);
44 UIControlFactory(UIControlFactory
const&);
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,
61 MCAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIControl& ownerControl);
63 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
64 ::UIControlFactoryContext
const&,
65 ::UIControl
const& templateControl,
67 ::ui::ChildInsertPosition childInsertPosition
70 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
71 ::UIControlFactoryContext
const& context,
72 ::std::string_view name,
73 ::ControlScreenAction& controlScreenAction,
75 ::ui::ChildInsertPosition childInsertPosition,
76 ::Json::Value* additionalVars,
77 bool isTemplateControl
80 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeFromResolvedDef(
81 ::UIControlFactoryContext
const& context,
82 ::UIResolvedDef
const& resolvedDef,
83 ::UIControl* parentControl,
84 ::ControlScreenAction& controlScreenAction,
85 ::ui::ChildInsertPosition childInsertPosition,
86 bool isTemplateControl
89 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeRootOnly(
90 ::UIControlFactoryContext
const& context,
91 ::std::string_view name,
92 ::ControlScreenAction& controlScreenAction
95 MCAPI
void _createCustom(::UIControl& control, ::UIResolvedDef
const& def);
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
106 MCAPI
void _createGradientRenderer(::CustomRenderComponent& customRenderComponent, ::UIResolvedDef
const& def);
108 MCAPI ::FontHandle _getFontFromFontType(::std::string
const& fontType)
const;
110 MCAPI ::std::pair<::FontHandle, ::FontHandle> _getFontsFromFontType(::std::string
const& fontType)
const;
112 MCAPI
void _populateAnimations(::UIResolvedDef
const& def, ::UIControl& control);
114 MCAPI
void _populateButtonComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
116 MCAPI
void _populateCollectionComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
118 MCAPI
void _populateCollectionItemComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
120 MCAPI
void _populateControl(::UIResolvedDef
const& def, ::UIControl& control);
122 MCAPI
void _populateCustomRenderComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
124 MCAPI
void _populateDataBindingComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
126 MCAPI
void _populateDebugRendererComponent(::UIResolvedDef
const& def, ::UIControl& control);
128 MCAPI
void _populateDropdownComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
130 MCAPI
void _populateFactoryComponent(
131 ::UIControlFactoryContext
const& context,
132 ::UIResolvedDef
const& def,
133 ::UIControl& ownerControl
136 MCAPI
void _populateFocusComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
138 MCAPI
void _populateFocusContainerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
140 MCAPI
void _populateGestureComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
142 MCAPI
void _populateGridComponent(
143 ::UIControlFactoryContext
const& context,
144 ::UIResolvedDef
const& def,
145 ::UIControl& ownerControl
148 MCAPI
void _populateGridItemComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
150 MCAPI
void _populateImageCyclingComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
152 MCAPI
void _populateInputComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
154 MCAPI
void _populateLayoutComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
156 MCAPI
void _populatePageIndicatorGridComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
158 MCAPI
void _populatePageIndicatorManagerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
160 MCAPI
void _populateScreenComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
162 MCAPI
void _populateScrollViewComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
164 MCAPI
void _populateSelectionWheelComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
166 MCAPI
void _populateSliderBoxComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
168 MCAPI
void _populateSliderComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
170 MCAPI
void _populateSliderGroupManagerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
172 MCAPI
void _populateSoundComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl,
bool alwaysCreate);
174 MCAPI
void _populateSpriteComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
176 MCAPI
void _populateStackPanelComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
178 MCAPI
void _populateTextComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
180 MCAPI
void _populateTextCyclingComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
182 MCAPI
void _populateTextEditComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
185 _populateTextToSpeechComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl,
int controlPriorityDefault);
187 MCAPI
void _populateTextToSpeechContainerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
189 MCAPI
void _populateToggleComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
191 MCAPI
void _populateToggleGroupManagerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
193 MCAPI
void _populateTooltipTriggerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
196 _postCreate(::UIControlFactoryContext
const& context, ::UIControl& control, ::UIResolvedDef
const& controlDef);
198 MCAPI ::ui::TileDirection
const
199 _resolveTileDirection(::UIResolvedDef
const& ownerDef, ::UIControl&, ::std::string
const& propertyName);
201 MCAPI ~UIControlFactory();
208 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
209 ::Json::Value
const& globalVars,
210 ::UISoundPlayer
const& soundPlayer,
211 ::FontHandle fontHandle,
212 ::FontHandle runeFontHandle,
213 ::FontHandle unicodeFontHandle,
214 ::FontHandle smoothFontHandle,
Definition ControlScreenAction.h:5
Definition CustomRenderComponent.h:5
Definition IUIDefRepository.h:5
Definition UIControlFactoryContext.h:5
Definition UIControlFactory.h:5
Definition UIResolvedDef.h:5
Definition UISoundPlayer.h:5