Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEAdditionalFrame.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// The Widget for add additional elements
19/****************************************************************************/
20
22#include <netedit/GNENet.h>
31
32#include "GNEAdditionalFrame.h"
33
34// ===========================================================================
35// method definitions
36// ===========================================================================
37
38// ---------------------------------------------------------------------------
39// GNEAdditionalFrame::E2MultilaneLegendModule - methods
40// ---------------------------------------------------------------------------
41
43 GNEGroupBoxModule(frameParent, TL("Legend")) {
44 // declare label
45 FXLabel* legendLabel = nullptr;
46 // edge candidate
47 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge candidate"), 0, GUIDesignLabel(JUSTIFY_LEFT));
49 legendLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
50 // last edge selected
51 legendLabel = new FXLabel(getCollapsableFrame(), TL(" last edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
52 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
53 // edge selected
54 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
55 legendLabel->setBackColor(MFXUtils::getFXColor(frameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.source));
56 // edge disconnected
57 legendLabel = new FXLabel(getCollapsableFrame(), TL(" edge disconnected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
59}
60
61
63
64
65void
69
70
71void
75
76// ---------------------------------------------------------------------------
77// GNEAdditionalFrame::HelpCreationModule - methods
78// ---------------------------------------------------------------------------
79
81 GNEGroupBoxModule(frameParent, TL("Help")) {
82 // edge candidate
84 // fill map
85 //addTLString(TL("-Requires EntryExitDetector\n")) +
86 // E1
87 myHelpMap[SUMO_TAG_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
88 // E1 Instant
89 myHelpMap[SUMO_TAG_INSTANT_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
90 // E2
91 myHelpMap[SUMO_TAG_LANE_AREA_DETECTOR] = addTLString(TL("-Click over lane to create it"));
92 // E3
93 myHelpMap[SUMO_TAG_ENTRY_EXIT_DETECTOR] = addTLString(TL("-Click over view to create it")) +
94 addTLString(TL("-Requires at least one Entry\n and one Exit"));
95 // E3 Entry
96 myHelpMap[SUMO_TAG_DET_ENTRY] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
97 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
98 // E3 Exit
99 myHelpMap[SUMO_TAG_DET_EXIT] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
100 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
101}
102
103
105
106
107void
109 if (myHelpMap.count(XMLTag) > 0) {
110 myHelpLabel->setText(myHelpMap.at(XMLTag).c_str());
111 show();
112 } else {
113 hide();
114 }
115}
116
117
118void
122
123
124std::string
126 return std::string(str.c_str());
127}
128
129// ---------------------------------------------------------------------------
130// GNEAdditionalFrame: - methods
131// ---------------------------------------------------------------------------
132
134 GNEFrame(viewParent, viewNet, TL("Additionals")) {
135
136 // create item Selector module for additionals
138
139 // Create additional parameters
141
142 // Create selector parent
144
145 // Create selector child edges
147
148 // Create list for E2Multilane lane selector
150
151 // create help creation module
153
154 // Create legend for E2 detector
156}
157
158
160 // check if we have to delete base additional object
161 if (myBaseAdditional) {
162 delete myBaseAdditional;
163 }
164}
165
166
167void
169 // refresh tag selector
171 // reset last position
173 // show frame
175}
176
177
178bool
180 // first check that current selected additional is valid
182 myViewNet->setStatusBarText(TL("Current selected additional isn't valid."));
183 return false;
184 }
185 // obtain tagproperty (only for improve code legibility)
186 const auto& tagProperties = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
187 // check if toogle selection
188 if ((viewObjects.getAttributeCarrierFront() == viewObjects.getLaneFront()) &&
190 return true;
191 }
193 return true;
194 }
195 // check if add a lane in consecutive lane selector
196 if (tagProperties->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
197 return myConsecutiveLaneSelector->addLane(viewObjects.getLaneFront());
198 }
199 // disable rerouter elements (temporal)
200 if ((tagProperties->getTag() == SUMO_TAG_INTERVAL) ||
201 (tagProperties->getTag() == SUMO_TAG_DEST_PROB_REROUTE) ||
202 (tagProperties->getTag() == SUMO_TAG_CLOSING_REROUTE) ||
203 (tagProperties->getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) ||
204 (tagProperties->getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) ||
205 (tagProperties->getTag() == SUMO_TAG_PARKING_AREA_REROUTE)) {
206 WRITE_WARNING(TL("Currently unsupported. Create rerouter elements using rerouter dialog"));
207 return false;
208 }
209 // disable steps (temporal)
210 if (tagProperties->getTag() == SUMO_TAG_STEP) {
211 WRITE_WARNING(TL("Currently unsupported. Create VSS steps using VSS dialog"));
212 return false;
213 }
214 // disable flows (temporal)
215 if (tagProperties->getTag() == GNE_TAG_CALIBRATOR_FLOW) {
216 WRITE_WARNING(TL("Currently unsupported. Create calibratorFlows using calibrator dialog"));
217 return false;
218 }
219 // check last position
221 WRITE_WARNING(TL("Shift + click to create two additionals in the same position"));
222 return false;
223 }
224 // check if additional attributes are valid
226 return false;
227 }
228 // reset base additional
230 // init base additional object
231 if (!initBaseAdditionalObject(tagProperties, viewObjects)) {
232 return false;
233 }
234 // parse common attributes
236 return false;
237 }
238 // add basic attributes and values
240 // declare additional handler
241 GNEAdditionalHandler additionalHandler(myViewNet->getNet(), myViewNet->getNet()->getACTemplates()->getTemplateAC(tagProperties->getTag())->getFileBucket(),
243 // build additional
244 additionalHandler.parseSumoBaseObject(myBaseAdditional);
245 // Refresh additional Parent Selector (For additionals that have a limited number of children)
247 // clear selected view objects
250 return true;
251}
252
253
258
259
264
265
270
271
276
277
278bool
279GNEAdditionalFrame::createPath(const bool /* useLastRoute */) {
280 // obtain tagproperty (only for improve code legibility)
281 const auto tagProperty = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
282 // first check that current tag is valid (currently only for E2 multilane detectors)
283 if (tagProperty->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
284 // now check number of lanes
285 if (myConsecutiveLaneSelector->getLanePath().size() < 2) {
286 WRITE_WARNING(TL("E2 multilane detectors need at least two consecutive lanes"));
287 } else {
288 // reset base object
290 // set tag
292 // get attributes and values
294 // add lane IDs
296 // set positions
299 // parse common attributes
301 // show warning dialogbox and stop check if input parameters are valid
303 // declare additional handler
306 // build additional
307 additionalHandler.parseSumoBaseObject(myBaseAdditional);
308 // Refresh additional Parent Selector (For additionals that have a limited number of children)
310 // abort E2 creation
312 return true;
313 }
314 }
315 }
316 }
317 return false;
318}
319
320
321void
323 // get template AC
324 const auto templateAC = myAdditionalTagSelector->getCurrentTemplateAC();
325 if (templateAC) {
326 // show parameters
328 // Show myAdditionalFrameParent if we're adding an slave element
329 if (templateAC->getTagProperty()->isChild()) {
330 mySelectorAdditionalParent->showSelectorParentModule(templateAC->getTagProperty()->getXMLParentTags());
331 } else {
333 }
334 // Show EdgesSelector if we're adding an additional that own the attribute SUMO_ATTR_EDGES
335 if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_EDGES)) {
337 } else {
339 }
340 // show help creation modul
341 myHelpCreationModule->showHelpCreationModule(templateAC->getTagProperty()->getTag());
342 // check if we must show consecutive lane selector
343 if (templateAC->getTagProperty()->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
347 // recompute network
349 } else if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_LANES)) {
353 } else {
356 }
357 // reset last position
359 } else {
360 // hide all modules if additional isn't valid
367 }
368}
369
370
371void
373 // check if baseAdditional exist, and if yes, delete it
374 if (myBaseAdditional) {
375 // go to base additional root
378 }
379 // delete baseAdditional (and all children)
380 delete myBaseAdditional;
381 // reset baseAdditional
382 myBaseAdditional = nullptr;
383 }
384 // create an new base additional
386}
387
388
389bool
391 // declare tag for base additional
392 auto baseAdditionalTag = tagProperty->getTag();
393 // check if tag has to be updated
394 if (baseAdditionalTag == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
395 baseAdditionalTag = SUMO_TAG_LANE_AREA_DETECTOR;
396 } else if (baseAdditionalTag == GNE_TAG_CALIBRATOR_FLOW) {
397 baseAdditionalTag = SUMO_TAG_FLOW;
398 }
399 // update view objects parents
401 // check if additional is child of other element
402 if (tagProperty->isChild()) {
403 // check if we clicked over a parent
404 SumoXMLTag parentTag = SUMO_TAG_NOTHING;
405 for (const auto& pTag : tagProperty->getXMLParentTags()) {
406 if (myBaseAdditional->hasParentID(pTag)) {
407 parentTag = pTag;
408 }
409 }
410 // update selector additional parent
411 if (parentTag != SUMO_TAG_NOTHING) {
412 // update parent additional selected
414 }
415 // continue depending of parents
417 std::string messageError = toString(tagProperty->getXMLParentTags().front());
418 if (tagProperty->getXMLParentTags().size() > 1) {
419 const int numParents = (int)tagProperty->getXMLParentTags().size();
420 messageError.clear();
421 for (int i = 0; i < numParents; i++) {
422 messageError.append(toString(tagProperty->getXMLParentTags().at(i)));
423 if (i == numParents - 2) {
424 messageError.append(" or ");
425 } else if (i < (numParents - 2)) {
426 messageError.append(", ");
427 }
428 }
429 }
430 WRITE_WARNING(TLF("A % must be selected before insertion of %.", messageError, tagProperty->getTagStr()));
431 return false;
432 } else {
433 // set parent tag // POSSIBLE ERROR WITH ACCESS AND BUSSTOPS!
434 myBaseAdditional->setTag(tagProperty->getXMLParentTags().front());
435 // add ID
437 // create base additional again as child of current base additional
439 }
440 }
441 // set baseAdditional tag
442 myBaseAdditional->setTag(baseAdditionalTag);
443 // Obtain position as the clicked position over view
445 // add position and X-Y-Z attributes
450 // check if add edge attributes
451 if (tagProperty->hasAttribute(SUMO_ATTR_EDGE)) {
452 if (viewObjects.getEdgeFront() == nullptr) {
453 return false;
454 } else {
456 // Obtain position of the mouse over lane (limited over grid)
457 const auto firstLane = viewObjects.getEdgeFront()->getChildLanes().front();
458 const double mousePositionOverLane = firstLane->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / firstLane->getLengthGeometryFactor();
460 }
461 } else if (tagProperty->getTag() == SUMO_TAG_VAPORIZER) {
462 // special case for vaporizers
463 if (viewObjects.getEdgeFront() == nullptr) {
464 return false;
465 } else {
467 }
468 }
469 // check if add lane attributes
470 if (tagProperty->hasAttribute(SUMO_ATTR_LANE)) {
471 if (viewObjects.getLaneFront() == nullptr) {
472 return false;
473 } else {
476 // Obtain position of the mouse over lane (limited over grid)
477 const double mousePositionOverLane = viewObjects.getLaneFront()->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / viewObjects.getLaneFront()->getLengthGeometryFactor();
478 // special case for access
479 if (tagProperty->getTag() == SUMO_TAG_ACCESS) {
481 } else {
483 }
484 }
485 }
486 // BaseAdditional created, then return true
487 return true;
488}
489
490/****************************************************************************/
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:245
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition GUIDesigns.h:281
#define WRITE_WARNING(msg)
Definition MsgHandler.h:286
#define TL(string)
Definition MsgHandler.h:304
#define TLF(string,...)
Definition MsgHandler.h:306
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_INTERVAL
an aggreagated-output interval
@ SUMO_TAG_CLOSING_REROUTE
reroute of type closing
@ GNE_TAG_MULTI_LANE_AREA_DETECTOR
an e2 detector over multiple lanes (placed here due create Additional Frame)
@ SUMO_TAG_ACCESS
An access point for a train stop.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
@ SUMO_TAG_PARKING_AREA_REROUTE
entry for an alternative parking zone
@ SUMO_TAG_BUS_STOP
A bus stop.
@ SUMO_TAG_STEP
trigger: a step description
@ SUMO_TAG_FLOW
a flow definition using from and to edges or a route
@ SUMO_TAG_ROUTE_PROB_REROUTE
probability of route of a reroute
@ SUMO_TAG_DET_ENTRY
an e3 entry point
@ SUMO_TAG_LANE
begin/end of the description of a single lane
@ SUMO_TAG_INSTANT_INDUCTION_LOOP
An instantenous induction loop.
@ GNE_TAG_CALIBRATOR_FLOW
a flow definition within in Calibrator
@ SUMO_TAG_DEST_PROB_REROUTE
probability of destination of a reroute
@ SUMO_TAG_DET_EXIT
an e3 exit point
@ SUMO_TAG_VAPORIZER
vaporizer of vehicles
@ SUMO_TAG_LANE_AREA_DETECTOR
alternative tag for e2 detector
@ SUMO_TAG_CLOSING_LANE_REROUTE
lane of a reroute of type closing
@ SUMO_TAG_INDUCTION_LOOP
alternative tag for e1 detector
@ SUMO_TAG_ENTRY_EXIT_DETECTOR
alternative tag for e3 detector
@ SUMO_TAG_EDGE
begin/end of the description of an edge
@ SUMO_ATTR_LANE
@ SUMO_ATTR_Y
@ SUMO_ATTR_Z
@ SUMO_ATTR_EDGE
@ SUMO_ATTR_ENDPOS
@ SUMO_ATTR_X
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_LANES
@ SUMO_ATTR_ID
@ GNE_ATTR_LANELENGTH
size (used in stopping places)
@ SUMO_ATTR_POSITION
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
void parseSumoBaseObject(CommonXMLStructure::SumoBaseObject *obj)
parse SumoBaseObject (it's called recursivelly)
bool hasParentID(const SumoXMLTag tag) const
check if current SumoBaseObject has the given parent ID
void setTag(const SumoXMLTag tag)
set SumoBaseObject tag
SumoBaseObject * getParentSumoBaseObject() const
get pointer to mySumoBaseObjectParent SumoBaseObject (if is null, then is the root)
const std::string & getParentID(const SumoXMLTag tag) const
get parent ID
void addStringListAttribute(const SumoXMLAttr attr, const std::vector< std::string > &value)
add string list attribute into current SumoBaseObject node
void addDoubleAttribute(const SumoXMLAttr attr, const double value)
add double attribute into current SumoBaseObject node
void addPositionAttribute(const SumoXMLAttr attr, const Position &value)
add Position attribute into current SumoBaseObject node
void addStringAttribute(const SumoXMLAttr attr, const std::string &value)
add string attribute into current SumoBaseObject node
E2MultilaneLegendModule(GNEFrame *frameParent)
constructor
std::map< SumoXMLTag, std::string > myHelpMap
map with tags and their associated help
std::string addTLString(const std::string &str)
add translated string
void showHelpCreationModule(SumoXMLTag XMLTag)
show Legend modul
HelpCreationModule(GNEFrame *frameParent)
constructor
GNESelectorParent * mySelectorAdditionalParent
Module for select a single parent additional.
GNETagSelector * getAdditionalTagSelector() const
get additional tag selector
bool initBaseAdditionalObject(const GNETagProperties *tagProperty, const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
GNEConsecutiveSelector * getConsecutiveLaneSelector() const
get consecutive lane selector
GNEAttributesEditor * getAttributesEditor() const
get attribtues editor
GNETagSelector * myAdditionalTagSelector
item selector
GNEAttributesEditor * myAdditionalAttributesEditor
additional attributes editor
bool createPath(const bool useLastRoute)
create path
GNEAdditionalFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
bool addAdditional(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add additional element
E2MultilaneLegendModule * myE2MultilaneLegendModule
Module for show E2 Detector legend.
void tagSelected()
Tag selected in GNETagSelector.
GNEViewObjectSelector * getViewObjetsSelector() const
get module for select view objects
HelpCreationModule * myHelpCreationModule
Module for show additional help legend.
GNEViewObjectSelector * myViewObjetsSelector
Module for select view objects.
Position myLastClickedPosition
last clicked position
CommonXMLStructure::SumoBaseObject * myBaseAdditional
SumoBaseObject used for create additional.
GNEConsecutiveSelector * myConsecutiveLaneSelector
Module for select consecutive lanes.
virtual FileBucket * getFileBucket() const =0
get reference to fileBucket in which save this AC
const std::string getID() const override
get ID (all Attribute Carriers have one)
const GNETagProperties * getTagProperty() const
get tagProperty associated with this Attribute Carrier
SumoXMLAttr fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
fill sumo Base object
void showAttributesEditor(GNEAttributeCarrier *AC, const bool primaryAttributeEditor)
edit attributes of the given AC (usually the edited template AC)
void refreshAttributesEditor()
refresh attribute editor
bool checkAttributes(const bool showWarning)
check if current edited attributes are valid
void hideAttributesEditor()
hide attribute editor
bool addLane(GNELane *lane)
add lane
void abortPathCreation()
abort path creation
void showConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::pair< GNELane *, double > > & getLanePath() const
get vector with lanes and clicked positions
void hideConsecutiveLaneSelectorModule()
show GNEConsecutiveSelector
const std::vector< std::string > getLaneIDPath() const
get lane IDs
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:145
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:122
virtual void show()
show Frame
Definition GNEFrame.cpp:110
virtual void hide()
hide Frame
Definition GNEFrame.cpp:119
GNEGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:232
double getLengthGeometryFactor() const
get length geometry factor
Definition GNELane.cpp:1965
double getLaneShapeLength() const
returns the length of the lane's shape
Definition GNELane.cpp:654
GNEAttributeCarrier * getTemplateAC(const SumoXMLTag tag) const
get template AC by tag
GNENetHelper::ACTemplate * getACTemplates() const
get all attribute carriers templates used in this net
Definition GNENet.cpp:180
void computeNetwork(GNEApplicationWindow *window, bool force=false, bool volatileOptions=false)
trigger full netbuild computation param[in] window The window to inform about delay param[in] force W...
Definition GNENet.cpp:1464
void setIDSelected(const std::string &id)
select manually a element of the list
void showSelectorParentModule(const std::vector< SumoXMLTag > &parentTags)
Show list of GNESelectorParent Module.
void refreshSelectorParentModule()
Refresh list of Additional Parents Module.
std::string getIdSelected() const
get currently parent additional selected
void hideSelectorParentModule()
hide GNESelectorParent Module
const std::string & getTagStr() const
get Tag vinculated with this attribute Property in String Format (used to avoid multiple calls to toS...
bool isChild() const
properties
SumoXMLTag getTag() const
get Tag vinculated with this attribute Property
bool hasAttribute(SumoXMLAttr attr) const
check if current TagProperties owns the attribute "attr"
const std::vector< SumoXMLTag > & getXMLParentTags() const
get XML parent tags
void refreshTagSelector()
refresh tagSelector (used when frameParent is show)
GNEAttributeCarrier * getCurrentTemplateAC() const
get current templateAC
class used to group all variables related with objects under cursor after a click over view
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEAttributeCarrier * getAttributeCarrierFront() const
get front attribute carrier or a pointer to nullptr
GNELane * getLaneFront() const
get front lane or a pointer to nullptr
void fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObjet) const
fill the given SUMO base object with the current single objects
GNENet * getNet() const
get the net object
const GNEViewNetHelper::MouseButtonKeyPressed & getMouseButtonKeyPressed() const
get Key Pressed module
GNEViewParent * getViewParent() const
get the net object
void setStatusBarText(const std::string &text)
set statusBar text
bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
@brie fill SUMO base object
void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute)
show GNEViewObjectSelector Module
void clearSelection()
clear selection
bool toggleSelectedLane(const GNELane *lane)
toggle selected lane
void hideNetworkElementsSelector()
hide GNEViewObjectSelector Module
bool toggleSelectedElement(const GNEAttributeCarrier *AC)
toggle selected element
A single child window which contains a view of the simulation area.
GNEApplicationWindow * getGNEAppWindows() const
get GNE Application Windows
Position snapToActiveGrid(const Position &pos, bool snapXY=true) const
Returns a position that is mapped to the closest grid point if the grid is active.
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
virtual Position getPositionInformation() const
Returns the cursor's x/y position within the network.
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:145
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
static const Position INVALID
used to indicate that a position is valid
Definition Position.h:323
double x() const
Returns the x-position.
Definition Position.h:52
double z() const
Returns the z-position.
Definition Position.h:62
double y() const
Returns the y-position.
Definition Position.h:57
double nearest_offset_to_point2D(const Position &p, bool perpendicular=true) const
return the nearest offest to point 2D
static const RGBColor WHITE
Definition RGBColor.h:195
bool shiftKeyPressed() const
check if SHIFT is pressed during current event
static const RGBColor conflict
color for selected conflict candidate element (Usually selected using ctrl+click)
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element
static const RGBColor source
color for selected candidate source