3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/ChildInsertPosition.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/json/Value.h"
23class UIControlFactory :
public ::std::enable_shared_from_this<::UIControlFactory> {
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;
39 UIControlFactory& operator=(UIControlFactory
const&);
40 UIControlFactory(UIControlFactory
const&);
46 MCAPI UIControlFactory(
47 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
48 ::Json::Value
const& globalVars,
49 ::UISoundPlayer
const& soundPlayer,
50 ::Bedrock::NotNullNonOwnerPtr<::FontRepository const> fontRepository,
54 MCAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIResolvedDef& def, ::UIControl& ownerControl);
56 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
57 ::UIControlFactoryContext
const&,
58 ::UIControl
const& templateControl,
60 ::ui::ChildInsertPosition childInsertPosition
63 MCAPI ::std::shared_ptr<::UIControl> _createControlTree(
64 ::UIControlFactoryContext
const& context,
65 ::std::string_view name,
66 ::ControlScreenAction& controlScreenAction,
68 ::ui::ChildInsertPosition childInsertPosition,
69 ::Json::Value* additionalVars,
70 bool isTemplateControl
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
82 MCAPI ::std::shared_ptr<::UIControl> _createControlTreeRootOnly(
83 ::UIControlFactoryContext
const& context,
84 ::std::string_view name,
85 ::ControlScreenAction& controlScreenAction
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
97 MCAPI
void _populateControl(::UIResolvedDef
const& def, ::UIControl& control);
99 MCAPI
void _populateDataBindingComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
101 MCAPI
void _populateFocusComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
103 MCAPI
void _populateGridComponent(
104 ::UIControlFactoryContext
const& context,
105 ::UIResolvedDef
const& def,
106 ::UIControl& ownerControl
109 MCAPI
void _populateInputComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
111 MCAPI
void _populateLayoutComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
113 MCAPI
void _populateSoundComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl,
bool alwaysCreate);
115 MCAPI
void _populateSpriteComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
117 MCAPI
void _populateTextComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
119 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
120 ::UIControl
const& templateControl,
122 ::ui::ChildInsertPosition childInsertPosition
125 MCAPI ::std::shared_ptr<::UIControl> createControlTree(
126 ::std::string_view name,
127 ::ControlScreenAction& controlScreenAction,
129 ::ui::ChildInsertPosition childInsertPosition,
130 ::Json::Value* additionalVars,
131 bool isTemplateControl
134 MCAPI ::std::shared_ptr<::UIControl>
135 createControlTreeRootOnly(::std::string_view name, ::ControlScreenAction& controlScreenAction);
137 MCAPI ~UIControlFactory();
144 _createGradientRenderer(::CustomRenderComponent& customRenderComponent, ::UIResolvedDef
const& def);
146 MCAPI
static void _populateButtonComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
148 MCAPI
static void _populateCollectionComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
150 MCAPI
static void _populateDebugRendererComponent(::UIResolvedDef
const& def, ::UIControl& control);
152 MCAPI
static void _populateGestureComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
154 MCAPI
static void _populatePageIndicatorManagerComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
157 _populateTextToSpeechComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl,
int controlPriorityDefault);
159 MCAPI
static void _populateToggleComponent(::UIResolvedDef
const& def, ::UIControl& ownerControl);
166 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
167 ::Json::Value
const& globalVars,
168 ::UISoundPlayer
const& soundPlayer,
169 ::Bedrock::NotNullNonOwnerPtr<::FontRepository const> fontRepository,
Definition ControlScreenAction.h:5
Definition CustomRenderComponent.h:5
Definition FontRepository.h:5
Definition IUIDefRepository.h:5
Definition UIControlFactoryContext.h:5
Definition UIControlFactory.h:5
Definition UIResolvedDef.h:5
Definition UISoundPlayer.h:5