The EntityAttribute interface is used as a base class for all of the individual GTK "renderers" for each key type. This allows, for example, a boolean keyval to be controlled through a checkbox while a text keyval is given a text entry field. More...
#include <EntityAttribute.h>
Public Member Functions | |
virtual | ~EntityAttribute (void) |
virtual GtkWidget * | getWidget () const =0 |
virtual void | update ()=0 |
void | entitySetValue (const std::string &classname, const std::string &key, const std::string &value) |
const std::string | entityGetValueForKey (const std::string &key) |
Helper method returns the first value in value list for given key for currently selected entity class or an empty string. | |
double | angle_normalised (double angle) |
GtkEntry * | numeric_entry_new (void) |
The EntityAttribute interface is used as a base class for all of the individual GTK "renderers" for each key type. This allows, for example, a boolean keyval to be controlled through a checkbox while a text keyval is given a text entry field.
Note that the EntityAttribute selection is based on the key TYPE not the key itself, so it is not (currently) possible to use a different EntityAttribute for each of two text keyvals.
Definition at line 27 of file EntityAttribute.h.
virtual EntityAttribute::~EntityAttribute | ( | void | ) | [inline, virtual] |
Definition at line 30 of file EntityAttribute.h.
double EntityAttribute::angle_normalised | ( | double | angle | ) | [inline] |
Definition at line 69 of file EntityAttribute.h.
References float_mod().
Referenced by DirectionAttribute::apply(), AnglesAttribute::apply(), AngleAttribute::apply(), DirectionAttribute::update(), AnglesAttribute::update(), and AngleAttribute::update().
const std::string EntityAttribute::entityGetValueForKey | ( | const std::string & | key | ) | [inline] |
Helper method returns the first value in value list for given key for currently selected entity class or an empty string.
key | key to retrieve value for |
Definition at line 53 of file EntityAttribute.h.
References i.
Referenced by Vector3Attribute::update(), StringAttribute::update(), SoundAttribute::update(), ParticleAttribute::update(), ModelAttribute::update(), ListAttribute::update(), DirectionAttribute::update(), BooleanAttribute::update(), AnglesAttribute::update(), and AngleAttribute::update().
void EntityAttribute::entitySetValue | ( | const std::string & | classname, | |
const std::string & | key, | |||
const std::string & | value | |||
) | [inline] |
Definition at line 39 of file EntityAttribute.h.
References string.
Referenced by Vector3Attribute::apply(), StringAttribute::apply(), SoundAttribute::apply(), ParticleAttribute::apply(), ModelAttribute::apply(), ListAttribute::apply(), DirectionAttribute::apply(), BooleanAttribute::apply(), AnglesAttribute::apply(), AngleAttribute::apply(), DirectionAttribute::applyRadio(), and ModelAttribute::browse().
virtual GtkWidget* EntityAttribute::getWidget | ( | ) | const [pure virtual] |
Implemented in AngleAttribute, AnglesAttribute, BooleanAttribute, DirectionAttribute, ListAttribute, ModelAttribute, ParticleAttribute, SoundAttribute, StringAttribute, and Vector3Attribute.
GtkEntry* EntityAttribute::numeric_entry_new | ( | void | ) | [inline] |
Definition at line 74 of file EntityAttribute.h.
References widget_set_size().
Referenced by AngleAttribute::AngleAttribute(), AnglesAttribute::AnglesAttribute(), DirectionAttribute::DirectionAttribute(), and Vector3Attribute::Vector3Attribute().
virtual void EntityAttribute::update | ( | ) | [pure virtual] |
Implemented in AngleAttribute, AnglesAttribute, BooleanAttribute, DirectionAttribute, ListAttribute, ModelAttribute, ParticleAttribute, SoundAttribute, StringAttribute, and Vector3Attribute.