58 myAttributesCreatorParent(AttributesCreatorParent),
59 myAttrProperties(attrProperties) {
62 AttributesCreatorParent->getFrameParent()->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu(),
64 myAttributeLabel->hide();
66 myEnableAttributeCheckButton->hide();
68 myAttributeColorButton->hide();
70 myAttributeAllowButton->hide();
73 myValueTextField->hide();
75 myValueCheckButton->hide();
78 myValueComboBox->hide();
80 if (getParent()->
id()) {
82 FXHorizontalFrame::create();
94 if (getParent()->
id()) {
95 FXHorizontalFrame::destroy();
386 if (useDefaultValue) {
416 if (useDefaultValue) {
438 FXColorDialog colordialog(
this,
TL(
"Color Dialog"));
439 colordialog.setTarget(
this);
442 if (GNEAttributeCarrier::canParse<RGBColor>(
myValueTextField->getText().text())) {
448 if (colordialog.execute()) {
458 bool acceptChanges =
false;
FXDEFMAP(GNEAttributesCreatorRow) RowCreatorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
@ MID_GNE_SET_ATTRIBUTE_COLOR
edit attribute color
@ MID_GNE_SET_ATTRIBUTE_ALLOW
edit attribute allow
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
#define GUIDesignComboBoxAttribute
Combo box static (cannot be edited) extended over the matrix column.
#define GUIDesignComboBoxNCol
number of column of every combo box
#define GUIDesignTextField
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
#define GUIDesignTextFieldNCol
Num of column of text field.
#define GUIDesignCheckButton
checkButton placed in left position
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
@ SUMO_ATTR_COLOR
A color information.
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Dialog for edit rerouters.
virtual void toggleAttribute(SumoXMLAttr key, const bool value)
method for enable or disable the attribute and nothing else (used in GNEChange_ToggleAttribute)
virtual bool isAttributeEnabled(SumoXMLAttr key) const
const GNETagProperties & getTagProperty() const
get tagProperty associated with this Attribute Carrier
virtual bool isValid(SumoXMLAttr key, const std::string &value)=0
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
virtual std::string getAttribute(SumoXMLAttr key) const =0
bool isColor() const
return true if attribute is a color
bool isSVCPermission() const
return true if attribute is a VehicleClass
bool isBool() const
return true if attribute is boolean
const std::string & getAttrStr() const
get XML Attribute
bool isDiscrete() const
return true if attribute is discrete
const std::string & getDefaultValue() const
get default value
const std::string & getDefinition() const
get default value
bool hasDefaultValue() const
return true if attribute owns a default value
bool isActivatable() const
return true if attribute is activatable
const std::vector< std::string > & getDiscreteValues() const
get discrete values
SumoXMLAttr getAttr() const
get XML Attribute
const GNETagProperties & getTagPropertyParent() const
get reference to tagProperty parent
bool hasAutomaticID() const
return true if attribute ID can generate an automatic ID
GNEAttributeCarrier * getCurrentTemplateAC() const
get current template AC
GNEFrame * getFrameParent() const
return frame parent
void refreshAttributesCreator()
refresh attribute creator
std::string generateID() const
FOX needs this.
MFXLabelTooltip * myAttributeLabel
Label with the name of the attribute.
FXButton * myAttributeColorButton
Button for open color editor.
FXTextField * myValueTextField
textField to modify the default value of string parameters
FXCheckButton * myValueCheckButton
check button to enable/disable the value of boolean parameters
void enableAttributesCreatorRow()
enable row
bool getAttributeCheckButtonCheck() const
return status of label checkbox button
void refreshRow()
refresh row
void disableRow()
disable Rows
bool isValidID() const
check if current ID placed in myValueTextField is valid
long onCmdOpenAllowDialog(FXObject *, FXSelector, void *)
called when user press the allow dialog button
bool isAttributesCreatorRowEnabled() const
check if row is enabled
long onCmdSetAttribute(FXObject *, FXSelector, void *)
std::string getValue() const
return value
void destroy()
destroy GNEAttributesCreatorRow (but don't delete)
FXButton * myAttributeAllowButton
Button for open allow editor.
bool isAttributeValid() const
check if current attribute is valid
void disableAttributesCreatorRow()
disable row
long onCmdOpenColorDialog(FXObject *, FXSelector, void *)
called when user press the color dialog button
MFXComboBoxIcon * myValueComboBox
comboBox for discrete vaues
void setAttributeCheckButtonCheck(bool value)
enable or disable label checkbox button for Terminatel attributes
GNEAttributesCreator * myAttributesCreatorParent
pointer to GNEAttributesCreator
FXCheckButton * myEnableAttributeCheckButton
check button to enable/disable Label attribute
const GNEAttributeProperties & getAttrProperties() const
return Attr
std::string myInvalidValue
string which indicates the reason due current value is invalid
const GNEAttributeProperties myAttrProperties
attribute properties
GNEAttributesCreator * getAttributesCreatorParent() const
get GNEAttributesCreator parent
GNEViewNet * getViewNet() const
get view net
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
std::string generateAdditionalID(SumoXMLTag type) const
generate additional id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool isDemandElement() const
return true if tag correspond to a demand element
bool isAdditionalElement() const
return true if tag correspond to an additional element (note: this include TAZ, shapes and wires)
bool isVehicleStop() const
return true if tag correspond to a vehicle stop element
GNENet * getNet() const
get the net object
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint findItem(const FXString &text) const
find item
FXString getText() const
Get the text.
void setTextColor(FXColor clr)
Change text color.
void clearItems()
Remove all items from the list.
void disable()
Disable combo box.
FXColor getTextColor() const
Return text color.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
void enable()
Enable combo box.
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
static FXIcon * getPOIIcon(POIIcon iconType)
returns icon associated to the given POI image
static StringBijection< POIIcon > POIIcons
POI icon values.
std::vector< T > getValues() const