8
8
9
9
#include < map>
10
10
#include < memory>
11
- # include " GDCore/Serialization/Serializer.h "
11
+
12
12
#include " GDCore/Project/QuickCustomization.h"
13
+ #include " GDCore/Project/QuickCustomizationVisibilitiesContainer.h"
14
+ #include " GDCore/Serialization/Serializer.h"
13
15
#include " GDCore/String.h"
14
16
15
17
namespace gd {
@@ -32,12 +34,21 @@ namespace gd {
32
34
*/
33
35
class GD_CORE_API BehaviorConfigurationContainer {
34
36
public:
35
- BehaviorConfigurationContainer () : folded(false ), quickCustomizationVisibility(QuickCustomization::Visibility::Default){};
37
+ BehaviorConfigurationContainer ()
38
+ : folded(false ),
39
+ quickCustomizationVisibility (QuickCustomization::Visibility::Default),
40
+ propertiesQuickCustomizationVisibilities() {};
36
41
BehaviorConfigurationContainer (const gd::String& name_,
37
42
const gd::String& type_)
38
- : name(name_), type(type_), folded(false ), quickCustomizationVisibility(QuickCustomization::Visibility::Default){};
43
+ : name(name_),
44
+ type(type_),
45
+ folded(false ),
46
+ quickCustomizationVisibility(QuickCustomization::Visibility::Default),
47
+ propertiesQuickCustomizationVisibilities() {};
39
48
virtual ~BehaviorConfigurationContainer ();
40
- virtual BehaviorConfigurationContainer* Clone () const { return new BehaviorConfigurationContainer (*this ); }
49
+ virtual BehaviorConfigurationContainer* Clone () const {
50
+ return new BehaviorConfigurationContainer (*this );
51
+ }
41
52
42
53
/* *
43
54
* \brief Return the name identifying the behavior
@@ -68,7 +79,6 @@ class GD_CORE_API BehaviorConfigurationContainer {
68
79
*/
69
80
std::map<gd::String, gd::PropertyDescriptor> GetProperties () const ;
70
81
71
-
72
82
/* *
73
83
* \brief Called when the IDE wants to update a custom property of the
74
84
* behavior
@@ -84,9 +94,7 @@ class GD_CORE_API BehaviorConfigurationContainer {
84
94
* \brief Called to initialize the content with the default properties
85
95
* for the behavior.
86
96
*/
87
- virtual void InitializeContent () {
88
- InitializeContent (content);
89
- };
97
+ virtual void InitializeContent () { InitializeContent (content); };
90
98
91
99
/* *
92
100
* \brief Serialize the behavior content.
@@ -115,15 +123,42 @@ class GD_CORE_API BehaviorConfigurationContainer {
115
123
*/
116
124
bool IsFolded () const { return folded; }
117
125
118
- void SetQuickCustomizationVisibility (QuickCustomization::Visibility visibility) {
126
+ /* *
127
+ * @brief Set if the whole behavior should be visible or not in the Quick
128
+ * Customization.
129
+ */
130
+ void SetQuickCustomizationVisibility (
131
+ QuickCustomization::Visibility visibility) {
119
132
quickCustomizationVisibility = visibility;
120
133
}
121
134
135
+ /* *
136
+ * @brief Get if the whole behavior should be visible or not in the Quick
137
+ * Customization.
138
+ */
122
139
QuickCustomization::Visibility GetQuickCustomizationVisibility () const {
123
140
return quickCustomizationVisibility;
124
141
}
125
142
126
- protected:
143
+ /* *
144
+ * @brief Get the map of properties and their visibility in the Quick
145
+ * Customization.
146
+ */
147
+ QuickCustomizationVisibilitiesContainer&
148
+ GetPropertiesQuickCustomizationVisibilities () {
149
+ return propertiesQuickCustomizationVisibilities;
150
+ }
151
+
152
+ /* *
153
+ * @brief Get the map of properties and their visibility in the Quick
154
+ * Customization.
155
+ */
156
+ const QuickCustomizationVisibilitiesContainer&
157
+ GetPropertiesQuickCustomizationVisibilities () const {
158
+ return propertiesQuickCustomizationVisibilities;
159
+ }
160
+
161
+ protected:
127
162
/* *
128
163
* \brief Called when the IDE wants to know about the custom properties of the
129
164
* behavior.
@@ -159,7 +194,7 @@ class GD_CORE_API BehaviorConfigurationContainer {
159
194
* \brief Called to initialize the content with the default properties
160
195
* for the behavior.
161
196
*/
162
- virtual void InitializeContent (gd::SerializerElement& behaviorContent){};
197
+ virtual void InitializeContent (gd::SerializerElement& behaviorContent) {};
163
198
164
199
private:
165
200
gd::String name; // /< Name of the behavior
@@ -169,6 +204,8 @@ class GD_CORE_API BehaviorConfigurationContainer {
169
204
gd::SerializerElement content; // Storage for the behavior properties
170
205
bool folded;
171
206
QuickCustomization::Visibility quickCustomizationVisibility;
207
+ QuickCustomizationVisibilitiesContainer
208
+ propertiesQuickCustomizationVisibilities;
172
209
};
173
210
174
211
} // namespace gd
0 commit comments