GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Public Member Functions | List of all members

Represents an object that is implemented with events. More...

#include <EventsBasedObject.h>

Inherits gd::AbstractEventsBasedEntity.

Public Member Functions

EventsBasedObjectClone () const
 Return a pointer to a new EventsBasedObject constructed from this one.
 
const gd::StringGetDefaultName () const
 Get the default name for created objects.
 
EventsBasedObjectSetDefaultName (const gd::String &defaultName_)
 Set the default name for created objects.
 
EventsBasedObjectSetDescription (const gd::String &description_) override
 Set the description of the behavior or object, to be displayed in the editor.
 
EventsBasedObjectSetName (const gd::String &name_)
 Set the internal name of the object.
 
EventsBasedObjectSetFullName (const gd::String &fullName_)
 Set the name of the object, to be displayed in the editor.
 
EventsBasedObjectMarkAsRenderedIn3D (bool isRenderedIn3D_)
 Declare a usage of the 3D renderer.
 
bool IsRenderedIn3D () const
 Return true if the object uses the 3D renderer.
 
EventsBasedObjectMarkAsAnimatable (bool isAnimatable_)
 Declare an Animatable capability.
 
bool IsAnimatable () const
 Return true if the object needs an Animatable capability.
 
EventsBasedObjectMarkAsTextContainer (bool isTextContainer_)
 Declare a TextContainer capability.
 
EventsBasedObjectMarkAsInnerAreaFollowingParentSize (bool isInnerAreaExpandingWithParent_)
 Declare that the parent scale will always be 1 and children will adapt there size. This is removing the ScalableCapability.
 
bool IsInnerAreaFollowingParentSize () const
 Return true if objects handle size changes on their own and don't have the ScalableCapability. More...
 
EventsBasedObjectMakAsUsingLegacyInstancesRenderer (bool isUsingLegacyInstancesRenderer_)
 Declare that custom object are rendered using their child-objects instead of their child-instances.
 
bool IsUsingLegacyInstancesRenderer () const
 Return true if custom object are rendered using their child-objects instead of their child-instances.
 
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.
 
Layers
const gd::LayersContainerGetLayers () const
 Get the layers of the custom object.
 
gd::LayersContainerGetLayers ()
 Get the layers of the custom object.
 
Child objects
gd::ObjectsContainerGetObjects ()
 Get the objects of the custom object.
 
const gd::ObjectsContainerGetObjects () const
 Get the objects of the custom object.
 
Instances
gd::InitialInstancesContainerGetInitialInstances ()
 Get the instances of the custom object.
 
const gd::InitialInstancesContainerGetInitialInstances () const
 Get the instances of the custom object.
 
int GetAreaMinX () const
 Get the left bound of the custom object. More...
 
void SetAreaMinX (int areaMinX_)
 Set the left bound of the custom object.
 
int GetAreaMinY () const
 Get the top bound of the custom object. More...
 
void SetAreaMinY (int areaMinY_)
 Set the top bound of the custom object.
 
int GetAreaMinZ () const
 Get the min Z bound of the custom object. More...
 
void SetAreaMinZ (int areaMinZ_)
 Set the min Z bound of the custom object.
 
int GetAreaMaxX () const
 Get the right bound of the custom object. More...
 
void SetAreaMaxX (int areaMaxX_)
 Set the right bound of the custom object.
 
int GetAreaMaxY () const
 Get the bottom bound of the custom object. More...
 
void SetAreaMaxY (int areaMaxY_)
 Set the bottom bound of the custom object.
 
int GetAreaMaxZ () const
 Get the max Z bound of the custom object. More...
 
void SetAreaMaxZ (int areaMaxZ_)
 Set the bottom bound of the custom object.
 
- Public Member Functions inherited from gd::AbstractEventsBasedEntity
 AbstractEventsBasedEntity (const gd::String &_name, gd::EventsFunctionsContainer::FunctionOwner functionContainerSource)
 
AbstractEventsBasedEntityClone () const
 Return a pointer to a new AbstractEventsBasedEntity constructed from this one.
 
const gd::StringGetDescription () const
 Get the description of the behavior or object, that is displayed in the editor.
 
const gd::StringGetName () const
 Get the internal name of the behavior or object.
 
AbstractEventsBasedEntitySetName (const gd::String &name_)
 Set the internal name of the behavior or object.
 
const gd::StringGetFullName () const
 Get the name of the behavior or object, that is displayed in the editor.
 
AbstractEventsBasedEntitySetFullName (const gd::String &fullName_)
 Set the name of the behavior or object, to be displayed in the editor.
 
EventsFunctionsContainerGetEventsFunctions ()
 Return a reference to the functions of the events based behavior or object.
 
const EventsFunctionsContainerGetEventsFunctions () const
 Return a const reference to the functions of the events based behavior or object.
 
gd::PropertiesContainerGetPropertyDescriptors ()
 Return a reference to the list of the properties.
 
const gd::PropertiesContainerGetPropertyDescriptors () const
 Return a const reference to the list of the properties.
 

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.
 

Detailed Description

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.

Member Function Documentation

◆ GetAreaMaxX()

int gd::EventsBasedObject::GetAreaMaxX ( ) const
inline

Get the right bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ GetAreaMaxY()

int gd::EventsBasedObject::GetAreaMaxY ( ) const
inline

Get the bottom bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ GetAreaMaxZ()

int gd::EventsBasedObject::GetAreaMaxZ ( ) const
inline

Get the max Z bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ GetAreaMinX()

int gd::EventsBasedObject::GetAreaMinX ( ) const
inline

Get the left bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ GetAreaMinY()

int gd::EventsBasedObject::GetAreaMinY ( ) const
inline

Get the top bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ GetAreaMinZ()

int gd::EventsBasedObject::GetAreaMinZ ( ) const
inline

Get the min Z bound of the custom object.

This is used only if there is any initial instances.

See also
EventsBasedObject::GetInitialInstances

◆ IsInnerAreaFollowingParentSize()

bool gd::EventsBasedObject::IsInnerAreaFollowingParentSize ( ) const
inline

Return true if objects handle size changes on their own and don't have the ScalableCapability.

When the parent dimensions change:

  • if false, the object is stretch proportionally while children local positions stay the same.
  • if true, the children local positions need to be adapted by events to follow their parent size.

The documentation for this class was generated from the following files: