111 myFrameParent(frameParent) {
114 case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_NETELEMENT:
115 setText(
"NetElement element");
117 case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_ADDITIONAL:
118 setText(
"Additional element");
120 case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_SHAPE:
121 setText(
"Shape element");
123 case GNEAttributeCarrier::TAGProperty::TAGPROPERTY_TAZ:
124 setText(
"TAZ element");
135 for (
const auto &i : myListOfTags) {
136 myTypeMatchBox->appendItem(
toString(i).c_str());
139 myTypeMatchBox->setNumVisible((
int)myTypeMatchBox->getNumItems());
205 WRITE_DEBUG(
"Selected invalid item in ItemSelector");
215 myACAttributesParent(ACAttributesParent),
255 if (GNEAttributeCarrier::parse<bool>(value)) {
323 if (GNEAttributeCarrier::canParse<int>(
myTextFieldInt->getText().text())) {
325 int intValue = GNEAttributeCarrier::parse<int>(
myTextFieldInt->getText().text());
335 if (GNEAttributeCarrier::canParse<double>(
myTextFieldReal->getText().text())) {
337 double doubleValue = GNEAttributeCarrier::parse<double>(
myTextFieldReal->getText().text());
339 if (doubleValue < 0) {
346 if (GNEAttributeCarrier::canParse<double>(
myTextFieldReal->getText().text())) {
348 double doubleValue = GNEAttributeCarrier::parse<double>(
myTextFieldReal->getText().text());
365 if (GNEAttributeCarrier::canParse<RGBColor>(
myTextFieldStrings->getText().text()) ==
false) {
372 myInvalidValue =
"input contains invalid characters for a filename";
427 FXColorDialog colordialog(
this, tr(
"Color Dialog"));
428 colordialog.setTarget(
this);
436 if (colordialog.execute()) {
449 myFrameParent(frameParent) {
476 if (!i.second.isUnique()) {
477 myACAttributeRows.at(i.second.getPositionListed())->showParameter(i.first, i.second, i.second.getDefaultValue());
492 std::map<SumoXMLAttr, std::string>
494 std::map<SumoXMLAttr, std::string> values;
507 std::string errorMessage;
510 if (errorMessage.empty()) {
512 std::string attributeValue =
myACAttributeRows.at(i.second.getPositionListed())->isAttributeValid();
513 if (attributeValue.size() != 0) {
514 errorMessage = attributeValue;
519 if (extra.size() == 0) {
520 errorMessage =
"Invalid input parameter of " + myTagProperties.getTagStr() +
": " + errorMessage;
522 errorMessage =
"Invalid input parameter of " + myTagProperties.getTagStr() +
": " + extra;
537 if (
myACAttributeRows.at(i.second.getPositionListed())->isAttributeValid().size() != 0) {
609 FXEvent* e = (FXEvent*)eventData;
611 FXTreeItem* item =
myTreelist->getItemAt(e->win_x, e->win_y);
648 if (currentInspectedACs.size() == 1) {
663 FXMenuPane* pane =
new FXMenuPane(
myTreelist);
668 new FXMenuSeparator(pane);
692 junctionDestinyItem->setExpanded(
true);
697 return junctionDestinyItem;
711 junctionDestinyItem->setExpanded(
true);
714 edgeItem->setExpanded(
true);
736 junctionDestinyItem->setExpanded(
true);
739 edgeItem->setExpanded(
true);
742 laneItem->setExpanded(
true);
762 junctionItem->setExpanded(
true);
777 edgeFromItem->setExpanded(
true);
780 edgeToItem->setExpanded(
true);
783 connectionItem->setExpanded(
true);
789 return connectionItem;
798 if (tagProperty.isAdditional() || tagProperty.isTAZ()) {
803 if (tagProperty.hasParent() && tagProperty.getParentTag() !=
SUMO_TAG_LANE) {
807 additionalParentItem->setExpanded(
true);
817 junctionDestinyItem->setExpanded(
true);
820 edgeItem->setExpanded(
true);
835 junctionDestinyItem->setExpanded(
true);
838 edgeItem->setExpanded(
true);
841 laneItem->setExpanded(
true);
855 FXTreeItem* junctionSourceItem =
myTreelist->insertItem(
nullptr,
nullptr, (edge->getGNEJunctionSource()->getHierarchyName() +
" origin").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
856 FXTreeItem* junctionDestinyItem =
myTreelist->insertItem(
nullptr,
nullptr, (edge->getGNEJunctionSource()->getHierarchyName() +
" destiny").c_str(), edge->getGNEJunctionSource()->getIcon(), edge->getGNEJunctionSource()->getIcon());
857 junctionDestinyItem->setExpanded(
true);
859 FXTreeItem* edgeItem =
myTreelist->insertItem(
nullptr, junctionDestinyItem, edge->getHierarchyName().c_str(), edge->getIcon(), edge->getIcon());
860 edgeItem->setExpanded(
true);
862 FXTreeItem* laneItem =
myTreelist->insertItem(
nullptr, edgeItem, lanes.front()->getHierarchyName().c_str(), lanes.front()->getIcon(), lanes.front()->getIcon());
863 laneItem->setExpanded(
true);
909 for (
int i = 0; i < (int)edge->
getLanes().size(); i++) {
932 FXTreeItem* incomingConnections =
myTreelist->insertItem(
nullptr, laneItem,
"Incomings", incomingLaneConnections.front()->getIcon(), lane->
getGNEIncomingConnections().front()->getIcon());
934 incomingConnections->setExpanded(
false);
936 for (
auto i : incomingLaneConnections) {
943 FXTreeItem* outgoingConnections =
myTreelist->insertItem(
nullptr, laneItem,
"Outcomings", outcomingLaneConnections.front()->getIcon(), lane->
getGNEOutcomingConnections().front()->getIcon());
945 outgoingConnections->setExpanded(
false);
947 for (
auto i : outcomingLaneConnections) {
986 item->setExpanded(
true);
998 myGenericParameters(nullptr) {
1014 if (AC !=
nullptr) {
1031 if (ACs.size() > 0) {
1035 bool differentsGenericParameters =
false;
1037 for (
auto i :
myACs) {
1039 differentsGenericParameters =
true;
1043 if (differentsGenericParameters) {
1070 }
else if (
myACs.size()) {
1074 for (
auto i :
myACs) {
1076 genericParameter =
"different generic attributes";
1090 result += i->first +
"=" + i->second +
"|";
1093 if (!result.empty()) {
1107 }
else if (
myACs.size() > 0) {
1109 for (
auto i :
myACs) {
1124 std::vector<std::string> parsedValues;
1126 while (st.hasNext()) {
1127 parsedValues.push_back(st.next());
1130 for (
auto i : parsedValues) {
1132 WRITE_WARNING(
"Invalid format of Generic Parameter (" + i +
")");
1138 std::sort(parsedValues.begin(), parsedValues.end());
1139 for (
auto i = parsedValues.begin(); i != parsedValues.end(); i++) {
1140 if (((i + 1) != parsedValues.end())) {
1141 std::vector<std::string> firstKey, secondKey;
1146 firstKey.push_back(stKey1.
next());
1149 secondKey.push_back(stKey2.
next());
1152 if ((firstKey.size() != 2) || (secondKey.size() != 2) || (firstKey.front() == secondKey.front())) {
1153 WRITE_WARNING(
"Generic Parameters wit the same key aren't allowed (" + (*i) +
"," + * (i + 1) +
")");
1164 for (
auto i : parsedValues) {
1165 std::vector<std::string> parsedParameters;
1168 parsedParameters.push_back(stParam.
next());
1172 myGenericParameters->push_back(std::make_pair(parsedParameters.front(), parsedParameters.back()));
1178 }
else if (
myACs.size() > 0) {
1180 for (
auto i :
myACs) {
1195 myDeleteLastCreatedPoint(false) {
1202 std::ostringstream information;
1204 <<
"- 'Start drawing' or ENTER\n" 1205 <<
" draws shape boundary.\n" 1206 <<
"- 'Stop drawing' or ENTER\n" 1207 <<
" creates shape.\n" 1208 <<
"- 'Shift + Click'\n" 1209 <<
" removes last created point.\n" 1210 <<
"- 'Abort drawing' or ESC\n" 1211 <<
" removes drawed shape.";
1285 throw ProcessError(
"A new point cannot be added if drawing wasn't started");
1347 myCurrentLengthValid(true),
1348 myActualAdditionalReferencePoint(GNE_ADDITIONALREFERENCEPOINT_LEFT) {
1386 bool showFrame =
false;
1445 if(lane ==
nullptr) {
1452 std::string errorMessage =
"Current selected reference point isn't valid";
1459 double lenght = GNEAttributeCarrier::parse<double>(
myLengthTextField->getText().text());
1519 if (GNEAttributeCarrier::canParse<double>(
myLengthTextField->getText().text()) &&
1559 FXDialogBox* additionalNeteditAttributesHelpDialog =
new FXDialogBox(
this,
"Netedit Parameters Help",
GUIDesignDialogBox);
1562 std::ostringstream help;
1564 <<
"- Referece point: Mark the initial position of the additional element.\n" 1565 <<
" Example: If you want to create a busStop with a length of 30 in the point 100 of the lane:\n" 1566 <<
" - Reference Left will create it with startPos = 70 and endPos = 100.\n" 1567 <<
" - Reference Right will create it with startPos = 100 and endPos = 130.\n" 1568 <<
" - Reference Center will create it with startPos = 85 and endPos = 115.\n" 1570 <<
"- Block movement: if is enabled, the created additional element will be blocked. i.e. cannot be moved with\n" 1571 <<
" the mouse. This option can be modified inspecting element.";
1583 WRITE_DEBUG(
"Opening NeteditAttributes help dialog");
1585 additionalNeteditAttributesHelpDialog->create();
1587 additionalNeteditAttributesHelpDialog->show(PLACEMENT_CURSOR);
1589 getApp()->refresh();
1591 getApp()->runModalFor(additionalNeteditAttributesHelpDialog);
1593 WRITE_DEBUG(
"Closing NeteditAttributes help dialog");
1614 return positionOfTheMouseOverLane;
1616 return positionOfTheMouseOverLane - lengthOfAdditional;
1618 return positionOfTheMouseOverLane - lengthOfAdditional / 2;
1629 return positionOfTheMouseOverLane + lengthOfAdditional;
1631 return positionOfTheMouseOverLane;
1633 return positionOfTheMouseOverLane + lengthOfAdditional / 2;
1664 myHeaderRightFrame->hide();
1679 FXVerticalFrame::hide();
1697 FXVerticalFrame::show();
1706 FXVerticalFrame::hide();
1758 FXDialogBox* attributesHelpDialog =
new FXDialogBox(
myScrollWindowsContents, (
"Parameters of " + tagProperties.
getTagStr()).c_str(),
GUIDesignDialogBoxResizable, 0, 0, 0, 0, 10, 10, 10, 38, 4, 4);
1762 int sizeColumnDescription = 0;
1763 int sizeColumnDefinitions = 0;
1765 myTable->setVisibleColumns(3);
1767 myTable->setBackColor(FXRGB(255, 255, 255));
1768 myTable->setColumnText(0,
"Attribute");
1769 myTable->setColumnText(1,
"Description");
1770 myTable->setColumnText(2,
"Definition");
1771 myTable->getRowHeader()->setWidth(0);
1774 for (
auto i : tagProperties) {
1776 FXTableItem* attribute =
new FXTableItem(
toString(i.first).c_str());
1777 attribute->setJustify(FXTableItem::CENTER_X);
1778 myTable->setItem(itemIndex, 0, attribute);
1780 FXTableItem* type =
new FXTableItem(
"");
1781 type->setText(i.second.getDescription().c_str());
1782 sizeColumnDescription =
MAX2(sizeColumnDescription, (
int)i.second.getDescription().size());
1783 type->setJustify(FXTableItem::CENTER_X);
1784 myTable->setItem(itemIndex, 1, type);
1786 FXTableItem* definition =
new FXTableItem(i.second.getDefinition().c_str());
1787 definition->setJustify(FXTableItem::LEFT);
1788 myTable->setItem(itemIndex, 2, definition);
1789 sizeColumnDefinitions =
MAX2(sizeColumnDefinitions, (
int)i.second.getDefinition().size());
1793 FXHeader* header = myTable->getColumnHeader();
1794 header->setItemJustify(0, JUSTIFY_CENTER_X);
1795 header->setItemSize(0, 120);
1796 header->setItemJustify(1, JUSTIFY_CENTER_X);
1797 header->setItemSize(1, sizeColumnDescription * 7);
1798 header->setItemJustify(2, JUSTIFY_CENTER_X);
1799 header->setItemSize(2, sizeColumnDefinitions * 6);
1809 WRITE_DEBUG(
"Opening HelpAttributes dialog for tag '" + tagProperties.getTagStr() +
"' showing " +
toString(tagProperties.getNumberOfAttributes()) +
" attributes");
1811 attributesHelpDialog->create();
1813 attributesHelpDialog->show(PLACEMENT_CURSOR);
1815 getApp()->refresh();
1817 getApp()->runModalFor(attributesHelpDialog);
1819 WRITE_DEBUG(
"Closing HelpAttributes dialog for tag '" + tagProperties.getTagStr() +
"'");
void hideGenericParametersEditor()
hide netedit attributes editor
GNEFrame()
FOX needs this.
bool hasAttrRange() const
return true if Attr correspond to an element that only accept a range of values
bool myDeleteLastCreatedPoint
flag to enable/disable delete point mode
const RGBColor & getEdgeCandidateColor() const
get edge candidate color
static const TagProperties & getTagProperties(SumoXMLTag tag)
get Tag Properties
void hideNeteditAttributesModul()
hide Netedit attributes modul
SumoXMLTag
Numbers representing SUMO-XML - element names.
GNEInspectorFrame * getInspectorFrame() const
get frame for GNE_MODE_INSPECT
FXTextField * myLengthTextField
textField for length
#define GUIDesignComboBoxNCol
number of column of every combo box
static RGBColor parseColor(std::string coldef)
Parses a color information.
FXButton * myStartDrawingButton
button for start drawing
virtual void enableModuls(const GNEAttributeCarrier::TagProperties &tagProperties)
enable moduls depending of item selected in ItemSelector (can be reimplemented in frame childs) ...
#define GUIDesignCheckButtonAttribute
checkButton without thick extended over the frame used for attributes
GNEEdge * retrieveEdge(const std::string &id, bool failHard=true)
get edge by id
void hideFramesArea()
hide frames area if all GNEFrames are hidden
ACAttributes * getACAttributesParent() const
get ACAttributes parent
#define GUIDesignButtonAttribute
button extended over over column with thick and raise frame
void abortDrawing()
abort drawing
std::map< SumoXMLAttr, std::string > getAttributesAndValues() const
get attributes and their values
static bool isValidAttribute(const std::string &value)
whether the given string is a valid attribute for a certain key (for example, a name) ...
void hide()
hide delete frame
static bool isValidListOfTypeID(const std::string &value)
whether the given string is a valid list of ids for an edge or vehicle type (empty aren't allowed) ...
void showParameter(SumoXMLAttr const attr, const GNEAttributeCarrier::AttributeProperties &attrProperties, const std::string &value)
show name and value of attribute of type string
begin/end of the description of a junction
begin/end of the description of a single lane
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
FXLabel * myBlockShapeLabel
Label for block shape.
block shape of a graphic element (Used mainly in GNEShapes)
FXTreeItem * showAttributeCarrierParents()
show child of current attributeCarrier
FXLabel * myLabel
lael with the name of the parameter
FXFont * myFrameHeaderFont
Font for the Header.
FXHorizontalFrame * myHeaderRightFrame
fame for right header elements
void showACHierarchy(GNEAttributeCarrier *AC)
show ACHierarchy
ACAttributes()
FOX needs this.
long onCmdSetColorAttribute(FXObject *, FXSelector, void *)
called when user press the "Color" button
connectio between two lanes
void hideACHierarchy()
hide ACHierarchy
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
In GNEINSPECTORFRAME, inspect element.
GNEViewParent * getViewParent() const
get the net object
std::map< FXTreeItem *, GNEAttributeCarrier * > myTreeItemToACMap
map used to save the Tree items with their AC
GNEConnection * retrieveConnection(const std::string &id, bool failHard=true) const
get Connection by id
struct with the attribute Properties
bool isFilename() const
return true if atribute is a filename
Position snapToActiveGrid(const Position &pos) const
Returns a position that is mapped to the closest grid point if the grid is active.
long onCmdDeleteItem(FXObject *, FXSelector, void *)
called when user select option "delte item" of child menu
void showFramesArea()
show frames area if at least a GNEFrame is showed
void setDeleteLastCreatedPoint(bool value)
enable or disable delete last created point
#define GUIDesignContentsFrame
design for the main content frame of every frame/dialog
GNEFrame * myFrameParent
pointer to inspector frame parent
GNEPOI * retrievePOI(const std::string &id, bool failHard=true) const
get POI by id
GNEAttributeCarrier * myRightClickedAC
pointer to current right clicked Attribute Carrier
void inspectSingleElement(GNEAttributeCarrier *AC)
Inspect a single element.
void removeLastPoint()
remove last added point
bool isPositive() const
return true if atribute is positive
const RGBColor & getEdgeCandidateSelectedColor() const
get selected color
static int getHigherNumberOfAttributes()
return the number of attributes of the tag with the most highter number of attributes ...
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
Close shape of a polygon (Used by GNEPolys)
double setStartPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const
obtain the Start position values of StoppingPlaces and E2 detector over the lane
void hideDrawingShape()
hide Drawing mode
static std::vector< SumoXMLTag > allowedTagsByCategory(int tagPropertyCategory, bool onlyDrawables)
get tags of all editable element types using TagProperty Type (TAGPROPERTY_NETELEMENT, TAGPROPERTY_ADDITIONAL, etc.)
void refreshGenericParametersEditor()
refresh netedit attributes
bool canMaskStartEndPos() const
return true if tag correspond to an element that can mask the attributes "start" and "end" position a...
FXIcon * getIcon() const
get FXIcon associated to this AC
FXComboBox * myTypeMatchBox
comboBox with the list of elements type
FXCheckButton * myBoolCheckButton
check button to enable/disable the value of boolean parameters
FXScrollWindow * myScrollWindowsContents
scroll windows that holds the content frame
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
GNEFrame * myFrameParent
pointer to Frame Parent
std::vector< ACAttributeRow * > myACAttributeRows
vector with the ACAttribute Rows
void p_begin(const std::string &description)
Begin undo command sub-group. This begins a new group of commands that are treated as a single comman...
FXFont * getFrameHeaderFont() const
get font of the header's frame
FXHorizontalFrame * myHeaderFrame
fame for header elements
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
begin/end of the description of a Point of interest
#define GUIDesignTreeListFrame
Tree list used in frames to represent childs of elements.
void refreshTagProperties()
due myCurrentTagProperties is a Reference, we need to refresh it when frameParent is show ...
GNELane * getLane() const
get GNELane
RGBColor myEdgeCandidateSelectedColor
selected edge candidate color (used by some modulds to selected mark edges)
FXCheckButton * myBlockMovementCheckButton
checkBox for block movement
long onCmdAbortDrawing(FXObject *, FXSelector, void *)
Called when the user press abort drawing button.
long onCmdHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
virtual void setAttribute(SumoXMLAttr key, const std::string &value, GNEUndoList *undoList)=0
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
const std::vector< GNEEdge * > & getGNEEdges() const
Returns all GNEEdges vinculated with this Junction.
static bool isValidGenericParameterKey(const std::string &value)
whether the given string is a valid key for a generic parameter
virtual std::vector< std::pair< std::string, std::string > > getGenericParameters() const =0
return generic parameters as vector of pairs format
GNEAttributeCarrier::TagProperties myTagProperties
current edited Tag Properties
FXButton * myColorEditor
Button for open color editor.
GNEViewNet * getViewNet() const
get view net
bool isProbability() const
return true if atribute is a probability
GNEFrame * myFrameParent
Frame Parent.
GNEAttributeCarrier::TagProperties myInvalidTagProperty
dummy tag properties used if user select an invalid tag
virtual std::string getAttribute(SumoXMLAttr key) const =0
~GenericParametersEditor()
destructor
#define WRITE_WARNING(msg)
GNEEdge * getEdgeTo() const
get the name of the edge the vehicles may reach when leaving "from"
bool isInt() const
return true if atribute is an integer
FXTreeItem * addACIntoList(GNEAttributeCarrier *AC, FXTreeItem *itemParent)
add item into list
std::set< FXTreeItem * > myTreeItemsConnections
set used to save tree items without AC assigned, the Incoming/Outcoming connections ...
void showNeteditAttributesModul(const GNEAttributeCarrier::TagProperties &tagValue)
show Netedit attributes modul
#define GUIDesignComboBox
long onCmdInspectItem(FXObject *, FXSelector, void *)
called when user select option "inspect item" of child menu
GNEViewNet * myViewNet
View Net for changes.
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
std::vector< GNEAttributeCarrier * > myACs
list of edited ACs
const std::vector< GNEAttributeCarrier * > & getInspectedACs() const
get current list of inspected ACs
bool isColor() const
return true if atribute is a color
GNEAdditional * retrieveAdditional(SumoXMLTag type, const std::string &id, bool hardFail=true) const
Returns the named additional.
Dialog for edit generic parameters.
FXButton * myAbortDrawingButton
button for abort drawing
const std::vector< GNECrossing * > & getGNECrossings() const
Returns GNECrossings.
std::string getGenericParametersStr() const
get generic parameters as string
const GNEAttributeCarrier::TagProperties & getCurrentTagProperties() const
get current type tag
GNEUndoList * getUndoList() const
get the undoList object
GNEAttributeCarrier::AttributeProperties myAttrProperties
attribute properties
bool canBlockMovement() const
return true if tag correspond to an element that can block their movement
FXCheckButton * myCloseShapeCheckButton
checkbox to enable/disable closing polygon
#define GUIDesignAuxiliarFrame
design for auxiliar (Without borders) frames used to pack another frames extended in all directions ...
double setEndPosition(double positionOfTheMouseOverLane, double lengthOfAdditional) const
obtain the End position values of StoppingPlaces and E2 detector over the lane
FXCheckButton * myBlockShapeCheckButton
checkBox for block shape
GNEAttributeCarrier * myAC
edited Attribute Carrier
virtual std::string getPopUpID() const =0
get PopPup ID (Used in AC Hierarchy)
static bool isValidGenericParameterValue(const std::string &value)
whether the given string is a valid value for a generic parameter
void stopDrawing()
stop drawing and check if shape can be created
void startDrawing()
start drawing
#define GUIDesignHorizontalSeparator
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
double getMaximumRange() const
get maximum range
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
This object is responsible for drawing a shape and for supplying a a popup menu. Messages are routete...
GNEEdge & getParentEdge()
Returns underlying parent edge.
std::string getHierarchyName() const
get Hierarchy Name (Used in AC Hierarchy)
SumoXMLAttr myXMLAttr
current XML attribute
void showAttributeCarrierChilds(GNEAttributeCarrier *AC, FXTreeItem *itemParent)
show child of current attributeCarrier
int getNumberOfAttributes() const
get number of attributes
A point in 2D or 3D with translation and scaling methods.
void p_end()
End undo command sub-group. If the sub-group is still empty, it will be deleted; otherwise, the sub-group will be added as a new command into parent group. A matching begin() must have been called previously.
bool isBool() const
return true if atribute is boolean
GNEJunction * retrieveJunction(const std::string &id, bool failHard=true)
get junction by id
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
#define GUIDesignContentsScrollWindow
design for the content frame of every frame
double getMinimumRange() const
get minimum range
GNEEdge * getEdgeFrom() const
get the name of the edge the vehicles leave
static bool isGenericParametersValid(const std::string &value)
check if given string can be parsed to a map/list of generic parameters
FXComboBox * myReferencePointMatchBox
match box with the list of reference points
std::vector< SumoXMLTag > myListOfTags
list of tags that will be shown in Match Box
FXLabel * myFrameHeaderLabel
the label for the frame's header
long onCmdSetAttribute(FXObject *, FXSelector, void *)
virtual void centerTo(GUIGlID id, bool applyZoom, double zoomDist=20)
centers to the chosen artifact
bool canCloseShape() const
return true if tag correspond to an element that can close their shape
void showDrawingShape()
show Drawing mode
std::vector< std::pair< std::string, std::string > > * myGenericParameters
pointer to current vector of generic parameters
std::vector< GNEConnection * > getGNEIncomingConnections()
returns a vector with the incoming GNEConnections of this lane
GNEJunction * getGNEJunctionDestiny() const
returns the destination-junction
void refreshACHierarchy()
refresh ACHierarchy
static int getTextureID(const std::string &filename, const bool mirrorX=false)
return texture id for the given filename (initialize on first use)
block movement of a graphic element
void showACAttributesModul(const GNEAttributeCarrier::TagProperties &myTagProperties)
show ACAttributes modul
double getLengthGeometryFactor() const
get lenght geometry factor
bool myCurrentLengthValid
Flag to check if current length is valid.
FXButton * myStopDrawingButton
button for stop drawing
attribute edited trought dialog
GUIMainWindow * getGUIMainWindow() const
get GUIMainWindow App
void showWarningMessage(std::string extra="") const
show warning message with information about non-valid attributes
const PositionVector & getTemporalShape() const
get Temporal shape
int getNumberOfAddedAttributes() const
get number of added attributes
long onCmdShowChildMenu(FXObject *, FXSelector, void *data)
bool isAdditional() const
return true if tag correspond to an additional
void setFrameWidth(int newWidth)
set width of GNEFrame
const std::string getID() const
function to support debugging
In GNEINSPECTORFRAME, delete element.
bool isTAZ() const
return true if tag correspond to a TAZ
FXLabel * myBlockMovementLabel
Label for block movement.
void createPopUpMenu(int X, int Y, GNEAttributeCarrier *ac)
#define GUIDesignDialogBoxResizable
design for standard dialog box (for example, about dialog)
void focusUpperElement()
focus upper element of frame
std::string getValue() const
return value
std::vector< GNEConnection * > getGNEOutcomingConnections()
returns a vector with the outgoing GNEConnections of this lane
GNEAttributeCarrier * myAC
Attribute carrier.
bool getNeteditAttributesAndValues(std::map< SumoXMLAttr, std::string > &valuesMap, GNELane *lane) const
fill valuesMap with netedit attributes
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
GNEJunction * getGNEJunctionSource() const
returns the source-junction
ACHierarchy()
FOX needs this.
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
void addNewPoint(const Position &P)
add new point to temporal shape
RGBColor myEdgeCandidateColor
edge candidate color (used by some modulds to mark edges)
DrawingShape()
FOX needs this.
long onCmdSetBooleanAttribute(FXObject *, FXSelector, void *)
called when user change the value of myBoolCheckButton
begin/end of the description of an edge
GenericParametersEditor()
FOX needs this.
bool isDrawing() const
return true if currently a shape is drawed
A road/street connecting two junctions (netedit-version)
long onCmdStartDrawing(FXObject *, FXSelector, void *)
#define GUIDesignTextFieldNCol
Num of column of text field.
~NeteditAttributes()
destructor
GNEFrame * myFrameParent
pointer to frame parent
GNECrossing * retrieveCrossing(const std::string &id, bool failHard=true) const
get Crossing by id
FXButton * helpReferencePoint
Button for help about the reference point.
const PositionVector & getShape() const
returns the shape of the lane
~ItemSelector()
destructor
const std::vector< GNELane * > & getLanes()
returns a reference to the lane vector
bool isFloat() const
return true if atribute is a float
virtual void show()
show Frame
FXTextField * myTextFieldStrings
textField to modify the default value of string parameters
#define GUIDesignDialogBox
An Element which don't belongs to GNENet but has influency in the simulation.
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
GNEFrame * myFrameParent
pointer to Polygon Frame Parent
struct with the attribute Properties
GNEFrame * myFrameParent
pointer to frame parent
FXLabel * myClosePolygonLabel
Label for open/close polygon.
void showGenericParametersEditor(GNEAttributeCarrier *AC)
show netedit attributes editor (used for edit generic parameters of an existent AC) ...
long onCmdSetGenericParameter(FXObject *, FXSelector, void *)
Called when user udpate the generic parameter text field.
ACAttributeRow()
FOX needs this.
crossing between edges for pedestrians
~DrawingShape()
destructor
long onCmdStopDrawing(FXObject *, FXSelector, void *)
Called when the user press stop drawing button.
#define GUIDesignTextFieldInt
text field extended over Frame with thick frame and limited to Integers
virtual void hide()
hide Frame
long onCmdSelectItem(FXObject *, FXSelector, void *)
~ACAttributeRow()
destructor
void hideParameter()
hide all parameters
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_MODE_DELETE
FXTextField * myTextFieldGenericParameter
text field for write generic parameter
GNENet * getNet() const
get the net object
#define GUIDesignTextFieldReal
text field extended over Frame with thick frame and limited to Doubles/doubles
~ACAttributes()
destructor
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
FXLabel * myLengthLabel
Label for length.
GUIGlID getGlID() const
Returns the numerical id of the object.
long onCmdCenterItem(FXObject *, FXSelector, void *)
called when user select option "center item" of child Menu
#define GUIDesignTableNotEditable
design for table extended over frame that cannot be edited
#define GUIDesignButtonOK
void removeAttributeCarrier(GNEAttributeCarrier *ac, bool ignoreOptions=false)
remove attribute carrier (element)
void setStatusBarText(const std::string &text)
set staturBar text
virtual std::string getHierarchyName() const =0
get Hierarchy Name (Used in AC Hierarchy)
FXTextField * myTextFieldInt
textField to modify the default value of int/float/string parameters
FXTreeList * myTreelist
tree list to show the childs of the element to erase
void inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
const std::string & getDefaultValue() const
get default value
virtual bool buildShape()
build a shaped element using the drawed shape (can be reimplemented in frame childs) return true if w...
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
Position getPositionInformation() const
Returns the cursor's x/y position within the network.
void openHelpAttributesDialog(const GNEAttributeCarrier::TagProperties &tagProperties) const
Open help attributes dialog.
bool areValuesValid() const
check if parameters of attributes are valid
bool isTime() const
return true if atribute is time
long onCmdHelp(FXObject *, FXSelector, void *)
parent of an additional element
used to select a type of element in a combo box
GNEAttributeCarrier::TagProperties myCurrentTagProperties
current tag properties
virtual void disableModuls()
disable moduls if element selected in itemSelector isn't valid (can be reimplemented in frame childs)...
bool getDeleteLastCreatedPoint()
get flag delete last created point
In GNEINSPECTORFRAME, center element.
FXTextField * myTextFieldReal
textField to modify the default value of real/times parameters
begin/end of the description of a Point of interest over Lane (used by Netedit)
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
friend class ACAttributeRow
FOX-declaration.
bool canBlockShape() const
return true if tag correspond to an element that can block their shape
SumoXMLAttr getAttr() const
return Attr
const std::string & isAttributeValid() const
returns a empty string if current value is valid, a string with information about invalid value in ot...
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
const std::vector< GNEAdditional * > & getAdditionalChilds() const
return vector of additionals that have as Parent this edge (For example, Calibrators) ...
FXLabel * myInformationLabel
Label with information.
static bool isValidFilename(const std::string &value)
whether the given string is a valid attribute for a filename (for example, a name) ...
GNELane * retrieveLane(const std::string &id, bool failHard=true, bool checkVolatileChange=false)
get lane by id
FXDEFMAP(GNEFrame::ItemSelector) ItemSelectorMap[]
long onCmdEditGenericParameter(FXObject *, FXSelector, void *)
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
void setCurrentTypeTag(SumoXMLTag typeTag)
set current type manually
void hideACAttributesModul()
hide group box
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
NeteditAttributes()
FOX needs this.
FXButton * myEditGenericParameterButton
button for add generic parameter
std::string myInvalidValue
string which indicates the reason due current value is invalid
begin/end of the description of a polygon
AdditionalReferencePoint myActualAdditionalReferencePoint
actual additional reference point selected in the match Box
GNEJunction * getParentJunction() const
get parent Junction
ACAttributes * myACAttributesParent
pointer to ACAttributes
PositionVector myTemporalShapeShape
current drawed shape