GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Represents an object that is implemented with events. More...
#include <EventsBasedObject.h>
Inherits gd::AbstractEventsBasedEntity, and gd::ObjectsContainer.
Public Member Functions | |
EventsBasedObject (const gd::EventsBasedObject &_eventBasedObject) | |
EventsBasedObject * | Clone () const |
Return a pointer to a new EventsBasedObject constructed from this one. | |
const gd::String & | GetDefaultName () const |
Get the default name for created objects. | |
EventsBasedObject & | SetDefaultName (const gd::String &defaultName_) |
Set the default name for created objects. | |
EventsBasedObject & | SetDescription (const gd::String &description_) override |
Set the description of the behavior or object, to be displayed in the editor. | |
EventsBasedObject & | SetName (const gd::String &name_) |
Set the internal name of the object. | |
EventsBasedObject & | SetFullName (const gd::String &fullName_) |
Set the name of the object, to be displayed in the editor. | |
EventsBasedObject & | MarkAsRenderedIn3D (bool isRenderedIn3D_) |
Declare a usage of the 3D renderer. | |
bool | IsRenderedIn3D () const |
Return true if the object uses the 3D renderer. | |
EventsBasedObject & | MarkAsAnimatable (bool isAnimatable_) |
Declare an Animatable capability. | |
bool | IsAnimatable () const |
Return true if the object needs an Animatable capability. | |
EventsBasedObject & | MarkAsTextContainer (bool isTextContainer_) |
Declare a TextContainer capability. | |
bool | IsTextContainer () const |
Return true if the object needs a TextContainer capability. | |
void | SerializeTo (SerializerElement &element) const override |
Serialize the AbstractEventsBasedEntity to the specified element. | |
void | UnserializeFrom (gd::Project &project, const SerializerElement &element) override |
Load the AbstractEventsBasedEntity from the specified element. | |
Public Member Functions inherited from gd::AbstractEventsBasedEntity | |
AbstractEventsBasedEntity (const gd::String &_name, gd::EventsFunctionsContainer::FunctionOwner functionContainerSource) | |
AbstractEventsBasedEntity * | Clone () const |
Return a pointer to a new AbstractEventsBasedEntity constructed from this one. | |
const gd::String & | GetDescription () const |
Get the description of the behavior or object, that is displayed in the editor. | |
const gd::String & | GetName () const |
Get the internal name of the behavior or object. | |
AbstractEventsBasedEntity & | SetName (const gd::String &name_) |
Set the internal name of the behavior or object. | |
const gd::String & | GetFullName () const |
Get the name of the behavior or object, that is displayed in the editor. | |
AbstractEventsBasedEntity & | SetFullName (const gd::String &fullName_) |
Set the name of the behavior or object, to be displayed in the editor. | |
EventsFunctionsContainer & | GetEventsFunctions () |
Return a reference to the functions of the events based behavior or object. | |
const EventsFunctionsContainer & | GetEventsFunctions () const |
Return a const reference to the functions of the events based behavior or object. | |
gd::PropertiesContainer & | GetPropertyDescriptors () |
Return a reference to the list of the properties. | |
const gd::PropertiesContainer & | GetPropertyDescriptors () const |
Return a const reference to the list of the properties. | |
Public Member Functions inherited from gd::ObjectsContainer | |
ObjectsContainer () | |
Default constructor creating a container without any objects. | |
std::vector< const ObjectFolderOrObject * > | GetAllObjectFolderOrObjects () const |
gd::ObjectFolderOrObject & | GetRootFolder () |
void | AddMissingObjectsInRootFolder () |
bool | HasObjectNamed (const gd::String &name) const |
Return true if object called name exists. | |
Object & | GetObject (const gd::String &name) |
Return a reference to the object called name. | |
const gd::Object & | GetObject (const gd::String &name) const |
Return a reference to the object called name. | |
Object & | GetObject (std::size_t index) |
Return a reference to the object at position index in the objects list. | |
const gd::Object & | GetObject (std::size_t index) const |
Return a reference to the object at position index in the objects list. | |
std::size_t | GetObjectPosition (const gd::String &name) const |
Return the position of the object called name in the objects list. More... | |
std::size_t | GetObjectsCount () const |
Return the number of object. | |
gd::Object & | InsertNewObject (const gd::Project &project, const gd::String &objectType, const gd::String &name, std::size_t position) |
Add a new empty object of type objectType called name at the specified position in the list. More... | |
gd::Object & | InsertNewObjectInFolder (const gd::Project &project, const gd::String &objectType, const gd::String &name, gd::ObjectFolderOrObject &objectFolderOrObject, std::size_t position) |
Add a new empty object of type objectType called name in the given folder at the specified position. More... | |
gd::Object & | InsertObject (const gd::Object &object, std::size_t position) |
Add a new object to the list. More... | |
void | RemoveObject (const gd::String &name) |
Delete an object. More... | |
void | MoveObject (std::size_t oldIndex, std::size_t newIndex) |
void | MoveObjectFolderOrObjectToAnotherContainerInFolder (gd::ObjectFolderOrObject &objectFolderOrObject, gd::ObjectsContainer &newContainer, gd::ObjectFolderOrObject &newParentFolder, std::size_t newPosition) |
std::vector< std::unique_ptr< gd::Object > > & | GetObjects () |
const std::vector< std::unique_ptr< gd::Object > > & | GetObjects () const |
void | SerializeObjectsTo (SerializerElement &element) const |
Serialize the objects container. | |
void | UnserializeObjectsFrom (gd::Project &project, const SerializerElement &element) |
Unserialize the objects container. | |
void | SerializeFoldersTo (SerializerElement &element) const |
Serialize folder structure. | |
void | UnserializeFoldersFrom (gd::Project &project, const SerializerElement &element) |
Unserialize folder structure. | |
ObjectGroupsContainer & | GetObjectGroups () |
Return a reference to the project's objects groups. | |
const ObjectGroupsContainer & | GetObjectGroups () const |
Return a const reference to the project's objects groups. | |
Additional Inherited Members | |
Static Public Member Functions inherited from gd::AbstractEventsBasedEntity | |
static gd::String | GetPropertyActionName (const gd::String &propertyName) |
Get the name of the action to change a property. | |
static gd::String | GetPropertyConditionName (const gd::String &propertyName) |
Get the name of the condition to compare a property. | |
static gd::String | GetPropertyExpressionName (const gd::String &propertyName) |
Get the name of the expression to get a property. | |
static gd::String | GetPropertyToggleActionName (const gd::String &propertyName) |
Get the name of the action to toggle a boolean property. | |
Protected Attributes inherited from gd::ObjectsContainer | |
std::vector< std::unique_ptr< gd::Object > > | initialObjects |
Objects contained. | |
gd::ObjectGroupsContainer | objectGroups |
Represents an object that is implemented with events.
It's the responsibility of the IDE to run the logic to transform this into a real object, by declaring an extension and running code generation. See EventsFunctionsExtensionsLoader
.