SUMO - Simulation of Urban MObility
GNEPolygonFrame::ShapeAttributeSingle Class Reference

#include <GNEPolygonFrame.h>

Inheritance diagram for GNEPolygonFrame::ShapeAttributeSingle:
Inheritance graph
Collaboration diagram for GNEPolygonFrame::ShapeAttributeSingle:
Collaboration graph

Public Member Functions

SumoXMLAttr getAttr () const
 return Attr More...
 
SumoXMLTag getTag () const
 return tag More...
 
std::string getValue () const
 return value More...
 
void hideParameter ()
 hide all parameters More...
 
const std::string & isAttributeValid () const
 returns a empty string if current value is valid, a string with information about invalid value in other case More...
 
 ShapeAttributeSingle (FXComposite *parent)
 FOX-declaration. More...
 
void showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, std::string value)
 show name and value of attribute of type string More...
 
void showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, int value)
 show name and value of parameters of type int More...
 
void showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, double value)
 show name and value of parameters of type float/real/time More...
 
void showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, bool value)
 show name and value of parameters of type bool More...
 
void showParameter (SumoXMLTag shapeTag, SumoXMLAttr shapeAttr, RGBColor value)
 show name and value of parameters of type Color More...
 
 ~ShapeAttributeSingle ()
 destructor More...
 
FOX-callbacks

called when user set the value of an attribute of type int/float/string

long onCmdSetAttribute (FXObject *, FXSelector, void *)
 
long onCmdSetBooleanAttribute (FXObject *, FXSelector, void *)
 called when user change the value of myBoolCheckButton More...
 
long onCmdSetColorAttribute (FXObject *, FXSelector, void *)
 called when user press the "Color" button More...
 

Protected Member Functions

 ShapeAttributeSingle ()
 FOX needs this. More...
 

Private Attributes

FXCheckButton * myBoolCheckButton
 check button to enable/disable the value of boolean parameters More...
 
FXButton * mycolorEditor
 Button for open color editor. More...
 
std::string myInvalidValue
 string which indicates the reason due current value is invalid More...
 
FXLabel * myLabel
 lael with the name of the parameter More...
 
SumoXMLAttr myShapeAttr
 current XML attribute More...
 
SumoXMLTag myShapeTag
 current XML attribute More...
 
FXTextField * myTextFieldInt
 textField to modify the default value of int/float/string parameters More...
 
FXTextField * myTextFieldReal
 textField to modify the default value of real/times parameters More...
 
FXTextField * myTextFieldStrings
 textField to modify the default value of string parameters More...
 

Detailed Description

Definition at line 66 of file GNEPolygonFrame.h.

Constructor & Destructor Documentation

◆ ShapeAttributeSingle() [1/2]

◆ ~ShapeAttributeSingle()

GNEPolygonFrame::ShapeAttributeSingle::~ShapeAttributeSingle ( )

destructor

Definition at line 410 of file GNEPolygonFrame.cpp.

◆ ShapeAttributeSingle() [2/2]

GNEPolygonFrame::ShapeAttributeSingle::ShapeAttributeSingle ( )
inlineprotected

FOX needs this.

Definition at line 121 of file GNEPolygonFrame.h.

Member Function Documentation

◆ getAttr()

SumoXMLAttr GNEPolygonFrame::ShapeAttributeSingle::getAttr ( ) const

return Attr

Definition at line 509 of file GNEPolygonFrame.cpp.

References myShapeAttr.

◆ getTag()

SumoXMLTag GNEPolygonFrame::ShapeAttributeSingle::getTag ( ) const

return tag

Definition at line 503 of file GNEPolygonFrame.cpp.

References myShapeTag.

◆ getValue()

std::string GNEPolygonFrame::ShapeAttributeSingle::getValue ( ) const

◆ hideParameter()

void GNEPolygonFrame::ShapeAttributeSingle::hideParameter ( )

◆ isAttributeValid()

const std::string & GNEPolygonFrame::ShapeAttributeSingle::isAttributeValid ( ) const

returns a empty string if current value is valid, a string with information about invalid value in other case

Definition at line 529 of file GNEPolygonFrame.cpp.

References myInvalidValue.

◆ onCmdSetAttribute()

◆ onCmdSetBooleanAttribute()

long GNEPolygonFrame::ShapeAttributeSingle::onCmdSetBooleanAttribute ( FXObject *  ,
FXSelector  ,
void *   
)

called when user change the value of myBoolCheckButton

Definition at line 616 of file GNEPolygonFrame.cpp.

References myBoolCheckButton.

◆ onCmdSetColorAttribute()

long GNEPolygonFrame::ShapeAttributeSingle::onCmdSetColorAttribute ( FXObject *  ,
FXSelector  ,
void *   
)

called when user press the "Color" button

Definition at line 626 of file GNEPolygonFrame.cpp.

References MFXUtils::getFXColor(), MFXUtils::getRGBColor(), myTextFieldStrings, RGBColor::parseColor(), and toString().

◆ showParameter() [1/5]

void GNEPolygonFrame::ShapeAttributeSingle::showParameter ( SumoXMLTag  shapeTag,
SumoXMLAttr  shapeAttr,
std::string  value 
)

show name and value of attribute of type string

Definition at line 414 of file GNEPolygonFrame.cpp.

References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldStrings, GNEPolygonFrame::show(), and toString().

◆ showParameter() [2/5]

void GNEPolygonFrame::ShapeAttributeSingle::showParameter ( SumoXMLTag  shapeTag,
SumoXMLAttr  shapeAttr,
int  value 
)

show name and value of parameters of type int

Definition at line 428 of file GNEPolygonFrame.cpp.

References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldInt, GNEPolygonFrame::show(), and toString().

◆ showParameter() [3/5]

void GNEPolygonFrame::ShapeAttributeSingle::showParameter ( SumoXMLTag  shapeTag,
SumoXMLAttr  shapeAttr,
double  value 
)

show name and value of parameters of type float/real/time

Definition at line 442 of file GNEPolygonFrame.cpp.

References myInvalidValue, myLabel, myShapeAttr, myShapeTag, myTextFieldReal, GNEPolygonFrame::show(), and toString().

◆ showParameter() [4/5]

void GNEPolygonFrame::ShapeAttributeSingle::showParameter ( SumoXMLTag  shapeTag,
SumoXMLAttr  shapeAttr,
bool  value 
)

show name and value of parameters of type bool

Definition at line 456 of file GNEPolygonFrame.cpp.

References myBoolCheckButton, myInvalidValue, myLabel, myShapeAttr, myShapeTag, GNEPolygonFrame::show(), and toString().

◆ showParameter() [5/5]

void GNEPolygonFrame::ShapeAttributeSingle::showParameter ( SumoXMLTag  shapeTag,
SumoXMLAttr  shapeAttr,
RGBColor  value 
)

show name and value of parameters of type Color

Definition at line 475 of file GNEPolygonFrame.cpp.

References mycolorEditor, myInvalidValue, myShapeAttr, myShapeTag, myTextFieldStrings, GNEPolygonFrame::show(), and toString().

Field Documentation

◆ myBoolCheckButton

FXCheckButton* GNEPolygonFrame::ShapeAttributeSingle::myBoolCheckButton
private

check button to enable/disable the value of boolean parameters

Definition at line 143 of file GNEPolygonFrame.h.

Referenced by getValue(), hideParameter(), onCmdSetBooleanAttribute(), ShapeAttributeSingle(), and showParameter().

◆ mycolorEditor

FXButton* GNEPolygonFrame::ShapeAttributeSingle::mycolorEditor
private

Button for open color editor.

Definition at line 146 of file GNEPolygonFrame.h.

Referenced by hideParameter(), ShapeAttributeSingle(), and showParameter().

◆ myInvalidValue

std::string GNEPolygonFrame::ShapeAttributeSingle::myInvalidValue
private

string which indicates the reason due current value is invalid

Definition at line 149 of file GNEPolygonFrame.h.

Referenced by isAttributeValid(), onCmdSetAttribute(), and showParameter().

◆ myLabel

FXLabel* GNEPolygonFrame::ShapeAttributeSingle::myLabel
private

lael with the name of the parameter

Definition at line 131 of file GNEPolygonFrame.h.

Referenced by hideParameter(), ShapeAttributeSingle(), and showParameter().

◆ myShapeAttr

SumoXMLAttr GNEPolygonFrame::ShapeAttributeSingle::myShapeAttr
private

current XML attribute

Definition at line 128 of file GNEPolygonFrame.h.

Referenced by getAttr(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().

◆ myShapeTag

SumoXMLTag GNEPolygonFrame::ShapeAttributeSingle::myShapeTag
private

current XML attribute

Definition at line 125 of file GNEPolygonFrame.h.

Referenced by getTag(), getValue(), hideParameter(), onCmdSetAttribute(), and showParameter().

◆ myTextFieldInt

FXTextField* GNEPolygonFrame::ShapeAttributeSingle::myTextFieldInt
private

textField to modify the default value of int/float/string parameters

Definition at line 134 of file GNEPolygonFrame.h.

Referenced by getValue(), hideParameter(), onCmdSetAttribute(), ShapeAttributeSingle(), and showParameter().

◆ myTextFieldReal

FXTextField* GNEPolygonFrame::ShapeAttributeSingle::myTextFieldReal
private

textField to modify the default value of real/times parameters

Definition at line 137 of file GNEPolygonFrame.h.

Referenced by getValue(), hideParameter(), onCmdSetAttribute(), ShapeAttributeSingle(), and showParameter().

◆ myTextFieldStrings

FXTextField* GNEPolygonFrame::ShapeAttributeSingle::myTextFieldStrings
private

textField to modify the default value of string parameters

Definition at line 140 of file GNEPolygonFrame.h.

Referenced by getValue(), hideParameter(), onCmdSetAttribute(), onCmdSetColorAttribute(), ShapeAttributeSingle(), and showParameter().


The documentation for this class was generated from the following files: