11 #include "GDCore/Project/QuickCustomization.h"
12 #include "GDCore/Project/QuickCustomizationVisibilitiesContainer.h"
13 #include "GDCore/Serialization/Serializer.h"
14 #include "GDCore/String.h"
17 class PropertyDescriptor;
18 class SerializerElement;
21 class ArbitraryResourceWorker;
39 quickCustomizationVisibility(QuickCustomization::Visibility::Default),
40 propertiesQuickCustomizationVisibilities() {};
46 quickCustomizationVisibility(QuickCustomization::Visibility::Default),
47 propertiesQuickCustomizationVisibilities() {};
77 std::map<gd::String, gd::PropertyDescriptor> GetProperties()
const;
86 return UpdateProperty(content, name, value);
97 return RenameProperty(content, oldName, newName);
107 content.RemoveChild(name);
108 content.RemoveAttribute(name);
117 return content.HasChild(name) || content.HasAttribute(name);
125 InitializeContent(content);
170 quickCustomizationVisibility = visibility;
178 return quickCustomizationVisibility;
187 return propertiesQuickCustomizationVisibilities;
196 return propertiesQuickCustomizationVisibilities;
227 virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties(
269 propertiesQuickCustomizationVisibilities;
ArbitraryResourceWorker is used so as to inventory resources and sometimes update them.
Definition: ArbitraryResourceWorker.h:44
Base class for containers of behavior configuration. They can be attached to objects (Behavior) or la...
Definition: BehaviorConfigurationContainer.h:35
bool UpdateProperty(const gd::String &name, const gd::String &value)
Called when the IDE wants to update a custom property of the behavior.
Definition: BehaviorConfigurationContainer.h:85
const QuickCustomizationVisibilitiesContainer & GetPropertiesQuickCustomizationVisibilities() const
Get the map of properties and their visibility in the Quick Customization.
Definition: BehaviorConfigurationContainer.h:195
void RemoveProperty(const gd::String &name)
Called when the IDE wants to remove a custom property from the behavior.
Definition: BehaviorConfigurationContainer.h:106
virtual bool RenameProperty(gd::SerializerElement &behaviorContent, const gd::String &oldName, const gd::String &newName)
Called when the IDE wants to rename a custom property of the object configuration.
Definition: BehaviorConfigurationContainer.h:248
bool HasPropertyValue(const gd::String name) const
Called to check if a property is overriden.
Definition: BehaviorConfigurationContainer.h:116
void SetName(const gd::String &name_)
Change the name identifying the behavior.
Definition: BehaviorConfigurationContainer.h:58
const gd::String & GetTypeName() const
Return the type of the behavior.
Definition: BehaviorConfigurationContainer.h:63
virtual bool UpdateProperty(gd::SerializerElement &behaviorContent, const gd::String &name, const gd::String &value)
Called when the IDE wants to update a custom property of the behavior.
Definition: BehaviorConfigurationContainer.h:236
const gd::String & GetName() const
Return the name identifying the behavior.
Definition: BehaviorConfigurationContainer.h:53
void SetQuickCustomizationVisibility(QuickCustomization::Visibility visibility)
Set if the whole behavior should be visible or not in the Quick Customization.
Definition: BehaviorConfigurationContainer.h:168
QuickCustomization::Visibility GetQuickCustomizationVisibility() const
Get if the whole behavior should be visible or not in the Quick Customization.
Definition: BehaviorConfigurationContainer.h:177
virtual void SerializeTo(gd::SerializerElement &element) const
Serialize the behavior content.
Definition: BehaviorConfigurationContainer.h:140
virtual void InitializeContent(gd::SerializerElement &behaviorContent)
Called to initialize the content with the default properties for the behavior.
Definition: BehaviorConfigurationContainer.h:258
QuickCustomizationVisibilitiesContainer & GetPropertiesQuickCustomizationVisibilities()
Get the map of properties and their visibility in the Quick Customization.
Definition: BehaviorConfigurationContainer.h:186
void SetTypeName(const gd::String &type_)
Set the type of the behavior.
Definition: BehaviorConfigurationContainer.h:68
virtual void InitializeContent()
Called to initialize the content with the default properties for the behavior.
Definition: BehaviorConfigurationContainer.h:124
bool IsFolded() const
True if the behavior configuration panel should be folded in the UI.
Definition: BehaviorConfigurationContainer.h:162
virtual void UnserializeFrom(const gd::SerializerElement &element)
Unserialize the behavior content.
Definition: BehaviorConfigurationContainer.h:147
void ClearContent()
Called to remove all properties values for the behavior.
Definition: BehaviorConfigurationContainer.h:133
void SetFolded(bool fold=true)
Set if the behavior configuration panel should be folded in the UI.
Definition: BehaviorConfigurationContainer.h:157
virtual bool RenameProperty(const gd::String &oldName, const gd::String &newName)
Called when the IDE wants to rename a custom property of the object configuration.
Definition: BehaviorConfigurationContainer.h:95
Visibility
Definition: QuickCustomization.h:8
Definition: QuickCustomizationVisibilitiesContainer.h:11
A generic container that can represent a value ( containing a string, double, bool or int),...
Definition: SerializerElement.h:37
String represents an UTF8 encoded string.
Definition: String.h:33
Definition: CommonTools.h:24