LeviLamina
Loading...
Searching...
No Matches
UIPropertyBag.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/utility/PropertyBag.h"
7#include "mc/deps/core/utility/buffer_span.h"
8
9// auto generated forward declare list
10// clang-format off
11class UIControl;
12class UiExpression;
13namespace Json { class Value; }
14namespace mce { class Color; }
15// clang-format on
16
17class UIPropertyBag : public ::PropertyBag {
18public:
19 // UIPropertyBag inner types declare
20 // clang-format off
21 struct ContextObject;
23 // clang-format on
24
25 // UIPropertyBag inner types define
26 struct ContextObject {
27 public:
28 // member variables
29 // NOLINTBEGIN
30 ::ll::TypedStorage<4, 4, int> count;
31 // NOLINTEND
32 };
33
35 public:
36 // member variables
37 // NOLINTBEGIN
38 ::ll::TypedStorage<8, 32, ::std::string> targetPropertyName;
39 ::ll::TypedStorage<8, 16, ::std::weak_ptr<::UIControl>> targetControl;
40 ::ll::TypedStorage<
41 8,
42 64,
43 ::std::function<void(
44 ::std::weak_ptr<::UIControl> const&,
45 ::std::string_view,
46 ::Json::Value const&,
47 ::UIPropertyBag::ContextObject
48 )>>
49 callback;
50 // NOLINTEND
51
52 public:
53 // prevent constructor by default
54 PropertyChangedNotificationInfo& operator=(PropertyChangedNotificationInfo const&);
55 PropertyChangedNotificationInfo();
56
57 public:
58 // member functions
59 // NOLINTBEGIN
60 MCAPI PropertyChangedNotificationInfo(::UIPropertyBag::PropertyChangedNotificationInfo const&);
61
62 MCAPI ~PropertyChangedNotificationInfo();
63 // NOLINTEND
64
65 public:
66 // constructor thunks
67 // NOLINTBEGIN
68 MCAPI void* $ctor(::UIPropertyBag::PropertyChangedNotificationInfo const&);
69 // NOLINTEND
70
71 public:
72 // destructor thunk
73 // NOLINTBEGIN
74 MCAPI void $dtor();
75 // NOLINTEND
76 };
77
78 using PropertyChangedNotificationCallback = ::std::function<void(
79 ::std::weak_ptr<::UIControl> const&,
80 ::std::string_view,
81 ::Json::Value const&,
82 ::UIPropertyBag::ContextObject
83 )>;
84
85 using PropertyChangedNotificationInfoVector = ::std::vector<::UIPropertyBag::PropertyChangedNotificationInfo>;
86
87 using PropertyInfoList =
88 ::std::map<::std::string, ::std::vector<::UIPropertyBag::PropertyChangedNotificationInfo>, ::std::less<void>>;
89
90public:
91 // member variables
92 // NOLINTBEGIN
93 ::ll::TypedStorage<
94 8,
95 16,
96 ::std::map<::std::string, ::std::vector<::UIPropertyBag::PropertyChangedNotificationInfo>, ::std::less<void>>>
97 mPropertyChangedNotificationInfoMap;
98 // NOLINTEND
99
100public:
101 // virtual functions
102 // NOLINTBEGIN
103 virtual ~UIPropertyBag();
104 // NOLINTEND
105
106public:
107 // member functions
108 // NOLINTBEGIN
109 MCAPI UIPropertyBag();
110
111 MCAPI explicit UIPropertyBag(::Json::Value const& jsonValue);
112
113 MCAPI void _handlePropertyChangedNotifications(
114 ::std::string_view sourcePropertyName,
115 ::Json::Value const& newValue,
116 ::UIPropertyBag::ContextObject context
117 );
118
119 MCAPI void append(::UIPropertyBag const& propertyBag);
120
121 MCAPI void appendNoOverwrite(::UIPropertyBag const& propertyBag);
122
123 MCAPI void clearWeakRegistrations();
124
125 MCAPI void registerForPropertyChangedNotification(
126 ::std::string const& sourcePropertyName,
127 ::std::string const& targetPropertyName,
128 ::std::weak_ptr<::UIControl> targetControl,
129 ::std::function<void(
130 ::std::weak_ptr<::UIControl> const&,
131 ::std::string_view,
132 ::Json::Value const&,
133 ::UIPropertyBag::ContextObject
134 )> callback
135 );
136
137 MCAPI void registerForPropertyChangedNotification(
138 ::UiExpression const& sourcePropertyName,
139 ::std::string const& targetPropertyName,
140 ::std::weak_ptr<::UIControl> targetControl,
141 ::std::function<void(
142 ::std::weak_ptr<::UIControl> const&,
143 ::std::string_view,
144 ::Json::Value const&,
145 ::UIPropertyBag::ContextObject
146 )> callback
147 );
148
149 MCAPI void set(::std::string_view key, ::mce::Color color);
150
151 MCAPI void set(::std::string_view key, ::glm::ivec2 gridSize);
152
153 MCAPI void set(::std::string_view key, ::glm::vec2 uv);
154
155 MCAPI void set(::std::string_view key, ::buffer_span<::std::string> val);
156
157 MCAPI void set(::std::string_view key, ::buffer_span<int> val);
158
159 MCAPI void set(::std::string_view key, ::Json::Value const& val, ::UIPropertyBag::ContextObject context);
160 // NOLINTEND
161
162public:
163 // constructor thunks
164 // NOLINTBEGIN
165 MCAPI void* $ctor();
166
167 MCAPI void* $ctor(::Json::Value const& jsonValue);
168 // NOLINTEND
169
170public:
171 // destructor thunk
172 // NOLINTBEGIN
173 MCAPI void $dtor();
174 // NOLINTEND
175
176public:
177 // vftables
178 // NOLINTBEGIN
179 MCNAPI static void** $vftable();
180 // NOLINTEND
181};
Definition Value.h:16
Definition PropertyBag.h:9
Definition UIControl.h:5
Definition UIPropertyBag.h:5
static MCAPI void ** $vftable()
Definition UiExpression.h:5
Definition Color.h:13
Definition UIPropertyBag.h:14