Skip to content
LeviMC
English
AutoLightDark
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
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 MCNAPI ::UIAnim* _addAnimToComponent(::std::string_view name, ::UIResolvedDef& def, ::UIControl& ownerControl);
55
56 MCNAPI ::std::shared_ptr<::UIControl> _createControlTree(
58 ::UIControl const& templateControl,
59 ::UIControl* parent,
60 ::ui::ChildInsertPosition childInsertPosition
61 );
62
63 MCNAPI ::std::shared_ptr<::UIControl> _createControlTree(
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 MCNAPI ::std::shared_ptr<::UIControl> _createControlTreeFromResolvedDef(
75 ::UIResolvedDef const& resolvedDef,
76 ::UIControl* parentControl,
77 ::ControlScreenAction& controlScreenAction,
78 ::ui::ChildInsertPosition childInsertPosition,
79 bool isTemplateControl
80 );
81
82 MCNAPI ::std::shared_ptr<::UIControl> _createControlTreeRootOnly(
84 ::std::string_view name,
85 ::ControlScreenAction& controlScreenAction
86 );
87
88 MCNAPI ::std::shared_ptr<::UIControl> _createFromResolvedDef(
90 ::UIResolvedDef const& resolvedDef,
91 ::UIControl* parentControl,
92 ::ControlScreenAction& controlScreenAction,
93 ::ui::ChildInsertPosition childInsertPosition,
94 bool isTemplateControl
95 );
96
97 MCNAPI void _populateControl(::UIResolvedDef const& def, ::UIControl& control);
98
99 MCNAPI void _populateDataBindingComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
100
101 MCNAPI void _populateFocusComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
102
105 ::UIResolvedDef const& def,
106 ::UIControl& ownerControl
107 );
108
109 MCNAPI void _populateInputComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
110
111 MCNAPI void _populateLayoutComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
112
113 MCNAPI void _populateSoundComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, bool alwaysCreate);
114
115 MCNAPI void _populateSpriteComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
116
117 MCNAPI void _populateTextComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
118
120 // NOLINTEND
121
122public:
123 // static functions
124 // NOLINTBEGIN
125 MCNAPI static void
127
128 MCNAPI static void _populateButtonComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
129
130 MCNAPI static void _populateCollectionComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
131
132 MCNAPI static void _populateDebugRendererComponent(::UIResolvedDef const& def, ::UIControl& control);
133
134 MCNAPI static void _populateGestureComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
135
136 MCNAPI static void _populatePageIndicatorManagerComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
137
138 MCNAPI static void
139 _populateTextToSpeechComponent(::UIResolvedDef const& def, ::UIControl& ownerControl, int controlPriorityDefault);
140
141 MCNAPI static void _populateToggleComponent(::UIResolvedDef const& def, ::UIControl& ownerControl);
142 // NOLINTEND
143
144public:
145 // constructor thunks
146 // NOLINTBEGIN
147 MCNAPI void* $ctor(
148 ::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const> uiDefRepo,
149 ::Json::Value const& globalVars,
150 ::UISoundPlayer const& soundPlayer,
151 ::Bedrock::NotNullNonOwnerPtr<::FontRepository const> fontRepository,
152 bool isLowMemory
153 );
154 // NOLINTEND
155
156public:
157 // destructor thunk
158 // NOLINTBEGIN
159 MCNAPI void $dtor();
160 // NOLINTEND
161};
Definition ControlScreenAction.h:5
Definition CustomRenderComponent.h:5
Definition FontRepository.h:5
Definition IUIDefRepository.h:5
Definition Value.h:16
Definition UIAnim.h:5
Definition UIControlFactoryContext.h:5
Definition UIControlFactory.h:5
MCAPI void _populateDataBindingComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _populatePageIndicatorManagerComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
MCAPI void _populateLayoutComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
MCAPI void _populateGridComponent(::UIControlFactoryContext const &context, ::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _populateTextToSpeechComponent(::UIResolvedDef const &def, ::UIControl &ownerControl, int controlPriorityDefault)
MCAPI void $dtor()
static MCAPI void _populateDebugRendererComponent(::UIResolvedDef const &def, ::UIControl &control)
MCAPI void * $ctor(::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const > uiDefRepo, ::Json::Value const &globalVars, ::UISoundPlayer const &soundPlayer, ::Bedrock::NotNullNonOwnerPtr<::FontRepository const > fontRepository, bool isLowMemory)
MCAPI UIControlFactory(::Bedrock::NotNullNonOwnerPtr<::IUIDefRepository const > uiDefRepo, ::Json::Value const &globalVars, ::UISoundPlayer const &soundPlayer, ::Bedrock::NotNullNonOwnerPtr<::FontRepository const > fontRepository, bool isLowMemory)
MCAPI ~UIControlFactory()
MCAPI ::std::shared_ptr<::UIControl > _createControlTree(::UIControlFactoryContext const &context, ::std::string_view name, ::ControlScreenAction &controlScreenAction, ::UIControl *parent, ::ui::ChildInsertPosition childInsertPosition, ::Json::Value *additionalVars, bool isTemplateControl)
MCAPI ::std::shared_ptr<::UIControl > _createFromResolvedDef(::UIControlFactoryContext const &context, ::UIResolvedDef const &resolvedDef, ::UIControl *parentControl, ::ControlScreenAction &controlScreenAction, ::ui::ChildInsertPosition childInsertPosition, bool isTemplateControl)
MCAPI ::std::shared_ptr<::UIControl > _createControlTreeFromResolvedDef(::UIControlFactoryContext const &context, ::UIResolvedDef const &resolvedDef, ::UIControl *parentControl, ::ControlScreenAction &controlScreenAction, ::ui::ChildInsertPosition childInsertPosition, bool isTemplateControl)
MCAPI void _populateFocusComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _populateCollectionComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
MCAPI void _populateSoundComponent(::UIResolvedDef const &def, ::UIControl &ownerControl, bool alwaysCreate)
MCAPI::UIAnim * _addAnimToComponent(::std::string_view name, ::UIResolvedDef &def, ::UIControl &ownerControl)
MCAPI void _populateControl(::UIResolvedDef const &def, ::UIControl &control)
static MCAPI void _populateGestureComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _populateToggleComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
MCAPI void _populateTextComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
MCAPI ::std::shared_ptr<::UIControl > _createControlTreeRootOnly(::UIControlFactoryContext const &context, ::std::string_view name, ::ControlScreenAction &controlScreenAction)
MCAPI ::std::shared_ptr<::UIControl > _createControlTree(::UIControlFactoryContext const &, ::UIControl const &templateControl, ::UIControl *parent, ::ui::ChildInsertPosition childInsertPosition)
MCAPI void _populateSpriteComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _populateButtonComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
static MCAPI void _createGradientRenderer(::CustomRenderComponent &customRenderComponent, ::UIResolvedDef const &def)
MCAPI void _populateInputComponent(::UIResolvedDef const &def, ::UIControl &ownerControl)
Definition UIControl.h:5
Definition UIResolvedDef.h:5
Definition UISoundPlayer.h:5
Definition context.h:5