20 #ifndef GNEAdditionalFrame_h 21 #define GNEAdditionalFrame_h 159 void showListParameter(
SumoXMLTag additionalTag,
SumoXMLAttr additionalAttr, std::vector<int> value);
162 void showListParameter(
SumoXMLTag additionalTag,
SumoXMLAttr additionalAttr, std::vector<double> value,
bool isTime =
false);
165 void showListParameter(
SumoXMLTag additionalTag,
SumoXMLAttr additionalAttr, std::vector<bool> value);
168 void showListParameter(
SumoXMLTag additionalTag,
SumoXMLAttr additionalAttr, std::vector<std::string> value);
180 std::string getListValues();
183 bool isCurrentListValid()
const;
188 long onCmdAddRow(FXObject*, FXSelector,
void*);
191 long onCmdRemoveRow(FXObject*, FXSelector,
void*);
246 void clearAttributes();
252 void showAdditionalParameters();
255 void hideAdditionalParameters();
258 std::map<SumoXMLAttr, std::string> getAttributesAndValues()
const;
261 bool areValuesValid()
const;
264 void showWarningMessage(std::string extra =
"")
const;
267 int getNumberOfAddedAttributes()
const;
272 long onCmdHelp(FXObject*, FXSelector,
void*);
322 GNE_ADDITIONALREFERENCEPOINT_INVALID
332 void showLengthField();
335 void hideLengthField();
338 void showReferencePoint();
341 void hideReferencePoint();
350 bool isBlockEnabled();
353 bool isForcePositionEnabled();
356 bool isCurrentLengthValid()
const;
361 long onCmdSetLength(FXObject*, FXSelector,
void*);
364 long onCmdSelectReferencePoint(FXObject*, FXSelector,
void*);
367 long onCmdSetBlocking(FXObject*, FXSelector,
void*);
370 long onCmdSetForcePosition(FXObject*, FXSelector,
void*);
373 long onCmdHelp(FXObject*, FXSelector,
void*);
428 std::string getIdSelected()
const;
431 void showListOfAdditionals(
SumoXMLTag type,
bool uniqueSelection);
434 void hideListOfAdditionals();
439 long onCmdSelectAdditionalParent(FXObject*, FXSelector,
void*);
442 long onCmdHelp(FXObject*, FXSelector,
void*);
486 void showList(std::string search =
"");
492 void updateUseSelectedEdges();
495 bool isUseSelectedEdgesEnable()
const;
500 long onCmdUseSelectedEdges(FXObject*, FXSelector,
void*);
503 long onCmdTypeInSearchBox(FXObject*, FXSelector,
void*);
506 long onCmdSelectEdge(FXObject*, FXSelector,
void*);
509 long onCmdClearSelection(FXObject*, FXSelector,
void*);
512 long onCmdInvertSelection(FXObject*, FXSelector,
void*);
515 long onCmdHelp(FXObject*, FXSelector,
void*);
564 void showList(std::string search =
"");
570 void updateUseSelectedLanes();
573 bool isUseSelectedLanesEnable()
const;
578 long onCmdUseSelectedLanes(FXObject*, FXSelector,
void*);
581 long onCmdTypeInSearchBox(FXObject*, FXSelector,
void*);
584 long onCmdSelectLane(FXObject*, FXSelector,
void*);
587 long onCmdClearSelection(FXObject*, FXSelector,
void*);
590 long onCmdInvertSelection(FXObject*, FXSelector,
void*);
593 long onCmdHelp(FXObject*, FXSelector,
void*);
668 double setStartPosition(
double positionOfTheMouseOverLane,
double lengthOfAdditional);
671 double setEndPosition(
double laneLength,
double positionOfTheMouseOverLane,
double lengthOfAdditional);
double setStartPosition(double positionOfTheMouseOverLane, double lengthOfAdditional)
obtain the Start position values of StoppingPlaces and E2 detector over the lane
SelectorParentAdditional()
FOX needs this.
int maxNumberOfListParameters
max number of parameters (Defined in constructor)
FXButton * helpLanes
button for help
SumoXMLTag
Numbers representing SUMO-XML - element names.
SumoXMLAttr myAdditionalAttr
current XML attribute
additionalReferencePoint myActualAdditionalReferencePoint
actual additional reference point selected in the match Box
int maxNumberOfParameters
max number of parameters (Defined in constructor)
GNEViewNet * myViewNet
pointer to viewNet
FXCheckButton * myUseSelectedLanesCheckButton
CheckBox for selected lanes.
FXButton * myRemoveButton
Button to decrease the number of textFields.
SumoXMLTag getTag() const
return tag
GNEAdditionalFrame::AdditionalAttributes * myadditionalParameters
additional internal attributes
int myNumberOfVisibleTextfields
number of visible text fields
FXList * myList
List of additional sets.
FXTextField * myTextFieldStrings
textField to modify the default value of string parameters
FXComboBox * myReferencePointMatchBox
match box with the list of reference points
additionalReferencePoint
FOX-declaration.
double setEndPosition(double laneLength, double positionOfTheMouseOverLane, double lengthOfAdditional)
obtain the End position values of StoppingPlaces and E2 detector over the lane
FXCheckButton * myBoolCheckButton
check button to enable/disable the value of boolean parameters
FXButton * myClearEdgesSelection
button for clear selection
std::string myInvalidValue
string which indicates the reason due current value is invalid
long onCmdSelectAdditional(FXObject *, FXSelector, void *)
int myIndexParameter
Index for myVectorOfsingleAdditionalParameter.
FXTextField * myLengthTextField
textField for length
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
void setParametersOfAdditional(SumoXMLTag actualAdditionalType)
set parameters depending of the new additionalType
bool myCurrentLengthValid
Flag to check if current length is valid.
FXTextField * myEdgesSearch
text field for search edge IDs
FXButton * myInvertEdgesSelection
button for invert selection
FXCheckButton * myUseSelectedEdgesCheckButton
CheckBox for selected edges.
AdditionalAttributeList()
FOX needs this.
FXButton * clearLanesSelection
button for clear selection
FXLabel * myLengthLabel
Label for length.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
FXList * myList
List of SelectorParentLanes.
std::vector< FXLabel * > myLabels
vector with with the name of every parameter
int myIndexParameterList
index for myIndexParameterList
SumoXMLTag myActualAdditionalType
actual additional type selected in the match Box
FXButton * myHelpAdditionalParentSelector
button for help
SelectorParentLanes()
FOX needs this.
void removeAdditional(GNEAdditional *additional)
remove an additional element previously added
SelectorParentEdges()
FOX needs this.
SumoXMLAttr myAdditionalAttr
current XML attribute
~GNEAdditionalFrame()
Destructor.
SumoXMLAttr getAttr() const
return Attr
FXLabel * myBlockLabel
Label for block movement.
FXComboBox * myAdditionalMatchBox
combo box with the list of additional elements
FXTextField * myLanesSearch
text field for search lane IDs
AdditionalAttributes()
FOX needs this.
GNEAdditionalFrame::NeteditAttributes * myEditorParameters
Netedit parameter.
SumoXMLTag myAdditionalTag
current XML tag
std::vector< FXTextField * > myTextFields
vector textField to modify the value of parameter
FXButton * myAddButton
Button to increase the number of textFields.
FXGroupBox * myGroupBoxForMyAdditionalMatchBox
groupBox for Match Box of additionals
GNEAdditionalFrame::SelectorParentLanes * mylaneParentsSelector
list of SelectorParentLanes
FXLabel * myForcePositionLabel
Label for force position.
GNEAdditionalFrame::SelectorParentEdges * myedgeParentsSelector
list of SelectorParentEdges
void hideParameter()
hide all parameters
FXButton * helpAdditional
button for help
FXList * myList
List of SelectorParentEdges.
~AdditionalAttributeSingle()
destructor
SumoXMLTag myAdditionalTag
current XML attribute
FXLabel * myLabel
lael with the name of the parameter
AddAdditionalResult addAdditional(GNENetElement *netElement, GUISUMOAbstractView *parent)
add additional element
AddAdditionalResult
FOX-declaration.
SumoXMLTag myAdditionalTag
current additional tag
GNEAdditionalFrame()
FOX needs this.
FXLabel * mySetLabel
Label with the name of additional.
void show()
show additional frame and update use selected edges/lanes
void showParameter(SumoXMLTag additionalTag, SumoXMLAttr additionalAttr, std::string value)
show name and value of attribute of type string
An Element which don't belongs to GNENet but has influency in the simulation.
std::string getValue() const
return value
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
bool myUniqueSelection
flag to check if only a single parent is allowed
long onCmdSetBooleanAttribute(FXObject *, FXSelector, void *)
called when user change the value of myBoolCheckButton
std::string generateID(GNENetElement *netElement) const
generate a ID for an additiona element
const std::string & isAttributeValid() const
returns a empty string if current value is valid, a string with information about invalid value in ot...
FXButton * invertLanesSelection
button for invert selection
GNEAdditionalFrame::SelectorParentAdditional * myAdditionalParentSelector
list of additional Set
AdditionalAttributeSingle()
FOX needs this.
FXTextField * myTextFieldInt
textField to modify the default value of int/float/string parameters
static std::string getIdsSelected(const FXList *list)
get list of selecte id's in string format
FXHorizontalFrame * myHorizontalFrameButtons
horizontal frame for buttons
FXCheckButton * myForcePositionCheckButton
checkBox for the option "force position"
std::vector< FXHorizontalFrame * > myHorizontalFrames
Vector with HorizontalFrames.
int myMaxNumberOfValuesInParameterList
Number max of values in a parameter of type list.
GNEViewNet * myViewNet
viewNet associated to GNEAdditionalFrame
std::vector< AdditionalAttributeSingle * > myVectorOfsingleAdditionalParameter
vector with the additional parameters
std::vector< AdditionalAttributeList * > myVectorOfsingleAdditionalParameterList
vector with the additional parameters of type list
FXCheckButton * myBlockMovementCheckButton
checkBox for block movement
FXTextField * myTextFieldReal
textField to modify the default value of real/times parameters
FXButton * helpReferencePoint
Button for help about the reference point.
NeteditAttributes()
FOX needs this.
FXButton * myHelpedgeParentsSelector
button for help