72 FXIMPLEMENT(
GNEInspectorFrame, FXVerticalFrame, GNEInspectorFrameMap, ARRAYNUMBER(GNEInspectorFrameMap))
84 GNEFrame(horizontalFrameParent, viewNet, "Inspector"),
85 myPreviousElementInspect(
nullptr),
86 myPreviousElementDelete(
nullptr) {
90 myHeaderLeftFrame->hide();
213 std::vector<GNEAttributeCarrier*> itemsToInspect;
220 for (
const auto& i : selectedACs) {
223 itemsToInspect.push_back(i);
227 itemsToInspect.push_back(AC);
248 if (ACs.size() > 0) {
250 std::string headerString;
251 if (ACs.front()->getTagProperty().isNetElement()) {
252 headerString =
"Net: ";
253 }
else if (ACs.front()->getTagProperty().isAdditional()) {
254 headerString =
"Additional: ";
255 }
else if (ACs.front()->getTagProperty().isShape()) {
256 headerString =
"Shape: ";
258 if (ACs.size() > 1) {
259 headerString +=
toString(ACs.size()) +
" ";
261 headerString += ACs.front()->getTagStr();
262 if (ACs.size() > 1) {
278 if (ACs.size() == 1) {
288 if (ACs.size() == 1) {
411 myInspectorFrameParent(inspectorFrameParent),
516 if (myItemIndex > 0) {
573 FXDialogBox* helpDialog =
new FXDialogBox(
this,
"GEO attributes Help",
GUIDesignDialogBox);
574 std::ostringstream help;
576 <<
" - Click in the same position\n" 577 <<
" for inspect next element\n" 578 <<
" - Shift + Click in the same\n" 579 <<
" position for inspect\n" 580 <<
" previous element";
584 helpDialog->create();
655 if (tagValue.canBlockMovement()) {
675 if (tagValue.canBlockShape()) {
695 if (tagValue.canCloseShape()) {
715 if (tagValue.hasParent() && tagValue.canBeReparent()) {
719 std::set<std::string> parents;
920 if (tagProperty.hasGEOPosition() || tagProperty.hasGEOShape()) {
926 value &= GNEAttributeCarrier::parse<bool>(i->getAttribute(
SUMO_ATTR_GEO));
996 if (tagProperty.hasGEOPosition()) {
998 }
else if (tagProperty.hasGEOShape()) {
1014 if (tagProperty.hasGEOPosition()) {
1022 }
else if (tagProperty.hasGEOShape()) {
1031 throw ProcessError(
"myGEOAttributeTextField must be hidden becaurse there isn't GEO Attribute to edit");
1055 FXDialogBox* helpDialog =
new FXDialogBox(
this,
"GEO attributes Help",
GUIDesignDialogBox);
1056 std::ostringstream help;
1058 <<
" SUMO uses the World Geodetic System 84 (WGS84/UTM).\n" 1059 <<
" For a GEO-referenced network, geo coordinates are represented as pairs of Longitude and Latitude\n" 1060 <<
" in decimal degrees without extra symbols. (N,W..)\n" 1061 <<
" - Longitude: East-west position of a point on the Earth's surface.\n" 1062 <<
" - Latitude: North-south position of a point on the Earth's surface.\n" 1063 <<
" - CheckBox 'geo' enables or disables saving position in GEO coordinates\n";
1067 helpDialog->create();
1079 myEdgeTemplate(nullptr) {
1180 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE),
nullptr);
1182 caption =
"No edge Template Set";
1183 sender->handle(
this, FXSEL(SEL_COMMAND, ID_DISABLE),
nullptr);
1185 sender->handle(
this, FXSEL(SEL_COMMAND, FXLabel::ID_SETSTRINGVALUE), (
void*)&caption);
void refreshNeteditAttributesEditor(bool forceRefresh)
refresh netedit attributes
void copyTemplate(GNEEdge *tpl, GNEUndoList *undolist)
copy edge attributes from tpl
void showTemplateEditor()
show template editor
FXLabel * myLabelBlockMovement
Label for Check blocked movement.
bool nextElement(const Position &clickedPosition)
try to go to next element if clicked position is near to saved position
inspect previous element in overlapped modul
GNEInspectorFrame * myInspectorFrameParent
current GNEInspectorFrame parent
FXHorizontalFrame * myHorizontalFrameBlockMovement
horizontal frame for block movement
long onCmdNeteditAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
void updateFrameAfterUndoRedo()
function called after undo/redo in the current frame (can be reimplemented in frame children) ...
begin/end of the description of a single lane
void update() const
Mark the entire GNEViewNet to be repainted later.
FXLabel * getFrameHeaderLabel() const
get the label for the frame's header
bool controlKeyPressed() const
check if CONTROL key was pressed during click
void showGenericParametersEditor(GNEAttributeCarrier *AC)
show netedit attributes editor (used for edit generic parameters of an existent AC) ...
TemplateEditor()
FOX needs this.
FXButton * mySetTemplateButton
set template button
long onCmdPreviousElement(FXObject *, FXSelector, void *)
Inspect previous element (from top to bot)
block shape of a graphic element (Used mainly in GNEShapes)
FXHorizontalFrame * myGEOAttributeFrame
horizontal frame for GEOAttribute
Position mySavedClickedPosition
saved clicked position
#define GUIDesignListSingleElement
design for FXList sthat only allow a single selected elements selected
void inspectFromDeleteFrame(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement, bool previousElementWasMarked)
inspect called from DeleteFrame
void show()
show delete frame
std::vector< GNEAttributeCarrier * > getSelectedAttributeCarriers(bool ignoreCurrentSupermode)
get all selected attribute carriers (or only relative to current supermode
NeteditAttributesEditor()
FOX needs this.
GNEViewParent * getViewParent() const
get the net object
void inspectSingleElement(GNEAttributeCarrier *AC)
Inspect a single element.
go back to the previous element
FXTextField * myGEOAttributeTextField
textField for GEOAttribute
void refreshGEOAttributesEditor(bool forceRefresh)
refresh GEO attributes editor
Close shape of a polygon (Used by GNEPolys)
bool selectEdges() const
check if select edges checkbox is enabled
void hideOverlappedInspection()
hide template editor
FXCheckButton * myUseGEOCheckButton
checkBox for use GEO
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...
GEOAttributesEditor()
FOX needs this.
const std::vector< GNEAttributeCarrier * > & getClickedAttributeCarriers() const
get vector with clicked ACs
show list of overlapped elements
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier (or a pointer to nullptr if there isn't)
FXHorizontalFrame * myUseGEOFrame
horizontal frame for use GEO
void hideTemplateEditor()
hide template editor
GNEInspectorFrame * myInspectorFrameParent
current GNEInspectorFrame parent
FXButton * myCurrentIndexButton
Button for current index.
void showNeteditAttributesEditor()
show netedit attributes editor
GNEViewNet * getViewNet() const
get view net
long onCmdSetGEOAttribute(FXObject *, FXSelector, void *)
Called when user change the current GEO Attribute.
virtual void selectAttributeCarrier(bool changeFlag=true)=0
FXTextField * myTextFieldAdditionalParent
pointer for change additional parent
FXLabel * myLabelCloseShape
Label for close shape.
~GNEInspectorFrame()
Destructor.
OverlappedInspection * getOverlappedInspection() const
get OverlappedInspection modul
long onCmdSetNeteditAttribute(FXObject *, FXSelector, void *)
GNEViewNet * myViewNet
View Net.
long onCmdSetTemplate(FXObject *, FXSelector, void *)
set current edge as new template
void refreshAttributeCarrierHierarchy()
refresh AttributeCarrierHierarchy
void attributeUpdated()
function called after set a valid attribute in AttributeEditor
void hide()
hide inspector frame
FXHorizontalFrame * myHorizontalFrameAdditionalParent
horizontal frame for change additional parent
bool previousElement(const Position &clickedPosition)
try to go to previous element if clicked position is near to saved position
bool myPreviousElementDeleteWasMarked
flag to ckec if myPreviousElementDelete was marked in Delete Frame
GNEFrameAttributesModuls::GenericParametersEditor * myGenericParametersEditor
Generic parameters editor.
GNEDemandElement * getDemandElementFront() const
get front net element element (or a pointer to nullptr if there isn't)
#define GUIDesignButtonIconRectangular
button only with icon (46x23)
void showGEOAttributesEditor()
show GEO attributes editor
GNEUndoList * getUndoList() const
get the undoList object
size_t myItemIndex
current index item
LockGLObjectTypes * getLockGLObjectTypes() const
get selected items Modul
#define GUIDesignTextField
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
FXHorizontalFrame * myHorizontalFrameBlockShape
horizontal frame for block shape
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
FXVerticalFrame * myContentFrame
Vertical frame that holds all widgets of frame.
long onCmdShowList(FXObject *, FXSelector, void *)
show list of overlapped elements
void refreshAttributeEditor(bool forceRefreshShape, bool forceRefreshPosition)
refresh attribute editor (only the valid values will be refresh)
~NeteditAttributesEditor()
destructor
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.
A point in 2D or 3D with translation and scaling methods.
#define GUIDesignCheckButton
checkButton placed in left position
FXButton * myHelpButton
button for help
GNEInspectorFrame * myInspectorFrameParent
current GNEInspectorFrame parent
bool processDemandSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Demand
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames ...
Supermode currentSupermode
the current supermode
GNEFrameAttributesModuls::AttributesEditor * getAttributesEditor() const
get AttributesEditor
virtual bool isAttributeCarrierSelected() const =0
check if attribute carrier is selected
bool processNetworkSupermodeClick(const Position &clickedPosition, GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor)
process click over Viewnet in Supermode Network
FXButton * myCopyTemplateButton
copy template button
block movement of a graphic element
void showAttributeCarrierHierarchy(GNEAttributeCarrier *AC)
show AttributeCarrierHierarchy
FXList * myOverlappedElementList
list of overlapped elements
void setDottedAC(const GNEAttributeCarrier *AC)
set attributeCarrier under cursor
class used to group all variables related with objects under cursor after a click over view ...
GNEFrameAttributesModuls::AttributesEditor * myAttributesEditor
Attribute editor.
FXLabel * myLabelAdditionalParent
Label for additional parent.
long onCmdCopyTemplate(FXObject *, FXSelector, void *)
copy edge attributes from edge template
GNESelectorFrame * getSelectorFrame() const
get frame for GNE_NMODE_SELECT
const GNEViewNetHelper::KeyPressed & getKeyPressed() const
get Key Pressed modul
void showAttributeEditorModul(const std::vector< GNEAttributeCarrier *> &ACs, bool includeExtended)
show attributes of multiple ACs
FXHorizontalFrame * myHorizontalFrameCloseShape
horizontal frame for close shape
virtual const std::string & getMicrosimID() const
Returns the id of the object as known to microsim.
FXButton * myHelpButton
button for help
void clearInspectedAC()
Clear all current inspected ACs.
void focusUpperElement()
focus upper element of frame
std::vector< GNEAttributeCarrier * > myOverlappedACs
objects under cursor
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
void incRef(const std::string &debugMsg="")
Increarse reference.
void hideGenericParametersEditor()
hide netedit attributes editor
#define GUIDesignButtonRectangular
little button rectangular (46x23) used in frames (For example, in "help" buttons) ...
void inspectClickedElement(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
Inspect a singe element (the front of AC AttributeCarriers of ObjectUnderCursor.
long onUpdCopyTemplate(FXObject *, FXSelector, void *)
update the copy button with the name of the template
GNEAttributeCarrier * myPreviousElementInspect
pointer to previous element called by Inspector Frame
long onCmdGoBack(FXObject *, FXSelector, void *)
called when user toogle the go back button
FXCheckButton * myCheckBoxBlockShape
pointer to check box "Block Shape"
void decRef(const std::string &debugMsg="")
Decrease reference.
GNEEdge * myEdgeTemplate
the edge template
long onCmdNextElement(FXObject *, FXSelector, void *)
Inspect next Element (from top to bot)
const GNEViewNetHelper::NetworkViewOptions & getNetworkViewOptions() const
get network view options
begin/end of the description of an edge
FXCheckButton * myCheckBoxBlockMovement
pointer to check box "Block movement"
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
A road/street connecting two junctions (netedit-version)
bool shiftKeyPressed() const
check if SHIFT key was pressed during click
FXButton * myPreviousElement
Previous element button.
~TemplateEditor()
destructor
#define GUIDesignTextFieldNCol
Num of column of text field.
long onCmdGEOAttributeHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
bool checkSavedPosition(const Position &clickedPosition) const
check if given position is near to saved position
void hideAttributeCarrierHierarchy()
hide AttributeCarrierHierarchy
GNEAttributeCarrier * myPreviousElementDelete
pointer to previous element called by Delete Frame
long onCmdOverlappingHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
virtual void show()
show Frame
FXButton * myNextElement
Next element button.
#define GUIDesignDialogBox
#define GUIDesignGroupBoxFrame
Group box design extended over frame.
GEOAttributesEditor * myGEOAttributesEditor
GEO Attributes editor.
Demanding mode (Routes, Vehicles etc..)
~OverlappedInspection()
destructor
FXLabel * myUseGEOLabel
Label for use GEO.
long onCmdListItemSelected(FXObject *, FXSelector, void *)
called when a list item is selected
~GEOAttributesEditor()
destructor
TemplateEditor * getTemplateEditor() const
get template editor
void refreshGenericParametersEditor()
refresh netedit attributes
NeteditAttributesEditor * myNeteditAttributesEditor
Netedit Attributes editor.
TemplateEditor * myTemplateEditor
Template editor.
double distanceSquaredTo2D(const Position &p2) const
returns the square of the distance to another position (Only using x and y positions) ...
FXLabel * myLabelBlockShape
Label for Check blocked shape.
bool IsObjectTypeLocked(const GUIGlObjectType type) const
check if an object is locked
static const GeoConvHelper & getFinal()
the coordinate transformation for writing the location element and for tracking the original coordina...
virtual void hide()
hide Frame
void setEdgeTemplate(GNEEdge *tpl)
seh the template edge (we assume shared responsibility via reference counting)
GNEDeleteFrame * getDeleteFrame() const
get frame for GNE_NMODE_DELETE
void show()
show inspector frame
GNENet * getNet() const
get the net object
void hideNeteditAttributesEditor()
hide netedit attributes editor
void swapLane2Edge()
swap lane to edge
void showOverlappedInspection(const GNEViewNetHelper::ObjectsUnderCursor &objectsUnderCursor, const Position &clickedPosition)
show template editor
FXCheckButton * myCheckBoxCloseShape
pointer to check box "Block movement"
#define GUIDesignButtonOK
void hideAttributesEditorModul()
hide attribute editor
void inspectChild(GNEAttributeCarrier *AC, GNEAttributeCarrier *previousElement)
inspect child of already inspected element
const TagProperties & getTagProperty() const
get Tag Property assigned to this object
list item selected in overlapped modul
virtual void unselectAttributeCarrier(bool changeFlag=true)=0
unselect attribute carrier using GUIGlobalSelection
FXDEFMAP(GNEInspectorFrame) GNEInspectorFrameMap[]
parent of an additional element
GNEEdge * getEdgeTemplate() const
get the template edge (to copy attributes from)
void hideGEOAttributesEditor()
hide GEO attributes editor
FXButton * myBackButton
back Button
GUIGlObjectType getGlTypeFront() const
get front GUI GL object type (or a pointer to nullptr if there isn't)
void inspectMultisection(const std::vector< GNEAttributeCarrier *> &ACs)
Inspect the given multi-selection.
const GNEViewNetHelper::EditModes & getEditModes() const
get edit modes
#define GUIDesignLabelAttribute
label extended over the matrix column with thick frame and height of 23
FXLabel * myGEOAttributeLabel
Label for GEOAttribute.
FXButton * myHelpButton
button for help
Network mode (Edges, junctions, etc..)
const std::vector< GNEAttributeCarrier * > & getEditedACs() const
get current edited ACs
GNEInspectorFrame * myInspectorFrameParent
pointer to inspector frame parent
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
bool unreferenced()
check if object ins't referenced
void inspectOverlappedAttributeCarrier()
inspect attributeCarrier correspond to current index
FXHorizontalFrame * myHeaderLeftFrame
fame for left header elements
OverlappedInspection()
FOX needs this.
OverlappedInspection * myOverlappedInspection
Overlapped Inspection.
GNEFrameModuls::AttributeCarrierHierarchy * myAttributeCarrierHierarchy
Attribute Carrier Hierarchy.
inspect next element in overlapped modul