Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNECrossingFrame.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 Crossing elements
19/****************************************************************************/
20
21#include <netedit/GNENet.h>
23#include <netedit/GNEUndoList.h>
31
32#include "GNECrossingFrame.h"
33
34// ===========================================================================
35// FOX callback mapping
36// ===========================================================================
37
42
47
51
52// Object implementation
53FXIMPLEMENT(GNECrossingFrame::EdgesSelector, MFXGroupBoxModule, EdgesSelectorMap, ARRAYNUMBER(EdgesSelectorMap))
54FXIMPLEMENT(GNECrossingFrame::CrossingParameters, MFXGroupBoxModule, CrossingParametersMap, ARRAYNUMBER(CrossingParametersMap))
55FXIMPLEMENT(GNECrossingFrame::CreateCrossing, MFXGroupBoxModule, CreateCrossingMap, ARRAYNUMBER(CreateCrossingMap))
56
57
58// ===========================================================================
59// method definitions
60// ===========================================================================
61
62// ---------------------------------------------------------------------------
63// GNECrossingFrame::CurrentJunction - methods
64// ---------------------------------------------------------------------------
65
67 MFXGroupBoxModule(crossingFrameParent, TL("Junction")) {
68 // Create frame for junction ID
69 FXHorizontalFrame* junctionIDFrame = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
70 // create label
71 new FXLabel(junctionIDFrame, "Edited", nullptr, GUIDesignLabelThickedFixed(100));
72 // create text field and disable it
73 myTextFieldJunctionID = new FXTextField(junctionIDFrame, GUIDesignTextFieldNCol, this, MID_GNE_SELECT, GUIDesignTextField);
74 myTextFieldJunctionID->disable();
75}
76
77
79
80
81void
83 if (junctionID.empty()) {
84 myTextFieldJunctionID->setText("");
85 } else {
86 myTextFieldJunctionID->setText(junctionID.c_str());
87 }
88}
89
90// ---------------------------------------------------------------------------
91// GNECrossingFrame::EdgesSelector - methods
92// ---------------------------------------------------------------------------
93
95 MFXGroupBoxModule(crossingFrameParent, TL("selection of edges")),
96 myCrossingFrameParent(crossingFrameParent),
97 myCurrentJunction(nullptr) {
98
99 // Create button for selected edges
101
102 // Create button for clear selection
104}
105
106
108
109
112 return myCurrentJunction;
113}
114
115
116void
118 // restore color of all lanes of edge candidates
119 restoreEdgeColors();
120 // Set current junction
121 myCurrentJunction = currentJunction;
122 // Update view net to show the new colors
123 myCrossingFrameParent->getViewNet()->updateViewNet();
124 // check if use selected eges must be enabled
125 myUseSelectedEdges->disable();
126 for (const auto& edge : myCurrentJunction->getChildEdges()) {
127 if (edge->isAttributeCarrierSelected()) {
128 myUseSelectedEdges->enable();
129 }
130 }
131 // Enable rest of elements
132 myClearEdgesSelection->enable();
133}
134
135
136void
138 // disable current junction
139 myCurrentJunction = nullptr;
140 // disable all elements of the EdgesSelector
141 myUseSelectedEdges->disable();
142 myClearEdgesSelection->disable();
143 // Disable crossing parameters
144 myCrossingFrameParent->myCrossingParameters->disableCrossingParameters();
145 // Update view net to show the new colors
146 myCrossingFrameParent->getViewNet()->updateViewNet();
147}
148
149
150void
152 if (myCurrentJunction != nullptr) {
153 // restore color of all lanes of edge candidates
154 for (const auto& edge : myCurrentJunction->getChildEdges()) {
155 edge->resetCandidateFlags();
156 }
157 // Update view net to show the new colors
158 myCrossingFrameParent->getViewNet()->updateViewNet();
159 myCurrentJunction = nullptr;
160 }
161}
162
163
164long
166 myCrossingFrameParent->myCrossingParameters->useSelectedEdges(myCurrentJunction);
167 return 1;
168}
169
170
171long
173 myCrossingFrameParent->myCrossingParameters->clearEdges();
174 return 1;
175}
176
177// ---------------------------------------------------------------------------
178// GNECrossingFrame::GNENeteditAttributes- methods
179// ---------------------------------------------------------------------------
180
182 MFXGroupBoxModule(crossingFrameParent, TL("Crossing parameters")),
183 myCrossingFrameParent(crossingFrameParent),
184 myCurrentParametersValid(true) {
185 FXHorizontalFrame* crossingParameter = nullptr;
186 // create label and string textField for edges
187 crossingParameter = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
188 myCrossingEdgesLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_EDGES).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
189 myCrossingEdges = new FXTextField(crossingParameter, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
190 myCrossingEdgesLabel->disable();
191 myCrossingEdges->disable();
192 // create label and checkbox for Priority
193 crossingParameter = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
194 myCrossingPriorityLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_PRIORITY).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
195 myCrossingPriorityCheckButton = new FXCheckButton(crossingParameter, "", this, MID_GNE_SET_ATTRIBUTE, GUIDesignCheckButton);
196 myCrossingPriorityLabel->disable();
198 // create label and textfield for width
199 crossingParameter = new FXHorizontalFrame(getCollapsableFrame(), GUIDesignAuxiliarHorizontalFrame);
200 myCrossingWidthLabel = new FXLabel(crossingParameter, toString(SUMO_ATTR_WIDTH).c_str(), nullptr, GUIDesignLabelThickedFixed(100));
201 myCrossingWidth = new FXTextField(crossingParameter, GUIDesignTextFieldNCol, this, MID_GNE_SET_ATTRIBUTE, GUIDesignTextField);
202 myCrossingWidthLabel->disable();
203 myCrossingWidth->disable();
204 // Create help button
206 myHelpCrossingAttribute->disable();
207}
208
209
212
213
214void
216 // obtain Tag Values
217 const auto crossingTagProperties = myCrossingFrameParent->getViewNet()->getNet()->getACTemplates()->getTemplateAC(SUMO_TAG_CROSSING)->getTagProperty();
218 // Enable all elements of the crossing frames
219 myCrossingEdgesLabel->enable();
220 myCrossingEdges->enable();
221 myCrossingPriorityLabel->enable();
222 // only enable priority check button if junction's crossing doesn't have TLS
223 if (hasTLS) {
224 myCrossingPriorityCheckButton->disable();
225 } else {
226 myCrossingPriorityCheckButton->enable();
227 }
228 myCrossingWidthLabel->enable();
229 myCrossingWidth->enable();
230 myHelpCrossingAttribute->enable();
231 // set values of parameters
232 onCmdSetAttribute(nullptr, 0, nullptr);
233 // Crossings placed in junctinos with TLS always has priority
234 if (hasTLS) {
235 myCrossingPriorityCheckButton->setCheck(TRUE);
236 } else {
237 myCrossingPriorityCheckButton->setCheck(crossingTagProperties->getDefaultBoolValue(SUMO_ATTR_PRIORITY));
238 }
239 myCrossingWidth->setText(crossingTagProperties->getDefaultStringValue(SUMO_ATTR_WIDTH).c_str());
240 myCrossingWidth->setTextColor(FXRGB(0, 0, 0));
241}
242
243
244void
246 // clear all values of parameters
247 myCrossingEdges->setText("");
248 myCrossingPriorityCheckButton->setCheck(false);
249 myCrossingPriorityCheckButton->setText("false");
250 myCrossingWidth->setText("");
251 // Disable all elements of the crossing frames
252 myCrossingEdgesLabel->disable();
253 myCrossingEdges->disable();
254 myCrossingPriorityLabel->disable();
255 myCrossingPriorityCheckButton->disable();
256 myCrossingWidthLabel->disable();
257 myCrossingWidth->disable();
258 myHelpCrossingAttribute->disable();
259 myCrossingFrameParent->myCreateCrossing->setCreateCrossingButton(false);
260}
261
262
263bool
265 return myCrossingEdgesLabel->isEnabled();
266}
267
268
269void
271 GNEJunction* currentJunction = myCrossingFrameParent->myEdgeSelector->getCurrentJunction();
272 if (currentJunction != nullptr) {
273 // Check if edge belongs to junction's edge
274 if (std::find(currentJunction->getChildEdges().begin(), currentJunction->getChildEdges().end(), edge) != currentJunction->getChildEdges().end()) {
275 // Update text field with the new edge
276 std::vector<std::string> crossingEdges = GNEAttributeCarrier::parse<std::vector<std::string> > (myCrossingEdges->getText().text());
277 // Check if new edge must be added or removed
278 std::vector<std::string>::iterator itFinder = std::find(crossingEdges.begin(), crossingEdges.end(), edge->getID());
279 if (itFinder == crossingEdges.end()) {
280 crossingEdges.push_back(edge->getID());
281 } else {
282 crossingEdges.erase(itFinder);
283 }
284 myCrossingEdges->setText(joinToString(crossingEdges, " ").c_str());
285 }
286 // Update colors and attributes
287 onCmdSetAttribute(nullptr, 0, nullptr);
288 }
289}
290
291
292void
294 myCrossingEdges->setText("");
295 // Update colors and attributes
296 onCmdSetAttribute(nullptr, 0, nullptr);
297}
298
299
300void
302 std::vector<std::string> crossingEdges;
303 for (const auto& edge : parentJunction->getChildEdges()) {
304 if (edge->isAttributeCarrierSelected()) {
305 crossingEdges.push_back(edge->getID());
306 }
307 }
308 myCrossingEdges->setText(joinToString(crossingEdges, " ").c_str());
309 // Update colors and attributes
310 onCmdSetAttribute(nullptr, 0, nullptr);
311}
312
313
314std::vector<NBEdge*>
316 std::vector<NBEdge*> NBEdgeVector;
317 // Iterate over myCurrentSelectedEdges
318 for (const auto& edge : myCurrentSelectedEdges) {
319 NBEdgeVector.push_back(edge->getNBEdge());
320 }
321 return NBEdgeVector;
322}
323
324
325bool
327 if (myCrossingPriorityCheckButton->getCheck()) {
328 return true;
329 } else {
330 return false;
331 }
332}
333
334
335bool
337 return myCurrentParametersValid;
338}
339
340
341double
343 return GNEAttributeCarrier::parse<double>(myCrossingWidth->getText().text());
344}
345
346
347long
349 myCurrentParametersValid = true;
350 // get string vector with the edges
351 const auto& crossingEdgeIDs = GNEAttributeCarrier::parse<std::vector<std::string> > (myCrossingEdges->getText().text());
352 GNEJunction* currentJunction = myCrossingFrameParent->myEdgeSelector->getCurrentJunction();
353 // Clear selected edges
354 myCurrentSelectedEdges.clear();
355 // iterate over vector of edge IDs
356 for (const auto& crossingEdgeID : crossingEdgeIDs) {
357 GNEEdge* edge = myCrossingFrameParent->getViewNet()->getNet()->getAttributeCarriers()->retrieveEdge(crossingEdgeID, false);
358 // Check that edge exists and belongs to Junction
359 if (edge == nullptr) {
360 myCurrentParametersValid = false;
361 } else if (currentJunction && (std::find(currentJunction->getChildEdges().begin(), currentJunction->getChildEdges().end(), edge) == currentJunction->getChildEdges().end())) {
362 myCurrentParametersValid = false;
363 } else {
364 // select or unselected edge
365 auto itFinder = std::find(myCurrentSelectedEdges.begin(), myCurrentSelectedEdges.end(), edge);
366 if (itFinder == myCurrentSelectedEdges.end()) {
367 myCurrentSelectedEdges.push_back(edge);
368 } else {
369 myCurrentSelectedEdges.erase(itFinder);
370 }
371 }
372 }
373 // change color of textfield dependig of myCurrentParametersValid
374 if (myCurrentParametersValid) {
375 myCrossingEdges->setTextColor(FXRGB(0, 0, 0));
376 myCrossingEdges->killFocus();
377 } else {
378 myCrossingEdges->setTextColor(FXRGB(255, 0, 0));
379 myCurrentParametersValid = false;
380 }
381 // Update edge colors
382 if (currentJunction) {
383 if (myCurrentSelectedEdges.empty()) {
384 for (const auto& edge : myCrossingFrameParent->myEdgeSelector->getCurrentJunction()->getChildEdges()) {
385 // restore colors
386 edge->resetCandidateFlags();
387 // mark all edges as possible candidate
388 edge->setPossibleCandidate(true);
389 }
390 } else {
391 EdgeVector selected;
392 for (GNEEdge* e : myCurrentSelectedEdges) {
393 selected.push_back(e->getNBEdge());
394 }
395 for (const auto& edge : myCrossingFrameParent->myEdgeSelector->getCurrentJunction()->getChildEdges()) {
396 // restore colors
397 edge->resetCandidateFlags();
398 // set selected or candidate color
399 if (std::find(myCurrentSelectedEdges.begin(), myCurrentSelectedEdges.end(), edge) != myCurrentSelectedEdges.end()) {
400 edge->setTargetCandidate(true);
401 } else {
402 EdgeVector newCandidates = selected;;
403 newCandidates.push_back(edge->getNBEdge());
404 if (currentJunction->getNBNode()->checkCrossing(newCandidates, true) == 0) {
405 edge->setInvalidCandidate(true);
406 } else {
407 edge->setPossibleCandidate(true);
408 }
409 }
410 }
411 }
412 }
413 // Update view net
414 myCrossingFrameParent->getViewNet()->updateViewNet();
415 // Check that at least there are one selected edge
416 if (crossingEdgeIDs.empty()) {
417 myCurrentParametersValid = false;
418 }
419 // change label of crossing priority
420 if (myCrossingPriorityCheckButton->getCheck()) {
421 myCrossingPriorityCheckButton->setText("true");
422 } else {
423 myCrossingPriorityCheckButton->setText("false");
424 }
425
426 // Check width
427 if (GNEAttributeCarrier::canParse<double>(myCrossingWidth->getText().text()) &&
428 GNEAttributeCarrier::parse<double>(myCrossingWidth->getText().text()) > 0) {
429 myCrossingWidth->setTextColor(FXRGB(0, 0, 0));
430 myCrossingWidth->killFocus();
431 } else {
432 myCrossingWidth->setTextColor(FXRGB(255, 0, 0));
433 myCurrentParametersValid = false;
434 }
435
436 // Enable or disable create crossing button depending of the current parameters
437 myCrossingFrameParent->myCreateCrossing->setCreateCrossingButton(myCurrentParametersValid);
438 return 0;
439}
440
441
442long
444 return 1;
445}
446
447// ---------------------------------------------------------------------------
448// GNECrossingFrame::CreateCrossing - methods
449// ---------------------------------------------------------------------------
450
452 MFXGroupBoxModule(crossingFrameParent, TL("Create")),
453 myCrossingFrameParent(crossingFrameParent) {
454 // Create groupbox for create crossings
456 myCreateCrossingButton->disable();
457}
458
459
461
462
463long
465 // First check that current parameters are valid
466 if (myCrossingFrameParent->myCrossingParameters->isCurrentParametersValid()) {
467 // iterate over junction's crossing to find duplicated crossings
468 if (myCrossingFrameParent->myEdgeSelector->getCurrentJunction()->getNBNode()->checkCrossingDuplicated(myCrossingFrameParent->myCrossingParameters->getCrossingEdges()) == false) {
469 // create new crossing
470 myCrossingFrameParent->myViewNet->getUndoList()->add(new GNEChange_Crossing(myCrossingFrameParent->myEdgeSelector->getCurrentJunction(),
471 myCrossingFrameParent->myCrossingParameters->getCrossingEdges(),
472 myCrossingFrameParent->myCrossingParameters->getCrossingWidth(),
473 myCrossingFrameParent->myCrossingParameters->getCrossingPriority(),
474 -1, -1,
476 false, true), true);
477 // clear selected edges
478 myCrossingFrameParent->myEdgeSelector->onCmdClearSelection(0, 0, 0);
479 // update default create edge option
480 myCrossingFrameParent->getViewNet()->getViewParent()->getCreateEdgeFrame()->getEdgeTypeSelector()->enableCheckBoxDisablePedestrians();
481 } else {
482 WRITE_WARNING(TL("There is already another crossing with the same edges in the junction; Duplicated crossing aren't allowed."));
483 }
484 }
485 return 1;
486}
487
488
489void
491 if (value) {
492 myCreateCrossingButton->enable();
493 } else {
494 myCreateCrossingButton->disable();
495 }
496}
497
498// ---------------------------------------------------------------------------
499// GNECrossingFrame::Legend - methods
500// ---------------------------------------------------------------------------
501
503 MFXGroupBoxModule(crossingFrameParent, TL("Information")) {
504
505 // create label
506 new MFXDynamicLabel(getCollapsableFrame(), (std::string("- ") + TL("Click over junction to mark candidate edges.") + std::string("\n- ") + TL("Click over candidate edges for selecting.")).c_str(), 0, GUIDesignLabelFrameInformation);
507 // candidate
508 FXLabel* colorCandidateLabel = new FXLabel(getCollapsableFrame(), TL(" Candidate"), 0, GUIDesignLabel(JUSTIFY_LEFT));
509 colorCandidateLabel->setBackColor(MFXUtils::getFXColor(crossingFrameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.possible));
510 colorCandidateLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
511 // selected
512 FXLabel* colorSelectedLabel = new FXLabel(getCollapsableFrame(), TL(" Selected"), 0, GUIDesignLabel(JUSTIFY_LEFT));
513 colorSelectedLabel->setBackColor(MFXUtils::getFXColor(crossingFrameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.target));
514 // invalid
515 FXLabel* colorInvalidLabel = new FXLabel(getCollapsableFrame(), TL(" Invalid"), 0, GUIDesignLabel(JUSTIFY_LEFT));
516 colorInvalidLabel->setBackColor(MFXUtils::getFXColor(crossingFrameParent->getViewNet()->getVisualisationSettings().candidateColorSettings.invalid));
517 colorInvalidLabel->setTextColor(MFXUtils::getFXColor(RGBColor::WHITE));
518}
519
520
522
523// ---------------------------------------------------------------------------
524// GNECrossingFrame - methods
525// ---------------------------------------------------------------------------
526
528 GNEFrame(viewParent, viewNet, TL("Crossings")) {
529 // create JunctionInformation module
531
532 // Create edge Selector module
533 myEdgeSelector = new EdgesSelector(this);
534
535 // Create CrossingParameters module
537
538 // create CreateCrossing module
540
541 // create information module
542 myInformation = new Information(this);
543
544 // disable edge selector
546}
547
548
551
552
553void
555 // restore color of all lanes of edge candidates
557 // hide frame
559}
560
561
562void
564 // If current element is a junction
565 if (viewObjects.getJunctionFront() && (viewObjects.getAttributeCarriers().front() == viewObjects.getJunctionFront())) {
566 // change label
568 // Enable edge selector and crossing parameters
571 // clears selected edges
573 } else if (viewObjects.getEdgeFront()) {
574 // check if mark edge
575 if (!viewObjects.getEdgeFront()->isInvalidCandidate()) {
577 }
578 } else {
579 // set default label
581 // restore color of all lanes of edge candidates
583 // Disable edge selector
585 }
586 // always update view after an operation
588}
589
590
591void
594 // simply call onCmdCreateCrossing of CreateCrossing module
596 }
597}
598
599
600void
609
610
615
616/****************************************************************************/
FXDEFMAP(GNECrossingFrame::EdgesSelector) EdgesSelectorMap[]
@ MID_GNE_SET_ATTRIBUTE
attribute edited
Definition GUIAppEnum.h:939
@ MID_GNE_CLEARSELECTION
clear selection of elements
@ MID_GNE_USESELECTED
use selected elements
@ MID_GNE_CREATE
create element
Definition GUIAppEnum.h:941
@ MID_HELP
help button
Definition GUIAppEnum.h:653
@ MID_GNE_SELECT
select element
Definition GUIAppEnum.h:957
#define GUIDesignButton
Definition GUIDesigns.h:82
#define GUIDesignTextField
Definition GUIDesigns.h:59
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:399
#define GUIDesignButtonRectangular
little rectangular button used in frames (For example, in "help" buttons)
Definition GUIDesigns.h:94
#define GUIDesignLabel(justify)
Definition GUIDesigns.h:243
#define GUIDesignTextFieldNCol
Num of column of text field.
Definition GUIDesigns.h:74
#define GUIDesignCheckButton
checkButton placed in left position
Definition GUIDesigns.h:192
#define GUIDesignLabelThickedFixed(width)
label thicked, icon before text, text centered and custom width
Definition GUIDesigns.h:252
#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:283
#define TL(string)
Definition MsgHandler.h:301
std::vector< NBEdge * > EdgeVector
container for (sorted) edges
Definition NBCont.h:42
@ SUMO_TAG_CROSSING
crossing between edges for pedestrians
@ SUMO_ATTR_EDGES
the edges of a route
@ SUMO_ATTR_PRIORITY
@ SUMO_ATTR_WIDTH
std::string joinToString(const std::vector< T > &v, const T_BETWEEN &between, std::streamsize accuracy=gPrecision)
Definition ToString.h:283
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
const std::string getID() const
get ID (all Attribute Carriers have one)
GNENet * getNet() const
get pointer to net
void resetCandidateFlags()
reset candidate flags
bool isInvalidCandidate() const
check if this element is a invalid candidate
void setCreateCrossingButton(bool value)
enable or disable button create crossing
CreateCrossing(GNECrossingFrame *crossingFrameParent)
FOX-declaration.
FXButton * myCreateCrossingButton
@field FXButton for create Crossing
long onCmdCreateCrossing(FXObject *, FXSelector, void *)
void enableCrossingParameters(bool hasTLS)
enable crossing parameters and set the default value of parameters
std::vector< NBEdge * > getCrossingEdges() const
get crossing NBedges
double getCrossingWidth() const
get crossing width
long onCmdHelp(FXObject *, FXSelector, void *)
Called when help button is pressed.
FXLabel * myCrossingWidthLabel
Label for width.
void markEdge(GNEEdge *edge)
mark or dismark edge
bool getCrossingPriority() const
get crossing priority
CrossingParameters(GNECrossingFrame *crossingFrameParent)
FOX-declaration.
void disableCrossingParameters()
disable crossing parameters and clear parameters
FXTextField * myCrossingWidth
TextField for width.
void useSelectedEdges(GNEJunction *parentJunction)
use selected eges
bool isCrossingParametersEnabled() const
check if currently the CrossingParameters is enabled
FXButton * myHelpCrossingAttribute
button for help
FXTextField * myCrossingEdges
TextField for edges.
FXCheckButton * myCrossingPriorityCheckButton
CheckBox for Priority.
FXLabel * myCrossingEdgesLabel
Label for edges.
bool isCurrentParametersValid() const
check if current parameters are valid
FXLabel * myCrossingPriorityLabel
Label for Priority.
long onCmdSetAttribute(FXObject *, FXSelector, void *)
long onCmdUseSelectedEdges(FXObject *, FXSelector, void *)
EdgesSelector(GNECrossingFrame *crossingFrameParent)
FOX-declaration.
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
GNEJunction * getCurrentJunction() const
get current junction
FXButton * myClearEdgesSelection
button for clear selection
void restoreEdgeColors()
restore colors of all edges
void enableEdgeSelector(GNEJunction *currentJunction)
enable edgeSelector
void disableEdgeSelector()
disable edgeSelector
FXButton * myUseSelectedEdges
CheckBox for selected edges.
Information(GNECrossingFrame *crossingFrameParent)
constructor
void updateCurrentJunctionLabel(const std::string &junctionID)
set current junction label
GNECrossingFrame::CreateCrossing * myCreateCrossing
create crossing modul
GNECrossingFrame::Information * myInformation
information modul
GNECrossingFrame::EdgesSelector * myEdgeSelector
edge selector modul
~GNECrossingFrame()
Destructor.
void clearEdgesHotkey()
clear edges (used when user press ESC key in Crossing mode)
GNECrossingFrame(GNEViewParent *viewParent, GNEViewNet *viewNet)
Constructor.
void hide()
hide crossing frame
GNECrossingFrame::CrossingParameters * myCrossingParameters
crossing parameters modul
void createCrossingHotkey()
create crossing (used when user press ENTER key in Crossing mode)
GNECrossingFrame::EdgesSelector * getEdgesSelector() const
get edge selector modul
void addCrossing(const GNEViewNetHelper::ViewObjectsSelector &viewObjects)
add Crossing element
GNECrossingFrame::JunctionInformation * myJunctionInformation
FOX need this.
A road/street connecting two junctions (netedit-version)
Definition GNEEdge.h:53
GNEViewNet * getViewNet() const
get view net
Definition GNEFrame.cpp:154
GNEViewNet * myViewNet
FOX need this.
Definition GNEFrame.h:121
virtual void hide()
hide Frame
Definition GNEFrame.cpp:128
const GNEHierarchicalContainerChildren< GNEEdge * > & getChildEdges() const
get child edges
NBNode * getNBNode() const
Return net build node.
GNEEdge * retrieveEdge(const std::string &id, bool hardFail=true) const
get edge by id
GNENetHelper::AttributeCarriers * getAttributeCarriers() const
get all attribute carriers used in this net
Definition GNENet.cpp:146
class used to group all variables related with objects under cursor after a click over view
const std::vector< GNEAttributeCarrier * > & getAttributeCarriers() const
get vector with ACs
GNEEdge * getEdgeFront() const
get front edge or a pointer to nullptr
GNEJunction * getJunctionFront() const
get front junction or a pointer to nullptr
void updateViewNet(const bool ignoreViewUpdater=true) const
Mark the entire GNEViewNet to be repainted later.
A single child window which contains a view of the simulation area.
static FXButton * buildFXButton(FXComposite *p, const std::string &text, const std::string &tip, const std::string &help, FXIcon *ic, FXObject *tgt, FXSelector sel, FXuint opts=BUTTON_NORMAL, FXint x=0, FXint y=0, FXint w=0, FXint h=0, FXint pl=DEFAULT_PAD, FXint pr=DEFAULT_PAD, FXint pt=DEFAULT_PAD, FXint pb=DEFAULT_PAD)
build button
const GUIVisualizationSettings & getVisualisationSettings() const
get visualization settings (read only)
GUIVisualizationCandidateColorSettings candidateColorSettings
candidate color settings
C++ TraCI client API implementation.
A list item which allows for custom coloring.
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
bool isTLControlled() const
Returns whether this node is controlled by any tls.
Definition NBNode.h:331
static const PositionVector EMPTY
empty Vector
static const RGBColor WHITE
Definition RGBColor.h:195
static const RGBColor invalid
color for invalid elements
static const RGBColor target
color for selected candidate target
static const RGBColor possible
color for possible candidate element