A variable of type std::string, specifically for font names. More...
#include "CompText.hpp"
Public Member Functions | |
VarFontNameT (const char *Name, const std::string &Value, const char *Flags[], ComponentTextT &CompText) | |
VarFontNameT (const VarFontNameT &Var, ComponentTextT &CompText) | |
void | Set (const std::string &v) |
Sets the value of this variable to the given value v . More... | |
void | GetChoices (ArrayT< std::string > &Strings, ArrayT< std::string > &Values) const |
This method returns a list of acceptable input values for this variable, along with a string representation of each. More... | |
![]() | |
VarT (const char *Name, const std::string &Value, const char *Flags[]=NULL) | |
The constructor. More... | |
const std::string & | Get () const |
Returns the value of this variable. More... | |
void | Serialize (Network::OutStreamT &Stream) const |
Stores the value of this variable in the given Stream. More... | |
void | Deserialize (Network::InStreamT &Stream) |
Restores the value of this variable from the given Stream. More... | |
void | accept (VisitorT &Visitor) |
void | accept (VisitorConstT &Visitor) const |
![]() | |
VarBaseT (const char *Name, const char *Flags[]) | |
const char * | GetName () const |
const char ** | GetFlags () const |
bool | HasFlag (const char *Flag) const |
const char * | GetFlag (const char *Flag, unsigned int Nr, const char *Default=NULL) const |
virtual std::string | GetExtraMessage () const |
Sometimes actions on variables generate extra messages that are relevant to the user. More... | |
A variable of type std::string, specifically for font names.
It updates the related font instance in the parent ComponentTextT whenever a new font name is set.
|
virtual |
This method returns a list of acceptable input values for this variable, along with a string representation of each.
The relevancy of the returned tuples is limited: They are intended to create helpful user interfaces in our graphical editors and to provide extra information in scripts, but if Set() is called with a value that is not in Values
, it will work and is not an error. If the method returns no tuples at all, it means that user input is free and any value is acceptable.
Reimplemented from cf::TypeSys::VarT< std::string >.
|
virtual |
Sets the value of this variable to the given value v
.
Derived classes can override this method to add "side-effects", such as updating graphical resources. In some cases, side-effects can even affect other variables (siblings). For example, setting a new model name in ComponentModelT not only updates the internal (private) model resource, but it can also imply updates (resets or clamps) to the animation and skin number variables.
Reimplemented from cf::TypeSys::VarT< std::string >.