21 #ifndef GUIParameterTableItem_h
22 #define GUIParameterTableItem_h
77 virtual bool dynamic()
const = 0;
96 virtual const std::string&
getName()
const = 0;
133 const std::string& name,
bool dynamic,
153 const std::string& name,
bool dynamic,
157 init(dynamic, toString<T>(value));
173 const std::string& name,
bool dynamic,
177 init(dynamic, value);
265 return mySource->makeSUMORealReturningCopy();
const std::string & getName() const
Returns the name of this value.
GUIParameterTableItem(FXTable *table, unsigned pos, const std::string &name, bool dynamic, std::string value)
Constructor for string-typed, non-changing (static) values.
void init(bool dynamic, std::string value)
Initialises the line.
virtual void update()=0
Forces an update of the value.
T myValue
A backup of the value to avoid the redrawing when nothing has changed.
FXTable * myTable
The table this entry belongs to.
void update()
Resets the value if it's dynamic.
virtual const std::string & getName() const =0
Returns the name of the value.
GUIParameterTableItem(FXTable *table, unsigned pos, const std::string &name, bool dynamic, ValueSource< T > *src)
Constructor for changing (dynamic) values.
FXint myTablePosition
The position within the table.
virtual ValueSource< SUMOReal > * getSUMORealSourceCopy() const =0
Returns a SUMOReal-typed copy of the value-source.
bool myAmDynamic
Information whether the value may change.
GUIParameterTableItem(FXTable *table, unsigned pos, const std::string &name, bool dynamic, T value)
Constructor for non-changing (static) values.
Interface to a single line in a parameter window.
ValueSource< SUMOReal > * getSUMORealSourceCopy() const
Returns a SUMOReal-typed copy of the source if the value is dynamic.
ValueSource< T > * mySource
The source to gain new values from; this source is==0 if the values are not dynamic.
~GUIParameterTableItem()
Destructor.
virtual bool dynamic() const =0
Returns the information whether the value changes over simulation time.
bool dynamic() const
Returns the information whether this item may change.
Instance of a single line in a parameter window.
std::string myName
The name of this value.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
virtual ~GUIParameterTableItemInterface()
Destructor.
virtual T getValue() const =0
ValueSource< T > * getSourceCopy() const
Returns a copy of the source if the value is dynamic.