LeviLamina
Loading...
Searching...
No Matches
FactoryComponent.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/controls/UIComponent.h"
8
9// auto generated forward declare list
10// clang-format off
11class UIControl;
13class UIPropertyBag;
14namespace Json { class Value; }
15// clang-format on
16
17class FactoryComponent : public ::UIComponent {
18public:
19 // member variables
20 // NOLINTBEGIN
21 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControlFactory>> mControlFactory;
22 ::ll::TypedStorage<8, 32, ::std::string> mFactoryName;
23 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::std::string>> mControlIdToTemplateLookup;
24 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<::std::string const, ::Json::Value const>>> mVariables;
25 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIControl>> mControlTemplate;
26 ::ll::TypedStorage<8, 24, ::std::vector<::std::weak_ptr<::UIControl>>> mProgeny;
27 ::ll::TypedStorage<1, 1, bool> mFactoryIsChild;
28 ::ll::TypedStorage<4, 4, int> mMaxSize;
29 ::ll::TypedStorage<4, 4, ::ui::ChildInsertPosition> mInsertPosition;
30 // NOLINTEND
31
32public:
33 // prevent constructor by default
34 FactoryComponent();
35
36public:
37 // virtual functions
38 // NOLINTBEGIN
39 virtual ::std::unique_ptr<::UIComponent> clone(::UIControl& cloneOwner) const /*override*/;
40
41 virtual void reset() /*override*/;
42 // NOLINTEND
43
44public:
45 // member functions
46 // NOLINTBEGIN
47 MCAPI FactoryComponent(::UIControl& owner, ::std::weak_ptr<::UIControlFactory> factoryPtr);
48
49 MCAPI void _prepareControlForDestruction(::std::shared_ptr<::UIControl> control);
50
51 MCAPI void _trim();
52
53 MCAPI void addControlIdToTemplateName(::std::string const& controlId, ::std::string const& templateName);
54
55 MCAPI void addVariable(::std::string const& varName, ::Json::Value const& var);
56
57 MCAPI ::std::weak_ptr<::UIControl> create(::UIPropertyBag const& properties, bool ensureCreation);
58
59 MCAPI void destroy(::std::string const& name);
60
61 MCAPI void destroyAll();
62
63 MCAPI void destroyAllStartingAtIndex(uint index);
64
65 MCFOLD ::std::shared_ptr<::UIControl> getControlTemplate() const;
66
67 MCFOLD ::std::string const& getFactoryName() const;
68
69 MCAPI void removeExcessControls();
70
71 MCAPI void setControlTemplate(::std::shared_ptr<::UIControl> controlTemplate);
72
73 MCAPI void setFactoryIsChild(bool isChild);
74
75 MCFOLD void setFactoryName(::std::string const& name);
76
77 MCFOLD void setInsertPosition(::ui::ChildInsertPosition insertPosition);
78
79 MCAPI void setMaxSize(int maxSize);
80 // NOLINTEND
81
82public:
83 // constructor thunks
84 // NOLINTBEGIN
85 MCAPI void* $ctor(::UIControl& owner, ::std::weak_ptr<::UIControlFactory> factoryPtr);
86 // NOLINTEND
87
88public:
89 // virtual function thunks
90 // NOLINTBEGIN
91 MCAPI ::std::unique_ptr<::UIComponent> $clone(::UIControl& cloneOwner) const;
92
93 MCFOLD void $reset();
94 // NOLINTEND
95
96public:
97 // vftables
98 // NOLINTBEGIN
99 MCNAPI static void** $vftable();
100 // NOLINTEND
101};
Definition FactoryComponent.h:5
static MCAPI void ** $vftable()
Definition Value.h:16
Definition UIComponent.h:5
Definition UIControlFactory.h:5
Definition UIControl.h:5
Definition UIPropertyBag.h:5