41 #ifndef _AttributeChangedEmitter_H
42 #define _AttributeChangedEmitter_H
50 #define snprintf _snprintf
57 void EmitAttributeChangedEventProperty(DisplayObject *obj,
const char *qualifiedName,
const char *name,
int arg)
60 if (strlen (qualifiedName) > 0)
62 snprintf(str, 1024,
"%s.%s %d",qualifiedName,name,arg);
66 snprintf(str, 1024,
"%s %d",name,arg);
69 ObjectEvent newEvent(obj,
"AttributeChanged", str);
70 EmitObjectEvent(obj, &newEvent);
73 void EmitAttributeChangedEventProperty(DisplayObject *obj,
const char *qualifiedName,
const char *name,
bool arg)
75 EmitAttributeChangedEventProperty(obj,qualifiedName,name,(
int)arg);
78 void EmitAttributeChangedEventProperty(DisplayObject *obj,
const char *qualifiedName,
const char *name,
float arg)
81 if (strlen (qualifiedName) > 0)
83 snprintf(str, 1024,
"%s.%s %.8f",qualifiedName,name,arg);
87 snprintf(str, 1024,
"%s %.8f",name,arg);
90 ObjectEvent newEvent(obj,
"AttributeChanged", str);
91 EmitObjectEvent(obj, &newEvent);
94 void EmitAttributeChangedEventProperty(DisplayObject *obj,
const char *qualifiedName,
const char *name,
const char* arg)
97 if (strlen (qualifiedName) > 0)
99 snprintf(str, 1024,
"%s.%s %s",qualifiedName,name,arg);
103 snprintf(str, 1024,
"%s %s",name,arg);
106 ObjectEvent newEvent(obj,
"AttributeChanged", str);
107 EmitObjectEvent(obj, &newEvent);
110 void EmitAttributeChangedEvent(DisplayObject *obj,
const char *qualifiedName,
const char *name,
int arg)
113 if (strlen (qualifiedName) > 0)
115 snprintf(str, 1024,
"%s.%s.%s %d",qualifiedName,obj->InstanceName(),name,arg);
119 snprintf(str, 1024,
"%s.%s %d",obj->InstanceName(),name,arg);
122 ObjectEvent newEvent(obj,
"AttributeChanged", str);
123 EmitObjectEvent(obj, &newEvent);
126 void EmitAttributeChangedEvent(DisplayObject *obj,
const char *qualifiedName,
const char *name,
bool arg)
128 EmitAttributeChangedEvent(obj,qualifiedName,name,(
int)arg);
131 void EmitAttributeChangedEvent(DisplayObject *obj,
const char *qualifiedName,
const char *name,
float arg)
134 if (strlen (qualifiedName) > 0)
136 snprintf(str, 1024,
"%s.%s.%s %.8f",qualifiedName,obj->InstanceName(),name,arg);
140 snprintf(str, 1024,
"%s.%s %.8f",obj->InstanceName(),name,arg);
143 ObjectEvent newEvent(obj,
"AttributeChanged", str);
144 EmitObjectEvent(obj, &newEvent);
Definition: AttributeChangedEmitter.h:53
Definition: AttributeChangedEmitter.h:46