LeviLamina
Loading...
Searching...
No Matches
VisualTree.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/gui/DirtyFlag.h"
7#include "mc/client/gui/controls/ControlScreenAction.h"
8#include "mc/deps/json/Value.h"
9
10// auto generated forward declare list
11// clang-format off
12class TaskGroup;
13class UIControl;
16class VisualTreeProxy;
17// clang-format on
18
19class VisualTree : public ::ControlScreenAction {
20public:
21 // member variables
22 // NOLINTBEGIN
23 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::UIControl>> mRootControl;
24 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> mInitialSelectedControl;
25 ::ll::TypedStorage<8, 32, ::std::string> mRootControlName;
26 ::ll::TypedStorage<4, 4, ::ui::DirtyFlag> mDirty;
27 ::ll::TypedStorage<1, 1, bool> mClearPersistantMeshes;
28 ::ll::TypedStorage<8, 8, ::UIMeasureStrategy*> mMeasureStrategy;
29 ::ll::TypedStorage<8, 24, ::std::vector<::std::pair<void*, ::std::weak_ptr<::UIControl>>>>
30 mNeedsToRemoveDeadDependencies;
31 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIControl>>> mControlsToUpdate;
32 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIControl>>> mControlsToUpdateBacklog;
33 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIControl>>> mControlsToRemoveFromCollections;
34 ::ll::TypedStorage<8, 24, ::std::vector<::std::shared_ptr<::UIControl>>> mControlsToBind;
35 ::ll::TypedStorage<1, 1, bool> mUpdateCollectionsFromRoot;
36 ::ll::TypedStorage<1, 1, bool> mUpdateBindsFromRoot;
37 ::ll::TypedStorage<1, 1, bool> mTextEditFocusChanged;
38 ::ll::TypedStorage<1, 1, bool> mTextEditAlwaysListeningChanged;
39 ::ll::TypedStorage<1, 1, bool> mRootControlDestroyed;
40 ::ll::TypedStorage<1, 1, bool> mRootControlWasInitialized;
41 ::ll::TypedStorage<8, 16, ::Json::Value> mInitGlobalVars;
42 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::VisualTreeProxy>> mProxy;
43 // NOLINTEND
44
45public:
46 // prevent constructor by default
47 VisualTree();
48
49public:
50 // virtual functions
51 // NOLINTBEGIN
52 virtual ~VisualTree() /*override*/;
53
54 virtual ::std::shared_ptr<::UIControl> getControlWithName(::std::string const& name) /*override*/;
55
56 virtual bool getDirty() /*override*/;
57
58 virtual bool getDirty(::ui::DirtyFlag flag) /*override*/;
59
60 virtual ::ui::DirtyFlag getDirtyValue() /*override*/;
61
62 virtual void addDirtyFlag(::ui::DirtyFlag flag) /*override*/;
63
64 virtual void measureControls(::UIControl& measureRoot) /*override*/;
65
66 virtual void markToRemoveDeadDependencies(::std::shared_ptr<::UIControl> control) /*override*/;
67
68 virtual void updateControlCollection(::std::shared_ptr<::UIControl> control) /*override*/;
69
70 virtual void updateControlCollectionFromRoot() /*override*/;
71
72 virtual void removeFromControlCollection(::std::shared_ptr<::UIControl> control) /*override*/;
73
74 virtual void updateControlBinds(::std::shared_ptr<::UIControl> control) /*override*/;
75
76 virtual void updateBindsFromRoot() /*override*/;
77
78 virtual void markTextEditFocusChanged() /*override*/;
79
80 virtual void markTextEditAlwaysListeningChanged() /*override*/;
81 // NOLINTEND
82
83public:
84 // member functions
85 // NOLINTBEGIN
86 MCAPI VisualTree(::std::string const& rootControlName, ::Json::Value const& initGlobalVars);
87
88 MCAPI void clearBindUpdateFromRoot();
89
90 MCAPI void clearControlCollectionUpdateFromRoot();
91
92 MCAPI void clearControlsToBind();
93
94 MCAPI void clearControlsToRemoveFromCollections();
95
96 MCAPI void clearControlsUpdate(bool clearBacklog);
97
98 MCAPI void clearTextEditAlwaysListeningChanged();
99
100 MCAPI void clearTextEditFocusChanged();
101
102 MCAPI void destroyAsync(::TaskGroup& taskGroup);
103
104 MCFOLD bool getClearPersistantMeshes();
105
106 MCAPI ::std::shared_ptr<::UIControl> getControlByName(::std::string const& name, bool visibleOnly);
107
108 MCAPI ::std::vector<::std::shared_ptr<::UIControl>>
109 getControls(::std::function<bool(::UIControl const&)> predicate);
110
111 MCFOLD ::std::vector<::std::shared_ptr<::UIControl>>&& getControlsToBind();
112
113 MCFOLD ::std::vector<::std::shared_ptr<::UIControl>> const& getControlsToRemoveFromCollections();
114
115 MCAPI ::std::vector<::std::shared_ptr<::UIControl>> const& getControlsToUpdate();
116
117 MCAPI ::std::shared_ptr<::UIControl> getFirstControl(::std::function<bool(::UIControl const&)> const& predicate);
118
119 MCAPI ::std::shared_ptr<::UIControl>
120 getFirstControl(::UIControl& control, ::std::function<bool(::UIControl const&)> const& predicate);
121
122 MCAPI ::std::shared_ptr<::UIControl>
123 getFirstVisibleControl(::std::function<bool(::UIControl const&)> const& predicate);
124
125 MCFOLD ::Json::Value const& getInitGlobalVars() const;
126
127 MCAPI ::std::shared_ptr<::UIControl> getInitialSelectedControl() const;
128
129 MCFOLD ::VisualTreeProxy* getProxy();
130
131 MCFOLD ::std::shared_ptr<::UIControl> getRootControl();
132
133 MCAPI ::std::vector<::std::shared_ptr<::UIControl>>
134 getVisibleControls(::std::function<bool(::UIControl const&)> predicate);
135
136 MCAPI bool hasControlsToBind() const;
137
138 MCAPI bool hasControlsToUpdate();
139
140 MCAPI void initRootControl(::std::shared_ptr<::UIControl> rootControl);
141
142 MCFOLD bool needsControlBindsFromRoot() const;
143
144 MCFOLD bool needsControlCollectionUpdateFromRoot() const;
145
146 MCAPI ::std::unique_ptr<::VisualTree> recreateControlTree(::UIControlFactory& controlFactory);
147
148 MCAPI void removeDeadDependencies();
149
150 MCAPI void removeDirtyFlag(::ui::DirtyFlag flag);
151
152 MCAPI void reset();
153
154 MCAPI void setClearPersistantMeshes(bool clearMeshes);
155
156 MCAPI void setDirty(bool dirty);
157
158 MCAPI void setInitialSelectedControl(::std::shared_ptr<::UIControl> control);
159
160 MCAPI void setMeasureStrategy(::UIMeasureStrategy* measureStrategy);
161
162 MCFOLD void setRootControlName(::std::string const& name);
163
164 MCAPI void storeGlobalVars(::Json::Value const& vars);
165
166 MCFOLD bool textEditAlwaysListeningChanged() const;
167
168 MCFOLD bool textEditFocusChanged() const;
169
170 MCAPI void visitTree(::UIControl* fromControl, ::std::function<bool(::UIControl&, int, bool)> visitor);
171 // NOLINTEND
172
173public:
174 // static functions
175 // NOLINTBEGIN
176 MCAPI static void _destroyAsync(::TaskGroup& taskGroup, ::std::shared_ptr<::UIControl> control);
177 // NOLINTEND
178
179public:
180 // constructor thunks
181 // NOLINTBEGIN
182 MCAPI void* $ctor(::std::string const& rootControlName, ::Json::Value const& initGlobalVars);
183 // NOLINTEND
184
185public:
186 // destructor thunk
187 // NOLINTBEGIN
188 MCAPI void $dtor();
189 // NOLINTEND
190
191public:
192 // virtual function thunks
193 // NOLINTBEGIN
194 MCAPI ::std::shared_ptr<::UIControl> $getControlWithName(::std::string const& name);
195
196 MCAPI bool $getDirty();
197
198 MCAPI bool $getDirty(::ui::DirtyFlag flag);
199
200 MCFOLD ::ui::DirtyFlag $getDirtyValue();
201
202 MCAPI void $addDirtyFlag(::ui::DirtyFlag flag);
203
204 MCAPI void $measureControls(::UIControl& measureRoot);
205
206 MCAPI void $markToRemoveDeadDependencies(::std::shared_ptr<::UIControl> control);
207
208 MCAPI void $updateControlCollection(::std::shared_ptr<::UIControl> control);
209
210 MCAPI void $updateControlCollectionFromRoot();
211
212 MCAPI void $removeFromControlCollection(::std::shared_ptr<::UIControl> control);
213
214 MCAPI void $updateControlBinds(::std::shared_ptr<::UIControl> control);
215
216 MCAPI void $updateBindsFromRoot();
217
218 MCAPI void $markTextEditFocusChanged();
219
220 MCAPI void $markTextEditAlwaysListeningChanged();
221 // NOLINTEND
222
223public:
224 // vftables
225 // NOLINTBEGIN
226 MCNAPI static void** $vftable();
227 // NOLINTEND
228};
Definition ControlScreenAction.h:5
Definition TaskGroup.h:55
Definition UIControlFactory.h:5
Definition UIControl.h:5
Definition UIMeasureStrategy.h:5
Definition VisualTreeProxy.h:5
Definition VisualTree.h:5
static MCAPI void ** $vftable()