Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
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 MFXGroupBoxModule(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
80#define TLSX(string) std::string(gettext((string)))
81
82
83
85 MFXGroupBoxModule(frameParent, TL("Help")) {
86 // edge candidate
88 // fill map
89 //addTLString(TL("-Requires EntryExitDetector\n")) +
90 // E1
91 myHelpMap[SUMO_TAG_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
92 // E1 Instant
93 myHelpMap[SUMO_TAG_INSTANT_INDUCTION_LOOP] = addTLString(TL("-Click over lane to create it"));
94 // E2
95 myHelpMap[SUMO_TAG_LANE_AREA_DETECTOR] = addTLString(TL("-Click over lane to create it"));
96 // E3
97 myHelpMap[SUMO_TAG_ENTRY_EXIT_DETECTOR] = addTLString(TL("-Click over view to create it")) +
98 addTLString(TL("-Requires at least one Entry\n and one Exit"));
99 // E3 Entry
100 myHelpMap[SUMO_TAG_DET_ENTRY] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
101 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
102 // E3 Exit
103 myHelpMap[SUMO_TAG_DET_EXIT] = addTLString(TL("-Requires EntryExitDetector\n parent\n")) +
104 addTLString(TL("-Select EntryExitDetector\n before creating either\n clicking over one in view\n or by selecting from list"));
105}
106
107
109
110
111void
113 if (myHelpMap.count(XMLTag) > 0) {
114 myHelpLabel->setText(myHelpMap.at(XMLTag).c_str());
115 show();
116 } else {
117 hide();
118 }
119}
120
121
122void
126
127
128std::string
130 return std::string(str.c_str());
131}
132
133// ---------------------------------------------------------------------------
134// GNEAdditionalFrame: - methods
135// ---------------------------------------------------------------------------
136
138 GNEFrame(viewParent, viewNet, TL("Additionals")) {
139
140 // create item Selector module for additionals
142
143 // Create additional parameters
145
146 // Create selector parent
148
149 // Create selector child edges
151
152 // Create list for E2Multilane lane selector
154
155 // create help creation module
157
158 // Create legend for E2 detector
160}
161
162
164 // check if we have to delete base additional object
165 if (myBaseAdditional) {
166 delete myBaseAdditional;
167 }
168}
169
170
171void
173 // refresh tag selector
175 // reset last position
177 // show frame
179}
180
181
182bool
184 // first check that current selected additional is valid
186 myViewNet->setStatusBarText(TL("Current selected additional isn't valid."));
187 return false;
188 }
189 // obtain tagproperty (only for improve code legibility)
190 const auto& tagProperties = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
191 // check if toogle selection
192 if ((viewObjects.getAttributeCarrierFront() == viewObjects.getLaneFront()) &&
194 return true;
195 }
197 return true;
198 }
199 // check if add a lane in consecutive lane selector
200 if (tagProperties->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
201 return myConsecutiveLaneSelector->addLane(viewObjects.getLaneFront());
202 }
203 // disable rerouter elements (temporal)
204 if ((tagProperties->getTag() == SUMO_TAG_INTERVAL) ||
205 (tagProperties->getTag() == SUMO_TAG_DEST_PROB_REROUTE) ||
206 (tagProperties->getTag() == SUMO_TAG_CLOSING_REROUTE) ||
207 (tagProperties->getTag() == SUMO_TAG_CLOSING_LANE_REROUTE) ||
208 (tagProperties->getTag() == SUMO_TAG_ROUTE_PROB_REROUTE) ||
209 (tagProperties->getTag() == SUMO_TAG_PARKING_AREA_REROUTE)) {
210 WRITE_WARNING(TL("Currently unsupported. Create rerouter elements using rerouter dialog"));
211 return false;
212 }
213 // disable steps (temporal)
214 if (tagProperties->getTag() == SUMO_TAG_STEP) {
215 WRITE_WARNING(TL("Currently unsupported. Create VSS steps using VSS dialog"));
216 return false;
217 }
218 // disable flows (temporal)
219 if (tagProperties->getTag() == GNE_TAG_CALIBRATOR_FLOW) {
220 WRITE_WARNING(TL("Currently unsupported. Create calibratorFlows using calibrator dialog"));
221 return false;
222 }
223 // check last position
225 WRITE_WARNING(TL("Shift + click to create two additionals in the same position"));
226 return false;
227 }
228 // check if additional attributes are valid
230 return false;
231 }
232 // reset base additional
234 // init base additional object
235 if (!initBaseAdditionalObject(tagProperties, viewObjects)) {
236 return false;
237 }
238 // parse common attributes
240 return false;
241 }
242 // add basic attributes and values
244 // declare additional handler
248 // build additional
249 additionalHandler.parseSumoBaseObject(myBaseAdditional);
250 // Refresh additional Parent Selector (For additionals that have a limited number of children)
252 // clear selected view objects
255 return true;
256}
257
258
263
264
269
270
275
276
281
282
283bool
284GNEAdditionalFrame::createPath(const bool /* useLastRoute */) {
285 // obtain tagproperty (only for improve code legibility)
286 const auto tagProperty = myAdditionalTagSelector->getCurrentTemplateAC()->getTagProperty();
287 // first check that current tag is valid (currently only for E2 multilane detectors)
288 if (tagProperty->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
289 // now check number of lanes
290 if (myConsecutiveLaneSelector->getLanePath().size() < 2) {
291 WRITE_WARNING(TL("E2 multilane detectors need at least two consecutive lanes"));
292 } else {
293 // reset base object
295 // set tag
297 // get attributes and values
299 // add lane IDs
301 // set positions
304 // parse common attributes
306 // show warning dialogbox and stop check if input parameters are valid
308 // declare additional handler
312 // build additional
313 additionalHandler.parseSumoBaseObject(myBaseAdditional);
314 // Refresh additional Parent Selector (For additionals that have a limited number of children)
316 // abort E2 creation
318 return true;
319 }
320 }
321 }
322 }
323 return false;
324}
325
326
327void
329 // get template AC
330 const auto templateAC = myAdditionalTagSelector->getCurrentTemplateAC();
331 if (templateAC) {
332 // show parameters
334 // Show myAdditionalFrameParent if we're adding an slave element
335 if (templateAC->getTagProperty()->isChild()) {
336 mySelectorAdditionalParent->showSelectorParentModule(templateAC->getTagProperty()->getXMLParentTags());
337 } else {
339 }
340 // Show EdgesSelector if we're adding an additional that own the attribute SUMO_ATTR_EDGES
341 if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_EDGES)) {
343 } else {
345 }
346 // show help creation modul
347 myHelpCreationModule->showHelpCreationModule(templateAC->getTagProperty()->getTag());
348 // check if we must show consecutive lane selector
349 if (templateAC->getTagProperty()->getTag() == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
353 // recompute network
355 } else if (templateAC->getTagProperty()->hasAttribute(SUMO_ATTR_LANES)) {
359 } else {
362 }
363 // reset last position
365 } else {
366 // hide all modules if additional isn't valid
373 }
374}
375
376
377void
379 // check if baseAdditional exist, and if yes, delete it
380 if (myBaseAdditional) {
381 // go to base additional root
384 }
385 // delete baseAdditional (and all children)
386 delete myBaseAdditional;
387 // reset baseAdditional
388 myBaseAdditional = nullptr;
389 }
390 // create an new base additional
392}
393
394
395bool
397 // declare tag for base additional
398 auto baseAdditionalTag = tagProperty->getTag();
399 // check if tag has to be updated
400 if (baseAdditionalTag == GNE_TAG_MULTI_LANE_AREA_DETECTOR) {
401 baseAdditionalTag = SUMO_TAG_LANE_AREA_DETECTOR;
402 } else if (baseAdditionalTag == GNE_TAG_CALIBRATOR_FLOW) {
403 baseAdditionalTag = SUMO_TAG_FLOW;
404 }
405 // update view objects parents
407 // check if additional is child of other element
408 if (tagProperty->isChild()) {
409 // check if we clicked over a parent
410 SumoXMLTag parentTag = SUMO_TAG_NOTHING;
411 for (const auto& pTag : tagProperty->getXMLParentTags()) {
412 if (myBaseAdditional->hasParentID(pTag)) {
413 parentTag = pTag;
414 }
415 }
416 // update selector additional parent
417 if (parentTag != SUMO_TAG_NOTHING) {
418 // update parent additional selected
420 }
421 // continue depending of parents
423 WRITE_WARNING(TLF("A % must be selected before insertion of %.", toString(tagProperty->getXMLParentTags().front()), tagProperty->getTagStr()));
424 return false;
425 } else {
426 // set parent tag // POSSIBLE ERROR WITH ACCESS AND BUSSTOPS!
427 myBaseAdditional->setTag(tagProperty->getXMLParentTags().front());
428 // add ID
430 // create base additional again as child of current base additional
432 }
433 }
434 // set baseAdditional tag
435 myBaseAdditional->setTag(baseAdditionalTag);
436 // Obtain position as the clicked position over view
438 // add position and X-Y-Z attributes
443 // check if add edge attributes
444 if (tagProperty->hasAttribute(SUMO_ATTR_EDGE)) {
445 if (viewObjects.getEdgeFront() == nullptr) {
446 return false;
447 } else {
449 // Obtain position of the mouse over lane (limited over grid)
450 const auto firstLane = viewObjects.getEdgeFront()->getChildLanes().front();
451 const double mousePositionOverLane = firstLane->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / firstLane->getLengthGeometryFactor();
453 }
454 } else if (tagProperty->getTag() == SUMO_TAG_VAPORIZER) {
455 // special case for vaporizers
456 if (viewObjects.getEdgeFront() == nullptr) {
457 return false;
458 } else {
460 }
461 }
462 // check if add lane attributes
463 if (tagProperty->hasAttribute(SUMO_ATTR_LANE)) {
464 if (viewObjects.getLaneFront() == nullptr) {
465 return false;
466 } else {
469 // Obtain position of the mouse over lane (limited over grid)
470 const double mousePositionOverLane = viewObjects.getLaneFront()->getLaneShape().nearest_offset_to_point2D(viewPosSnapped) / viewObjects.getLaneFront()->getLengthGeometryFactor();
471 // special case for access
472 if (tagProperty->getTag() == SUMO_TAG_ACCESS) {
474 } else {
476 }
477 }
478 }
479 // BaseAdditional created, then return true
480 return true;
481}
482
483/****************************************************************************/
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:243
#define GUIDesignLabelFrameInformation
label extended over frame without thick and with text justify to left, used to show information in fr...
Definition GUIDesigns.h:279
#define WRITE_WARNING(msg)
Definition MsgHandler.h:287
#define TL(string)
Definition MsgHandler.h:305
#define TLF(string,...)
Definition MsgHandler.h:307
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
@ GNE_ATTR_ADDITIONAL_FILE
additional save file
@ 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
bool hasStringAttribute(const SumoXMLAttr attr) const
has function
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
const std::string & getStringAttribute(const SumoXMLAttr attr) const
get string attribute
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.
const std::string getID() const
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:154
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:121
virtual void show()
show Frame
Definition GNEFrame.cpp:119
virtual void hide()
hide Frame
Definition GNEFrame.cpp:128
const GNEHierarchicalContainerChildren< GNELane * > & getChildLanes() const
get child lanes
const PositionVector & getLaneShape() const
get elements shape
Definition GNELane.cpp:220
double getLengthGeometryFactor() const
get length geometry factor
Definition GNELane.cpp:1995
double getLaneShapeLength() const
returns the length of the lane's shape
Definition GNELane.cpp:680
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:1462
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
return true if tag correspond to an element child of another element (Example: E3->Entry/Exit)
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
MFXGroupBoxModule (based on FXGroupBox)
FXVerticalFrame * getCollapsableFrame()
get collapsable frame (used by all elements that will be collapsed if button is toggled)
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:319
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