6 #ifndef GDCORE_BEHAVIORCONFIGURATIONCONTAINER_H
7 #define GDCORE_BEHAVIORCONFIGURATIONCONTAINER_H
11 #include "GDCore/Serialization/Serializer.h"
12 #include "GDCore/String.h"
15 class PropertyDescriptor;
16 class SerializerElement;
37 : name(name_), type(type_), folded(
false){};
68 std::map<gd::String, gd::PropertyDescriptor> GetProperties()
const;
79 return UpdateProperty(content, name, value);
87 InitializeContent(content);
134 virtual std::map<gd::String, gd::PropertyDescriptor> GetProperties(
Base class for containers of behavior configuration. They can be attached to objects (Behavior) or la...
Definition: BehaviorConfigurationContainer.h:32
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:78
void SetName(const gd::String &name_)
Change the name identifying the behavior.
Definition: BehaviorConfigurationContainer.h:49
const gd::String & GetTypeName() const
Return the type of the behavior.
Definition: BehaviorConfigurationContainer.h:54
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:144
const gd::String & GetName() const
Return the name identifying the behavior.
Definition: BehaviorConfigurationContainer.h:44
virtual void SerializeTo(gd::SerializerElement &element) const
Serialize the behavior content.
Definition: BehaviorConfigurationContainer.h:93
virtual void InitializeContent(gd::SerializerElement &behaviorContent)
Called to initialize the content with the default properties for the behavior.
Definition: BehaviorConfigurationContainer.h:154
void SetTypeName(const gd::String &type_)
Set the type of the behavior.
Definition: BehaviorConfigurationContainer.h:59
virtual void InitializeContent()
Called to initialize the content with the default properties for the behavior.
Definition: BehaviorConfigurationContainer.h:86
bool IsFolded() const
True if the behavior configuration panel should be folded in the UI.
Definition: BehaviorConfigurationContainer.h:115
virtual void UnserializeFrom(const gd::SerializerElement &element)
Unserialize the behavior content.
Definition: BehaviorConfigurationContainer.h:100
void SetFolded(bool fold=true)
Set if the behavior configuration panel should be folded in the UI.
Definition: BehaviorConfigurationContainer.h:110
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:31
Definition: CommonTools.h:24