7 #ifndef GDCORE_INITIALINSTANCE_H
8 #define GDCORE_INITIALINSTANCE_H
11 #include "GDCore/Project/VariablesContainer.h"
12 #include "GDCore/String.h"
14 class PropertyDescriptor;
58 double GetX()
const {
return x; }
63 void SetX(
double x_) { x = x_; }
68 double GetY()
const {
return y; }
73 void SetY(
double y_) { y = y_; }
78 double GetZ()
const {
return z; }
83 void SetZ(
double z_) { z = z_; }
93 void SetAngle(
double angle_) { angle = angle_; }
159 customSize = hasCustomSize_;
172 customDepth = hasCustomDepth_;
175 double GetCustomWidth()
const {
return width; }
176 void SetCustomWidth(
double width_) { width = width_; }
177 double GetCustomHeight()
const {
return height; }
178 void SetCustomHeight(
double height_) { height = height_; }
179 double GetCustomDepth()
const {
return depth; }
180 void SetCustomDepth(
double depth_) { depth = depth_; }
232 return initialVariables;
266 std::map<gd::String, gd::PropertyDescriptor> GetCustomProperties(
274 bool UpdateCustomProperty(
const gd::String& name,
286 double GetRawDoubleProperty(
const gd::String& name)
const;
300 void SetRawDoubleProperty(
const gd::String& name,
double value);
332 std::map<gd::String, double>
334 std::map<gd::String, gd::String>
360 badStringPropertyValue;
Represents an instance of an object to be created on a layout start up.
Definition: InitialInstance.h:25
double GetRotationY() const
Get the rotation of the instance on Y axis, in radians.
Definition: InitialInstance.h:108
double GetRotationX() const
Get the rotation of the instance on X axis, in radians.
Definition: InitialInstance.h:98
void SetY(double y_)
Set the Y position of the instance.
Definition: InitialInstance.h:73
bool ShouldKeepRatio() const
Return true if the dimensions (width, height and depth) should keep the same ratio.
Definition: InitialInstance.h:213
void SetAngle(double angle_)
Set the rotation of the instance on Z axis, in radians.
Definition: InitialInstance.h:93
void SetX(double x_)
Set the X position of the instance.
Definition: InitialInstance.h:63
gd::VariablesContainer & GetVariables()
Definition: InitialInstance.h:239
double GetZ() const
Get the Z position of the instance.
Definition: InitialInstance.h:78
void SetRotationY(double rotationY_)
Set the rotation of the instance on Y axis, in radians.
Definition: InitialInstance.h:113
bool IsLocked() const
Return true if the instance is locked and cannot be moved in the IDE.
Definition: InitialInstance.h:186
bool HasCustomDepth() const
Return true if the instance has a depth which is different from its object default depth....
Definition: InitialInstance.h:149
const gd::String & GetLayer() const
Get the layer the instance belongs to.
Definition: InitialInstance.h:128
void SetHasCustomSize(bool hasCustomSize_)
Set whether the instance has a width/height which is different from its object default width/height o...
Definition: InitialInstance.h:158
void SetObjectName(const gd::String &name)
Set the name of object instantiated on the layout.
Definition: InitialInstance.h:53
const gd::String & GetObjectName() const
Get the name of object instantiated on the layout.
Definition: InitialInstance.h:48
void SetZOrder(int zOrder_)
Set the Z order of the instance (for a 2D object).
Definition: InitialInstance.h:123
double GetY() const
Get the Y position of the instance.
Definition: InitialInstance.h:68
void SetRotationX(double rotationX_)
Set the rotation of the instance on X axis, in radians.
Definition: InitialInstance.h:103
void SetShouldKeepRatio(bool enable=true)
Define if instance's dimensions should keep the same ratio.
Definition: InitialInstance.h:218
void SetZ(double z_)
Set the Z position of the instance.
Definition: InitialInstance.h:83
bool IsSealed() const
Return true if the instance cannot be selected by clicking on it in the IDE (only applies if instance...
Definition: InitialInstance.h:199
void SetLayer(const gd::String &layer_)
Set the layer the instance belongs to.
Definition: InitialInstance.h:133
double GetAngle() const
Get the rotation of the instance on Z axis, in radians.
Definition: InitialInstance.h:88
InitialInstance * Clone() const
Definition: InitialInstance.h:38
bool HasCustomSize() const
Return true if the instance has a width/height which is different from its object default width/heigh...
Definition: InitialInstance.h:141
int GetZOrder() const
Get the Z order of the instance (for a 2D object).
Definition: InitialInstance.h:118
double GetX() const
Get the X position of the instance.
Definition: InitialInstance.h:58
void SetLocked(bool enable=true)
(Un)lock the initial instance.
Definition: InitialInstance.h:193
void SetHasCustomDepth(bool hasCustomDepth_)
Set whether the instance has a depth which is different from its object default depth or not....
Definition: InitialInstance.h:171
void SetSealed(bool enable=true)
(Un)seal the initial instance.
Definition: InitialInstance.h:207
const gd::VariablesContainer & GetVariables() const
Definition: InitialInstance.h:231
Represent a layout ( also called a scene ) of a project.
Definition: Layout.h:39
Base class representing a project (game), including all resources, scenes, objects,...
Definition: Project.h:50
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
Class defining a container for gd::Variable.
Definition: VariablesContainer.h:30
Definition: CommonTools.h:24