Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIDialog_ViewSettings.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/****************************************************************************/
22// The dialog to change the view (gui) settings.
23/****************************************************************************/
24#include <config.h>
25
26#include <fstream>
27#include <fxkeys.h>
45
48
49
50// ===========================================================================
51// FOX callback mapping
52// ===========================================================================
53
58
59FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[] = {
63 FXMAPFUNC(SEL_COMMAND, MID_SETTINGS_OK, GUIDialog_ViewSettings::onCmdOk),
65 FXMAPFUNC(SEL_KEYPRESS, 0, GUIDialog_ViewSettings::onKeyPress),
66 // settings
75 // decals
80};
81
82FXIMPLEMENT(GUIDialog_ViewSettings, FXTopWindow, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
83FXIMPLEMENT(GUIDialog_ViewSettings::SizePanel, FXObject, GUIDialog_SizeMap, ARRAYNUMBER(GUIDialog_SizeMap))
84
85
86// ===========================================================================
87// method definitions
88// ===========================================================================
89#ifdef _MSC_VER
90#pragma warning(push)
91#pragma warning(disable: 4355) // mask warning about "this" in initializers
92#endif
94 FXTopWindow(parent, TL("View Settings"),
98 GUIPersistentWindowPos(this, "VIEWSETTINGS", true, 20, 40, 700, 500, 400, 20),
99 myParent(parent),
100 mySettings(settings),
101 myBackup(settings->name, settings->netedit) {
102 // make a backup copy
103 myBackup.copy(*settings);
104 // create content frame
105 FXVerticalFrame* contentFrame = new FXVerticalFrame(this, GUIDesignViewSettingsVerticalFrame1);
106 // build header
107 buildHeader(contentFrame);
108 // create tabbook for every section
109 FXTabBook* tabbook = new FXTabBook(contentFrame, nullptr, 0, GUIDesignViewSettingsTabBook1);
110 // build background frame
111 buildBackgroundFrame(tabbook);
112 // build streets frame
113 buildStreetsFrame(tabbook);
114 // build vehicles frame
115 buildVehiclesFrame(tabbook);
116 // build persons frame
117 buildPersonsFrame(tabbook);
118 // build containers frame
119 buildContainersFrame(tabbook);
120 // build junctions frame
121 buildJunctionsFrame(tabbook);
122 // build additionals frame
123 buildAdditionalsFrame(tabbook);
124 // build demand frame
125 if (mySettings->netedit) {
126 buildDemandFrame(tabbook);
127 }
128 // build POIs frame
129 buildPOIsFrame(tabbook);
130 // build polygons frame
131 buildPolygonsFrame(tabbook);
132 // build selection frame (only in netedit)
133 if (mySettings->netedit) {
134 buildSelectionFrame(tabbook);
135 }
136 // build data frame (only in netedit)
137 if (mySettings->netedit) {
138 buildDataFrame(tabbook);
139 }
140 // build legend frame
141 buildLegendFrame(tabbook);
142 // build 3D frame
143 build3DFrame(tabbook);
144 if (mySettings->netedit) {
145 myFrame3D->disable();
146 }
147 // build openGL frame
148 buildOpenGLFrame(tabbook);
149 // build buttons
150 buildButtons(contentFrame);
151 // rebuild color matrix
155}
156#ifdef _MSC_VER
157#pragma warning(pop)
158#endif
159
160
162 myParent->remove(this);
163 // delete name panels
167 delete myTLSPhaseNamePanel;
168 delete myCwaEdgeNamePanel;
169 delete myStreetNamePanel;
170 delete myEdgeValuePanel;
173 delete myTLIndexPanel;
174 delete myJunctionIDPanel;
175 delete myJunctionNamePanel;
176 delete myVehicleNamePanel;
177 delete myVehicleValuePanel;
179 delete myVehicleTextPanel;
180 delete myPersonNamePanel;
181 delete myPersonValuePanel;
182 delete myAddNamePanel;
183 delete myAddFullNamePanel;
184 delete myPOINamePanel;
185 delete myPOITypePanel;
186 delete myPOITextPanel;
187 delete myPolyNamePanel;
188 delete myPolyTypePanel;
189 delete myEdgeNamePanel;
190 delete myDataValuePanel;
192 // delete size panels
193 delete myVehicleSizePanel;
194 delete myPersonSizePanel;
195 delete myJunctionSizePanel;
196 delete myPOISizePanel;
197 delete myPolySizePanel;
198 delete myAddSizePanel;
199 // delete rainbow panels
200 delete myEdgeRainbowPanel;
202 delete myDataRainbowPanel;
204}
205
206
207void
209 // update buttons that can be changed externally
210 myShowGrid->setCheck(mySettings->showGrid);
213 // create myNewDecalsTable
214 myDecalsTable->create();
216 FXTopWindow::show();
217}
218
219
224
225
226void
228 mySettings = settings;
229 myBackup.copy(*settings);
230 onCmdNameChange(nullptr, 0, nullptr);
231}
232
233
234long
235GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) {
236 getApp()->reg().writeIntEntry("SETTINGS", "comboRows", (int)myComboRows->getValue());
237 hide();
238 return 1;
239}
240
241
242long
243GUIDialog_ViewSettings::onCmdCancel(FXObject*, FXSelector, void*) {
244 hide();
246 myParent->update();
247 return 1;
248}
249
250
251long
252GUIDialog_ViewSettings::onKeyPress(FXObject* o, FXSelector sel, void* ptr) {
253 const FXEvent* e = (FXEvent*) ptr;
254 if(e->code==KEY_Escape){
255 onCmdCancel(nullptr, 0, nullptr);
256 return 1;
257 }
258 return FXTopWindow::onKeyPress(o, sel, ptr);
259}
260
261
262long
263GUIDialog_ViewSettings::onCmdNameChange(FXObject*, FXSelector, void* ptr) {
264 if (ptr != nullptr) {
265 FXString dataS = (char*) ptr; // !!!unicode
266 // check whether this item has been added twice
267 if (dataS.text() == mySchemeName->getItemText(mySchemeName->getNumItems() - 1)) {
268 for (int i = 0; i < mySchemeName->getNumItems() - 1; ++i) {
269 if (dataS.text() == mySchemeName->getItemText(i)) {
271 }
272 }
273 }
274 myBackup.copy(gSchemeStorage.get(dataS.text()));
275 mySettings = &gSchemeStorage.get(dataS.text());
276 }
278
287 if (mySettings->netedit) {
298
305
318
325 }
326
334 myShowRails->setCheck(mySettings->showRails);
350
363 /*
364 myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
365 */
372
378
383
394
398
399 myPoiDetail->setValue(mySettings->poiDetail);
406
412
416 myDither->setCheck(mySettings->dither);
417 myFPS->setCheck(mySettings->fps);
418 myTrueZ->setCheck(mySettings->trueZ);
426
429
432
433 update();
434 myParent->update();
435 return 1;
436}
437
438
439bool
440GUIDialog_ViewSettings::updateColorRanges(FXObject* sender, std::vector<FXColorWell*>::const_iterator colIt,
441 std::vector<FXColorWell*>::const_iterator colEnd,
442 std::vector<FXRealSpinner*>::const_iterator threshIt,
443 std::vector<FXRealSpinner*>::const_iterator threshEnd,
444 std::vector<FXButton*>::const_iterator buttonIt,
445 GUIColorScheme& scheme) {
446 UNUSED_PARAMETER(threshEnd);
447 int pos = 0;
448 while (colIt != colEnd) {
449 if (scheme.isFixed()) {
450 if (sender == *colIt) {
451 scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
452 }
453 } else {
454 if (sender == *threshIt) {
455 const double val = (*threshIt)->getValue();
456 scheme.setThreshold(pos, val);
457 return false;
458 }
459 if (sender == *colIt) {
460 scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
461 return false;
462 }
463 if (sender == *buttonIt) {
464 scheme.addColor(MFXUtils::getRGBColor((*colIt)->getRGBA()), (*threshIt)->getValue());
465 return true;
466 } else if (sender == *(buttonIt + 1)) {
467 scheme.removeColor(pos);
468 return true;
469 }
470 // 2 buttons per item (add / remove)
471 threshIt++;
472 buttonIt += 2;
473 }
474 ++colIt;
475 pos++;
476 }
477 return false;
478}
479
480
481bool
482GUIDialog_ViewSettings::updateScaleRanges(FXObject* sender, std::vector<FXRealSpinner*>::const_iterator scaleIt,
483 std::vector<FXRealSpinner*>::const_iterator scaleEnd,
484 std::vector<FXRealSpinner*>::const_iterator threshIt,
485 std::vector<FXRealSpinner*>::const_iterator threshEnd,
486 std::vector<FXButton*>::const_iterator buttonIt,
487 GUIScaleScheme& scheme) {
488 int pos = 0;
489 while (scaleIt != scaleEnd) {
490 if (scheme.isFixed()) {
491 if (sender == *scaleIt) {
492 scheme.setColor(pos, (*scaleIt)->getValue());
493 }
494 } else {
495 if (sender == *threshIt) {
496 const double val = (*threshIt)->getValue();
497 double lo, hi;
498 if (pos != 0) {
499 threshIt--;
500 (*threshIt)->getRange(lo, hi);
501 (*threshIt)->setRange(lo, val);
502 threshIt++;
503 }
504 threshIt++;
505 if (threshIt != threshEnd) {
506 (*threshIt)->getRange(lo, hi);
507 (*threshIt)->setRange(val, hi);
508 }
509 scheme.setThreshold(pos, val);
510 return false;
511 }
512 if (sender == *scaleIt) {
513 scheme.setColor(pos, (*scaleIt)->getValue());
514 return false;
515 }
516 if (sender == *buttonIt) {
517 scheme.addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
518 return true;
519 } else if (sender == *(buttonIt + 1)) {
520 scheme.removeColor(pos);
521 return true;
522 }
523 threshIt++;
524 buttonIt += 2;
525 }
526 ++scaleIt;
527 pos++;
528 }
529 return false;
530}
531
532
533long
534GUIDialog_ViewSettings::onCmdColorChange(FXObject* sender, FXSelector, void* /*val*/) {
536 tmpSettings.copy(*mySettings);
537 int prevLaneMode = mySettings->getLaneEdgeMode();
538 int prevLaneScaleMode = mySettings->getLaneEdgeScaleMode();
539 int prevVehicleMode = mySettings->vehicleColorer.getActive();
540 int prevVehicleScaleMode = mySettings->vehicleScaler.getActive();
541 int prevPersonMode = mySettings->personColorer.getActive();
542 int prevContainerMode = mySettings->containerColorer.getActive();
543 int prevJunctionMode = mySettings->junctionColorer.getActive();
544 int prevPOIMode = mySettings->poiColorer.getActive();
545 int prevPolyMode = mySettings->polyColorer.getActive();
546 int prevDataMode = mySettings->dataColorer.getActive();
547 int prevDataScaleMode = mySettings->dataScaler.getActive();
548 bool doRebuildColorMatrices = false;
549
550 tmpSettings.name = mySettings->name;
552
553 // additionals
562 if (mySettings->netedit) {
573
574 tmpSettings.widthSettings.tripWidth = myTripWidth->getValue();
575 tmpSettings.widthSettings.personTripWidth = myPersonTripWidth->getValue();
576 tmpSettings.widthSettings.walkWidth = myWalkWidth->getValue();
577 tmpSettings.widthSettings.rideWidth = myRideWidth->getValue();
578 tmpSettings.widthSettings.transportWidth = myTransportWidth->getValue();
579 tmpSettings.widthSettings.transhipWidth = myTranshipWidth->getValue();
580
593 }
594
595 tmpSettings.showGrid = (myShowGrid->getCheck() != FALSE);
596 tmpSettings.gridXSize = (double) myGridXSizeDialer->getValue();
597 tmpSettings.gridYSize = (double) myGridYSizeDialer->getValue();
598
602 } else {
605 }
606 tmpSettings.laneShowBorders = (myShowLaneBorders->getCheck() != FALSE);
607 tmpSettings.showBikeMarkings = (myShowBikeMarkings->getCheck() != FALSE);
608 tmpSettings.showLinkDecals = (myShowLaneDecals->getCheck() != FALSE);
609 tmpSettings.realisticLinkRules = (myRealisticLinkRules->getCheck() != FALSE);
610 tmpSettings.showLinkRules = (myShowLinkRules->getCheck() != FALSE);
611 tmpSettings.showRails = (myShowRails->getCheck() != FALSE);
612 tmpSettings.secondaryShape = (mySecondaryShape->getCheck() != FALSE);
613 tmpSettings.edgeName = myEdgeNamePanel->getSettings();
617 tmpSettings.edgeValue = myEdgeValuePanel->getSettings();
619 tmpSettings.hideConnectors = (myHideMacroConnectors->getCheck() != FALSE);
620 tmpSettings.showLaneDirection = (myShowLaneDirection->getCheck() != FALSE);
621 tmpSettings.showSublanes = (myShowSublanes->getCheck() != FALSE);
622 tmpSettings.spreadSuperposed = (mySpreadSuperposed->getCheck() != FALSE);
623 tmpSettings.disableHideByZoom = (myDisableHideByZoom->getCheck() != FALSE);
624 if (sender == myParamKey) {
626 tmpSettings.edgeParam = myParamKey->getText().text();
628 tmpSettings.laneParam = myParamKey->getText().text();
630 tmpSettings.edgeData = myParamKey->getText().text();
632 tmpSettings.edgeData = myParamKey->getText().text();
633 }
634 } else if (sender == myScalingParamKey) {
636 tmpSettings.edgeDataScaling = myScalingParamKey->getText().text();
637 }
638 } else if (sender == myVehicleParamKey) {
640 tmpSettings.vehicleParam = myVehicleParamKey->getText().text();
641 }
642 } else if (sender == myVehicleScalingParamKey) {
644 tmpSettings.vehicleScaleParam = myVehicleScalingParamKey->getText().text();
645 }
646 } else if (sender == myDataParamKey) {
648 tmpSettings.relDataAttr = myDataParamKey->getText().text();
649 }
650 } else if (sender == myDataScaleParamKey) {
652 tmpSettings.relDataScaleAttr = myDataScaleParamKey->getText().text();
653 }
654 } else if (sender == myVehicleTextPanel->myCheck) {
656 } else if (sender == myVehicleTextParamKey) {
657 tmpSettings.vehicleTextParam = myVehicleTextParamKey->getText().text();
658 } else if (sender == myPOITextPanel->myCheck) {
660 } else if (sender == myPOITextParamKey) {
661 tmpSettings.poiTextParam = myPOITextParamKey->getText().text();
662 } else if (sender == myMeanDataID) {
663 tmpSettings.edgeDataID = myMeanDataID->getText().text();
664 }
666 tmpSettings.laneWidthExaggeration = myLaneWidthUpscaleDialer->getValue();
667 tmpSettings.laneMinSize = myLaneMinWidthDialer->getValue();
668
672 tmpSettings.showBlinker = (myShowBlinker->getCheck() != FALSE);
673 tmpSettings.drawMinGap = (myShowMinGap->getCheck() != FALSE);
674 tmpSettings.drawBrakeGap = (myShowBrakeGap->getCheck() != FALSE);
675 tmpSettings.showBTRange = (myShowBTRange->getCheck() != FALSE);
676 tmpSettings.showRouteIndex = (myShowRouteIndex->getCheck() != FALSE);
677 tmpSettings.scaleLength = (myScaleLength->getCheck() != FALSE);
678 tmpSettings.drawReversed = (myDrawReversed->getCheck() != FALSE);
679 tmpSettings.showParkingInfo = (myShowParkingInfo->getCheck() != FALSE);
680 tmpSettings.showChargingInfo = (myShowChargingInfo->getCheck() != FALSE);
681 /*
682 tmpSettings.drawLaneChangePreference = (myShowLaneChangePreference->getCheck() != FALSE);
683 */
690
696
701
712
713 tmpSettings.addName = myAddNamePanel->getSettings();
715 tmpSettings.addSize = myAddSizePanel->getSettings();
716
718 tmpSettings.poiDetail = myPoiDetail->getValue();
719 tmpSettings.poiName = myPOINamePanel->getSettings();
720 tmpSettings.poiType = myPOITypePanel->getSettings();
721 tmpSettings.poiText = myPOITextPanel->getSettings();
722 tmpSettings.poiSize = myPOISizePanel->getSettings();
723 tmpSettings.poiUseCustomLayer = myPOIUseCustomLayer->getCheck() != FALSE;
724 tmpSettings.poiCustomLayer = myPOICustomLayer->getValue();
725
727 tmpSettings.polyName = myPolyNamePanel->getSettings();
728 tmpSettings.polyType = myPolyTypePanel->getSettings();
729 tmpSettings.polySize = myPolySizePanel->getSettings();
730 tmpSettings.polyUseCustomLayer = myPolyUseCustomLayer->getCheck() != FALSE;
731 tmpSettings.polyCustomLayer = myPolyCustomLayer->getValue();
732
733 if (mySettings->netedit) {
734 tmpSettings.dataValue = myDataValuePanel->getSettings();
737 tmpSettings.dataValue = myDataValuePanel->getSettings();
738 tmpSettings.tazRelWidthExaggeration = myTazRelationUpscaleDialer->getValue();
741 }
742
743 tmpSettings.showLane2Lane = (myShowLane2Lane->getCheck() != FALSE);
744 tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE);
745 tmpSettings.drawCrossingsAndWalkingareas = (myDrawCrossingsAndWalkingAreas->getCheck() != FALSE);
746 tmpSettings.dither = (myDither->getCheck() != FALSE);
747 tmpSettings.fps = (myFPS->getCheck() != FALSE);
748 tmpSettings.trueZ = (myTrueZ->getCheck() != FALSE);
749 tmpSettings.drawBoundaries = (myDrawBoundaries->getCheck() != FALSE);
750 tmpSettings.forceDrawForRectangleSelection = (myForceDrawForRectangleSelection->getCheck() != FALSE);
751 tmpSettings.disableDottedContours = (myDisableDottedContours->getCheck() != FALSE);
753 tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE);
754 tmpSettings.showColorLegend = (myShowColorLegend->getCheck() != FALSE);
755 tmpSettings.showVehicleColorLegend = (myShowVehicleColorLegend->getCheck() != FALSE);
756 tmpSettings.ignoreColorSchemeFor3DVehicles = (myIgnoreColorSchemeFor3DVehicles->getCheck() != FALSE);
757 tmpSettings.show3DTLSDomes = (myShow3DTLSDomes->getCheck() != FALSE);
758 tmpSettings.show3DTLSLinkMarkers = (myShow3DTLSLinkMarkers->getCheck() != FALSE);
759 tmpSettings.show3DHeadUpDisplay = (myShow3DHeadUpDisplay->getCheck() != FALSE);
760 tmpSettings.generate3DTLSModels = (myGenerate3DTLSModels->getCheck() != FALSE);
761 const unsigned char lightFactor = (unsigned char)myLight3DFactor->getValue();
762 tmpSettings.ambient3DLight.set(lightFactor / 2, lightFactor / 2, lightFactor / 2, 255);
763 tmpSettings.diffuse3DLight.set(lightFactor, lightFactor, lightFactor, 255);
764 tmpSettings.skyColor = MFXUtils::getRGBColor(mySkyColor->getRGBA());
765
766 // lanes (colors)
767 if (sender == myEdgeRainbowPanel->myColorRainbow) {
769 doRebuildColorMatrices = true;
770 } else if (sender == myJunctionRainbowPanel->myColorRainbow) {
772 doRebuildColorMatrices = true;
773 } else if (sender == myVehicleRainbowPanel->myColorRainbow) {
775 doRebuildColorMatrices = true;
776 } else if (myDataRainbowPanel && sender == myDataRainbowPanel->myColorRainbow) {
778 doRebuildColorMatrices = true;
779 }
780 if (tmpSettings.getLaneEdgeMode() == prevLaneMode) {
781 if (updateColorRanges(sender, myLaneColors.begin(), myLaneColors.end(),
782 myLaneThresholds.begin(), myLaneThresholds.end(), myLaneButtons.begin(),
783 tmpSettings.getLaneEdgeScheme())) {
784 doRebuildColorMatrices = true;
785 }
786 if (sender == myLaneColorInterpolation) {
787 tmpSettings.getLaneEdgeScheme().setInterpolated(myLaneColorInterpolation->getCheck() != FALSE);
788 doRebuildColorMatrices = true;
789 }
790 } else {
791 doRebuildColorMatrices = true;
792 }
793 // lanes (scaling)
794 if (tmpSettings.getLaneEdgeScaleMode() == prevLaneScaleMode) {
795 if (updateScaleRanges(sender, myLaneScales.begin(), myLaneScales.end(),
797 tmpSettings.getLaneEdgeScaleScheme())) {
798 doRebuildColorMatrices = true;
799 }
800 if (sender == myLaneScaleInterpolation) {
801 tmpSettings.getLaneEdgeScaleScheme().setInterpolated(myLaneScaleInterpolation->getCheck() != FALSE);
802 doRebuildColorMatrices = true;
803 }
804 } else {
805 doRebuildColorMatrices = true;
806 }
807 // vehicles
808 if (tmpSettings.vehicleColorer.getActive() == prevVehicleMode) {
809 if (updateColorRanges(sender, myVehicleColors.begin(), myVehicleColors.end(),
811 tmpSettings.vehicleColorer.getScheme())) {
812 doRebuildColorMatrices = true;
813 }
814 if (sender == myVehicleColorInterpolation) {
815 tmpSettings.vehicleColorer.getScheme().setInterpolated(myVehicleColorInterpolation->getCheck() != FALSE);
816 doRebuildColorMatrices = true;
817 }
818 } else {
819 doRebuildColorMatrices = true;
820 }
821 // vehicles (scaling)
822 if (tmpSettings.vehicleScaler.getActive() == prevVehicleScaleMode) {
823 if (updateScaleRanges(sender, myVehicleScales.begin(), myVehicleScales.end(),
825 tmpSettings.vehicleScaler.getScheme())) {
826 doRebuildColorMatrices = true;
827 }
828 if (sender == myVehicleScaleInterpolation) {
829 tmpSettings.vehicleScaler.getScheme().setInterpolated(myVehicleScaleInterpolation->getCheck() != FALSE);
830 doRebuildColorMatrices = true;
831 }
832 } else {
833 doRebuildColorMatrices = true;
834 }
835 // persons
836 if (tmpSettings.personColorer.getActive() == prevPersonMode) {
837 if (updateColorRanges(sender, myPersonColors.begin(), myPersonColors.end(),
839 tmpSettings.personColorer.getScheme())) {
840 doRebuildColorMatrices = true;
841 }
842 if (sender == myPersonColorInterpolation) {
843 tmpSettings.personColorer.getScheme().setInterpolated(myPersonColorInterpolation->getCheck() != FALSE);
844 doRebuildColorMatrices = true;
845 }
846 } else {
847 doRebuildColorMatrices = true;
848 }
849 // containers
850 if (tmpSettings.containerColorer.getActive() == prevContainerMode) {
851 if (updateColorRanges(sender, myContainerColors.begin(), myContainerColors.end(),
853 tmpSettings.containerColorer.getScheme())) {
854 doRebuildColorMatrices = true;
855 }
856 if (sender == myContainerColorInterpolation) {
858 doRebuildColorMatrices = true;
859 }
860 } else {
861 doRebuildColorMatrices = true;
862 }
863 // junctions
864 if (tmpSettings.junctionColorer.getActive() == prevJunctionMode) {
865 if (updateColorRanges(sender, myJunctionColors.begin(), myJunctionColors.end(),
867 tmpSettings.junctionColorer.getScheme())) {
868 doRebuildColorMatrices = true;
869 }
870 if (sender == myJunctionColorInterpolation) {
871 tmpSettings.junctionColorer.getScheme().setInterpolated(myJunctionColorInterpolation->getCheck() != FALSE);
872 doRebuildColorMatrices = true;
873 }
874 } else {
875 doRebuildColorMatrices = true;
876 }
877 // POIs
878 if (tmpSettings.poiColorer.getActive() == prevPOIMode) {
879 if (updateColorRanges(sender, myPOIColors.begin(), myPOIColors.end(),
880 myPOIThresholds.begin(), myPOIThresholds.end(), myPOIButtons.begin(),
881 tmpSettings.poiColorer.getScheme())) {
882 doRebuildColorMatrices = true;
883 }
884 if (sender == myPOIColorInterpolation) {
885 tmpSettings.poiColorer.getScheme().setInterpolated(myPOIColorInterpolation->getCheck() != FALSE);
886 doRebuildColorMatrices = true;
887 }
888 } else {
889 doRebuildColorMatrices = true;
890 }
891 // polygons
892 if (tmpSettings.polyColorer.getActive() == prevPolyMode) {
893 if (updateColorRanges(sender, myPolyColors.begin(), myPolyColors.end(),
894 myPolyThresholds.begin(), myPolyThresholds.end(), myPolyButtons.begin(),
895 tmpSettings.polyColorer.getScheme())) {
896 doRebuildColorMatrices = true;
897 }
898 if (sender == myPolyColorInterpolation) {
899 tmpSettings.polyColorer.getScheme().setInterpolated(myPolyColorInterpolation->getCheck() != FALSE);
900 doRebuildColorMatrices = true;
901 }
902 } else {
903 doRebuildColorMatrices = true;
904 }
905 // data
906 if (tmpSettings.netedit) {
907 if (tmpSettings.dataColorer.getActive() == prevDataMode) {
908 if (updateColorRanges(sender, myDataColors.begin(), myDataColors.end(),
909 myDataThresholds.begin(), myDataThresholds.end(), myDataButtons.begin(),
910 tmpSettings.dataColorer.getScheme())) {
911 doRebuildColorMatrices = true;
912 }
913 if (sender == myDataColorInterpolation) {
914 tmpSettings.dataColorer.getScheme().setInterpolated(myDataColorInterpolation->getCheck() != FALSE);
915 doRebuildColorMatrices = true;
916 }
917 } else {
918 doRebuildColorMatrices = true;
919 }
920 // vehicles (scaling)
921 if (tmpSettings.dataScaler.getActive() == prevDataScaleMode) {
922 if (updateScaleRanges(sender, myDataScales.begin(), myDataScales.end(),
924 tmpSettings.dataScaler.getScheme())) {
925 doRebuildColorMatrices = true;
926 }
927 if (sender == myDataScaleInterpolation) {
928 tmpSettings.dataScaler.getScheme().setInterpolated(myDataScaleInterpolation->getCheck() != FALSE);
929 doRebuildColorMatrices = true;
930 }
931 } else {
932 doRebuildColorMatrices = true;
933 }
934 }
935 // openGL
936 if (sender == myRecalculateBoundaries) {
938 }
939
940 if (sender == myShowPedestrianNetwork) {
941 tmpSettings.showPedestrianNetwork = (myShowPedestrianNetwork->getCheck() != FALSE);
942 myParent->drawPedestrianNetwork(tmpSettings);
943 }
944
945 if (sender == myPedestrianNetworkColor) {
948 }
949
950 if (tmpSettings == *mySettings) {
951 return 1;
952 }
953
954 int index = mySchemeName->getCurrentItem();
955 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
956 // one of the initial settings is modified
957 // every time this happens we create a new scheme
958 int suffix = 1;
959 while (gSchemeStorage.contains("custom_" + toString(suffix))) {
960 suffix++;
961 }
962 tmpSettings.name = "custom_" + toString(suffix);
963 // the newly created settings must be entered in several places:
964 // - the comboBox mySchemeName of this dialog
965 // - the comboBox of the parent view (set as active)
966 // - the comboBox of all other views (only append) XXX @todo
967 index = mySchemeName->appendIconItem(tmpSettings.name.c_str());
969 myParent->getColoringSchemesCombo()->appendIconItem(tmpSettings.name.c_str());
970 }
972 myParent->getColoringSchemesCombo()->findItem(tmpSettings.name.c_str()));
973 gSchemeStorage.add(tmpSettings); // overwrites existing
974 mySettings = &gSchemeStorage.get(tmpSettings.name);
975 myParent->setColorScheme(tmpSettings.name);
976
977 if (doRebuildColorMatrices) {
979 }
980 myParent->handle(this, FXSEL(SEL_CHANGED, MID_SIMPLE_VIEW_COLORCHANGE), nullptr);
981 myParent->forceRefresh();
982 getApp()->forceRefresh();
983 return 1;
984}
985
986
987void
988GUIDialog_ViewSettings::loadSettings(const std::string& file) {
989 GUISettingsHandler handler(file, true, mySettings->netedit);
990 for (std::string settingsName : handler.addSettings(myParent)) {
991 FXint index = mySchemeName->appendIconItem(settingsName.c_str());
993 mySettings = &gSchemeStorage.get(settingsName);
994 }
995 if (handler.hasDecals()) {
997 myParent->getDecals() = handler.getDecals();
999 myParent->update();
1000 myParent->getDecalsLockMutex().unlock();
1001 }
1002 if (handler.getDelay() >= 0) {
1003 myParent->setDelay(handler.getDelay());
1004 }
1005 if (handler.getBreakpoints().size() > 0) {
1007 }
1008 handler.applyViewport(myParent);
1009 onCmdNameChange(nullptr, 0, nullptr);
1010}
1011
1012
1013void
1015 for (const auto& decal : myParent->getDecals()) {
1016 // only save decals with non empty filename
1017 if (decal.filename.size() > 0) {
1018 // check if decal is a light
1019 const bool isLight = (decal.filename.substr(0, 5) == "light") && (decal.filename.length() == 6) && isdigit(decal.filename[5]);
1020 if (isLight) {
1022 dev.writeAttr(SUMO_ATTR_INDEX, decal.filename.substr(5, 1));
1023 } else {
1025 dev.writeAttr("file", decal.filename);
1026 dev.writeAttr("screenRelative", decal.screenRelative);
1027 }
1028 dev.writeAttr(SUMO_ATTR_CENTER_X, decal.centerX);
1029 dev.writeAttr(SUMO_ATTR_CENTER_Y, decal.centerY);
1030 dev.writeAttr(SUMO_ATTR_CENTER_Z, decal.centerZ);
1031 dev.writeAttr(SUMO_ATTR_WIDTH, decal.width);
1032 dev.writeAttr(SUMO_ATTR_HEIGHT, decal.height);
1033 dev.writeAttr("altitude", decal.altitude);
1034 dev.writeAttr("rotation", decal.rot);
1035 dev.writeAttr("tilt", decal.tilt);
1036 dev.writeAttr("roll", decal.roll);
1037 dev.writeAttr(SUMO_ATTR_LAYER, decal.layer);
1038 dev.closeTag();
1039 }
1040 }
1041}
1042
1043
1044void
1045GUIDialog_ViewSettings::loadDecals(const std::string& file) {
1046 myParent->getDecalsLockMutex().lock();
1047 GUISettingsHandler handler(file);
1048 if (handler.hasDecals()) {
1049 myParent->getDecals() = handler.getDecals();
1050 }
1052 myParent->update();
1053 myParent->getDecalsLockMutex().unlock();
1054}
1055
1056
1057long
1058GUIDialog_ViewSettings::onCmdSaveSetting(FXObject*, FXSelector, void* /*data*/) {
1059 int index = mySchemeName->getCurrentItem();
1060 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1061 return 1;
1062 }
1063 // get the name
1064 std::string name = "";
1065 while (name.length() == 0) {
1066 FXDialogBox dialog(this, TL("Enter a name"), GUIDesignViewSettingsDialog);
1067 FXVerticalFrame* content = new FXVerticalFrame(&dialog, GUIDesignViewSettingsVerticalFrame5);
1068 new FXLabel(content, TL("Please enter an alphanumeric name: "), nullptr, GUIDesignViewSettingsLabel2);
1069 FXTextField* text = new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsTextField1);
1070 new FXHorizontalSeparator(content, GUIDesignHorizontalSeparator);
1071 FXHorizontalFrame* buttons = new FXHorizontalFrame(content, GUIDesignViewSettingsHorizontalFrame3);
1072 GUIDesigns::buildFXButton(buttons, TL("&OK"), "", "", nullptr, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsButton4);
1073 GUIDesigns::buildFXButton(buttons, TL("&Cancel"), "", "", nullptr, &dialog, FXDialogBox::ID_CANCEL, GUIDesignViewSettingsButton5);
1074 dialog.create();
1075 text->setFocus();
1076 if (!dialog.execute()) {
1077 return 1;
1078 }
1079 name = text->getText().text();
1080 for (int i = 0; i < (int)name.length(); ++i) {
1081 if (name[i] != '_' && (name[i] < 'a' || name[i] > 'z') && (name[i] < 'A' || name[i] > 'Z') && (name[i] < '0' || name[i] > '9')) {
1082 name = "";
1083 break;
1084 }
1085 }
1086 }
1088 tmpSettings.copy(*mySettings);
1089 tmpSettings.name = name;
1090 if (name == mySettings->name || StringUtils::startsWith(mySettings->name, "custom_")) {
1092 mySchemeName->removeItem(index);
1094 myParent->getColoringSchemesCombo()->insertIconItem(index, name.c_str());
1095 } else {
1097 index = mySchemeName->appendIconItem(name.c_str());
1100 myParent->getColoringSchemesCombo()->findItem(name.c_str()));
1101 }
1102 gSchemeStorage.add(tmpSettings);
1103 mySchemeName->insertIconItem(index, name.c_str());
1104 myParent->setColorScheme(name);
1105 mySettings = &gSchemeStorage.get(name);
1107 gSchemeStorage.writeSettings(getApp());
1108 return 1;
1109}
1110
1111
1112long
1113GUIDialog_ViewSettings::onUpdSaveSetting(FXObject* sender, FXSelector, void* ptr) {
1114 sender->handle(this,
1116 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1117 ptr);
1118 return 1;
1119}
1120
1121
1122long
1123GUIDialog_ViewSettings::onCmdDeleteSetting(FXObject*, FXSelector, void* /*data*/) {
1124 int index = mySchemeName->getCurrentItem();
1125 if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1126 return 1;
1127 }
1128 std::string name = mySchemeName->getItemText(index);
1129 gSchemeStorage.remove(name);
1130 mySchemeName->removeItem(index);
1132 onCmdNameChange(nullptr, 0, (void*) mySchemeName->getItemText(0).c_str());
1133 gSchemeStorage.writeSettings(getApp());
1134 return 1;
1135}
1136
1137
1138long
1139GUIDialog_ViewSettings::onUpdDeleteSetting(FXObject* sender, FXSelector, void* ptr) {
1140 sender->handle(this,
1142 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1143 ptr);
1144 return 1;
1145}
1146
1147
1148long
1149GUIDialog_ViewSettings::onCmdExportSetting(FXObject*, FXSelector, void* /*data*/) {
1150 FXString file = MFXUtils::getFilename2Write(this, TL("Export view settings"),
1151 SUMOXMLDefinitions::XMLFileExtensions.getMultilineString().c_str(),
1153 if (file == "") {
1154 return 1;
1155 }
1156 try {
1157 OutputDevice& dev = OutputDevice::getDevice(file.text(), false);
1159 if (myParent->is3DView()) {
1160 dev.writeAttr(SUMO_ATTR_TYPE, "osg");
1161 }
1162 mySettings->save(dev);
1163 if (mySaveViewPort->getCheck()) {
1165 }
1166 if (mySaveDelay->getCheck()) {
1169 dev.closeTag();
1170 }
1171 if (mySaveDecals->getCheck()) {
1172 saveDecals(dev);
1173 }
1174 if (!mySettings->netedit && mySaveBreakpoints->getCheck()) {
1178 dev.closeTag();
1179 }
1180 }
1181 dev.closeTag();
1182 dev.close();
1183 } catch (IOError& e) {
1184 FXMessageBox::error(this, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1185 }
1186 return 1;
1187}
1188
1189
1190long
1191GUIDialog_ViewSettings::onUpdExportSetting(FXObject* sender, FXSelector, void* ptr) {
1192 sender->handle(this,
1194 && !mySaveViewPort->getCheck() && !mySaveDelay->getCheck() && !mySaveDecals->getCheck() && !mySaveBreakpoints->getCheck()) ?
1195 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1196 ptr);
1197 return 1;
1198}
1199
1200
1201long
1202GUIDialog_ViewSettings::onCmdImportSetting(FXObject*, FXSelector, void* /*data*/) {
1203 FXFileDialog opendialog(this, TL("Import view settings"));
1204 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::OPEN));
1205 opendialog.setSelectMode(SELECTFILE_ANY);
1206 opendialog.setPatternList(SUMOXMLDefinitions::ViewSettingsFileExtensions.getMultilineString().c_str());
1207 if (gCurrentFolder.length() != 0) {
1208 opendialog.setDirectory(gCurrentFolder);
1209 }
1210 if (opendialog.execute()) {
1211 gCurrentFolder = opendialog.getDirectory();
1212 loadSettings(opendialog.getFilename().text());
1213 }
1214 return 1;
1215}
1216
1217
1218long
1219GUIDialog_ViewSettings::onCmdLoadDecal(FXObject*, FXSelector, void* /*data*/) {
1220 FXFileDialog opendialog(this, TL("Load Decals"));
1221 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1222 opendialog.setSelectMode(SELECTFILE_ANY);
1223 opendialog.setPatternList(SUMOXMLDefinitions::ViewSettingsFileExtensions.getMultilineString().c_str());
1224 if (gCurrentFolder.length() != 0) {
1225 opendialog.setDirectory(gCurrentFolder);
1226 }
1227 if (opendialog.execute()) {
1228 gCurrentFolder = opendialog.getDirectory();
1229 loadDecals(opendialog.getFilename().text());
1230 }
1231 return 1;
1232}
1233
1234
1235long
1236GUIDialog_ViewSettings::onCmdLoadXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1237 FXFileDialog opendialog(this, TL("Load Decals"));
1238 opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1239 opendialog.setSelectMode(SELECTFILE_ANY);
1240 opendialog.setPatternList(SUMOXMLDefinitions::ViewSettingsFileExtensions.getMultilineString().c_str());
1241 if (gCurrentFolder.length() != 0) {
1242 opendialog.setDirectory(gCurrentFolder);
1243 }
1244 if (opendialog.execute()) {
1245 gCurrentFolder = opendialog.getDirectory();
1246 loadDecals(opendialog.getFilename().text());
1247 }
1248 return 1;
1249}
1250
1251
1252long
1253GUIDialog_ViewSettings::onCmdSaveXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1254 FXString file = MFXUtils::getFilename2Write(this, TL("Save Decals"),
1255 SUMOXMLDefinitions::XMLFileExtensions.getMultilineString().c_str(),
1257 if (file == "") {
1258 return 1;
1259 }
1260 try {
1261 OutputDevice& dev = OutputDevice::getDevice(file.text());
1262 dev.openTag("decals");
1263 saveDecals(dev);
1264 dev.closeTag();
1265 dev.close();
1266 } catch (IOError& e) {
1267 FXMessageBox::error(myParent, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1268 }
1269 return 1;
1270}
1271
1272
1273long
1274GUIDialog_ViewSettings::onCmdClearDecals(FXObject*, FXSelector, void* /*data*/) {
1275 // lock decals mutex
1276 myParent->getDecalsLockMutex().lock();
1277 // clear decals
1278 myParent->getDecals().clear();
1279 // update view
1280 myParent->update();
1281 // fill table again
1283 // unlock decals mutex
1284 myParent->getDecalsLockMutex().unlock();
1285 return 1;
1286}
1287
1288
1289long
1290GUIDialog_ViewSettings::onUpdImportSetting(FXObject* sender, FXSelector, void* ptr) {
1291 sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1292 return 1;
1293}
1294
1295
1296FXMatrix*
1298 std::vector<FXColorWell*>& colors,
1299 std::vector<FXRealSpinner*>& thresholds,
1300 std::vector<FXButton*>& buttons,
1301 FXCheckButton* interpolation,
1302 GUIColorScheme& scheme) {
1304 FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1305 colors.clear();
1306 thresholds.clear();
1307 buttons.clear();
1308 const bool fixed = scheme.isFixed();
1309 std::vector<RGBColor>::const_iterator colIt = scheme.getColors().begin();
1310 std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1311 std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1312 while (colIt != scheme.getColors().end()) {
1313 colors.push_back(new FXColorWell(m, MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1));
1314 if (fixed) {
1315 new FXLabel(m, nameIt->c_str());
1316 new FXLabel(m, "");
1317 new FXLabel(m, "");
1318 } else {
1319 const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1320 FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1321 threshDialer->setValue(*threshIt);
1322 thresholds.push_back(threshDialer);
1323 if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1324 threshDialer->disable();
1325 threshDialer->hide();
1326 buttons.push_back(GUIDesigns::buildFXButton(m, "", "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1327 buttons.back()->hide();
1328 buttons.push_back(GUIDesigns::buildFXButton(m, TL("No Data"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1329 buttons.back()->disable();
1330 } else {
1331 buttons.push_back(GUIDesigns::buildFXButton(m, TL("Add"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1332 buttons.push_back(GUIDesigns::buildFXButton(m, TL("Remove"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1333 if (scheme.getColors().size() == 1) {
1334 buttons.back()->disable();
1335 }
1336 }
1337 }
1338 colIt++;
1339 threshIt++;
1340 nameIt++;
1341 }
1342 interpolation->setCheck(scheme.isInterpolated());
1343 if (fixed) {
1344 interpolation->disable();
1345 } else {
1346 if (colors.size() > 1) {
1347 interpolation->enable();
1348 if (interpolation->getCheck() != FALSE) {
1349 thresholds.front()->enable();
1350 } else {
1351 thresholds.front()->disable();
1352 }
1353 } else {
1354 interpolation->disable();
1355 thresholds.front()->disable();
1356 }
1357 }
1358 return m;
1359}
1360
1361
1362FXMatrix*
1364 std::vector<FXRealSpinner*>& scales,
1365 std::vector<FXRealSpinner*>& thresholds,
1366 std::vector<FXButton*>& buttons,
1367 FXCheckButton* interpolation,
1368 GUIScaleScheme& scheme) {
1370 FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1371 scales.clear();
1372 thresholds.clear();
1373 buttons.clear();
1374 const bool fixed = scheme.isFixed();
1375 std::vector<double>::const_iterator scaleIt = scheme.getColors().begin();
1376 std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1377 std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1378 while (scaleIt != scheme.getColors().end()) {
1379 FXRealSpinner* scaleDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX);
1380 scaleDialer->setValue(*scaleIt);
1381 scales.push_back(scaleDialer);
1382 if (fixed) {
1383 new FXLabel(m, nameIt->c_str());
1384 new FXLabel(m, "");
1385 new FXLabel(m, "");
1386 } else {
1387 const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1388 FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1389 threshDialer->setValue(*threshIt);
1390 thresholds.push_back(threshDialer);
1391 if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1392 threshDialer->disable();
1393 threshDialer->hide();
1394 buttons.push_back(GUIDesigns::buildFXButton(m, "", "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1395 buttons.back()->hide();
1396 buttons.push_back(GUIDesigns::buildFXButton(m, TL("No Data"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1397 buttons.back()->disable();
1398 } else {
1399 buttons.push_back(GUIDesigns::buildFXButton(m, TL("Add"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1400 buttons.push_back(GUIDesigns::buildFXButton(m, TL("Remove"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1401 if (scheme.getColors().size() == 1) {
1402 buttons.back()->disable();
1403 }
1404 }
1405 }
1406 scaleIt++;
1407 threshIt++;
1408 nameIt++;
1409 }
1410 interpolation->setCheck(scheme.isInterpolated());
1411 if (fixed) {
1412 interpolation->disable();
1413 } else {
1414 if (scales.size() > 1) {
1415 interpolation->enable();
1416 if (interpolation->getCheck() != FALSE) {
1417 thresholds.front()->enable();
1418 } else {
1419 thresholds.front()->disable();
1420 }
1421 } else {
1422 interpolation->disable();
1423 thresholds.front()->disable();
1424 }
1425 }
1426 return m;
1427}
1428
1429
1430void
1433 if (doCreate) {
1434 m->create();
1435 }
1438 } else {
1440 }
1443 } else {
1445 }
1448 } else {
1450 }
1451 std::string activeSchemeName = myLaneEdgeColorMode->getText().text();
1452 std::string activeScaleSchemeName = myLaneEdgeScaleMode->getText().text();
1453 myParamKey->clearItems();
1454 myScalingParamKey->clearItems();
1456 myMeanDataID->hide();
1458 myParamKey->appendItem(mySettings->edgeParam.c_str());
1459 for (const std::string& attr : myParent->getEdgeLaneParamKeys(true)) {
1460 if (attr != mySettings->edgeParam) {
1461 myParamKey->appendItem(attr.c_str());
1462 }
1463 }
1464 myParamKey->enable();
1465 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) {
1466 myParamKey->appendItem(mySettings->laneParam.c_str());
1467 for (const std::string& attr : myParent->getEdgeLaneParamKeys(false)) {
1468 if (attr != mySettings->laneParam) {
1469 myParamKey->appendItem(attr.c_str());
1470 }
1471 }
1472 myParamKey->enable();
1473 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1474 myParamKey->appendItem(mySettings->edgeData.c_str());
1475 for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1476 if (attr != mySettings->edgeData) {
1477 myParamKey->appendItem(attr.c_str());
1478 }
1479 }
1480 myParamKey->enable();
1481 } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_LIVE) {
1482 if (mySettings->edgeDataID != "") {
1484 }
1485 for (const std::string& attr : myParent->getMeanDataIDs()) {
1486 if (attr != mySettings->edgeDataID) {
1487 myMeanDataID->appendIconItem(attr.c_str());
1488 }
1489 }
1490 if (myMeanDataID->getNumItems() > 0) {
1491 if (mySettings->edgeDataID == "") {
1493 }
1495 myMeanDataID->show();
1496 myParamKey->appendItem(mySettings->edgeData.c_str());
1497 for (const std::string& attr : myParent->getMeanDataAttrs(mySettings->edgeDataID)) {
1498 if (attr != mySettings->edgeData) {
1499 myParamKey->appendItem(attr.c_str());
1500 }
1501 }
1502 myParamKey->enable();
1503 }
1504 } else {
1505 myParamKey->disable();
1506 }
1507
1508 if (activeScaleSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1509 myScalingParamKey->appendItem(mySettings->edgeDataScaling.c_str());
1510 for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1511 if (attr != mySettings->edgeDataScaling) {
1512 myScalingParamKey->appendItem(attr.c_str());
1513 }
1514 }
1515 myScalingParamKey->enable();
1516 } else {
1517 myScalingParamKey->disable();
1518 }
1519
1520 myParamKey->setNumVisible(myParamKey->getNumItems());
1521 myScalingParamKey->setNumVisible(myScalingParamKey->getNumItems());
1522 myLaneColorSettingFrame->getParent()->recalc();
1523
1525 if (doCreate) {
1526 m->create();
1527 }
1528 myLaneScaleSettingFrame->getParent()->recalc();
1529
1531 if (doCreate) {
1532 m->create();
1533 }
1534 activeSchemeName = myVehicleColorMode->getText().text();
1537 myVehicleParamKey->enable();
1538 } else {
1539 myVehicleParamKey->disable();
1540 }
1541 myVehicleColorSettingFrame->getParent()->recalc();
1542
1544 if (doCreate) {
1545 m->create();
1546 }
1547 myVehicleScaleSettingFrame->getParent()->recalc();
1548 activeScaleSchemeName = myVehicleScaleMode->getText().text();
1549 if (activeScaleSchemeName == GUIVisualizationSettings::SCHEME_NAME_PARAM_NUMERICAL) {
1550 myVehicleScalingParamKey->enable();
1551 } else {
1552 myVehicleScalingParamKey->disable();
1553 }
1554
1555
1557 if (doCreate) {
1558 m->create();
1559 }
1560 myPersonColorSettingFrame->getParent()->recalc();
1562 if (doCreate) {
1563 m->create();
1564 }
1565 myContainerColorSettingFrame->getParent()->recalc();
1567 if (doCreate) {
1568 m->create();
1569 }
1570 myJunctionColorSettingFrame->getParent()->recalc();
1571 // POIs
1573 if (doCreate) {
1574 m->create();
1575 }
1576 myPOIColorSettingFrame->getParent()->recalc();
1577 // polygons
1579 if (doCreate) {
1580 m->create();
1581 }
1582 myPolyColorSettingFrame->getParent()->recalc();
1583
1584 // data
1585 if (mySettings->netedit) {
1588 } else {
1590 }
1592 if (doCreate) {
1593 m->create();
1594 }
1595 activeSchemeName = myDataColorMode->getText().text();
1597 myDataParamKey->clearItems();
1598 myDataParamKey->appendItem(mySettings->relDataAttr.c_str());
1599 for (const std::string& attr : myParent->getRelDataAttrs()) {
1600 if (attr != mySettings->relDataAttr) {
1601 myDataParamKey->appendItem(attr.c_str());
1602 }
1603 }
1604 myDataParamKey->enable();
1605 } else {
1606 myDataParamKey->disable();
1607 }
1608 myDataColorSettingFrame->getParent()->recalc();
1609
1610 // scaling
1612 if (doCreate) {
1613 m->create();
1614 }
1615 activeScaleSchemeName = myDataScaleMode->getText().text();
1617 myDataScaleParamKey->clearItems();
1618 myDataScaleParamKey->appendItem(mySettings->relDataScaleAttr.c_str());
1619 for (const std::string& attr : myParent->getRelDataAttrs()) {
1620 if (attr != mySettings->relDataScaleAttr) {
1621 myDataScaleParamKey->appendItem(attr.c_str());
1622 }
1623 }
1624 myDataScaleParamKey->enable();
1625 } else {
1626 myDataScaleParamKey->disable();
1627 }
1628 myDataScaleSettingFrame->getParent()->recalc();
1629 }
1630
1631 layout();
1632 update();
1633}
1634
1635
1636void
1638 myVehicleParamKey->clearItems();
1639 myVehicleTextParamKey->clearItems();
1640 myVehicleScalingParamKey->clearItems();
1641 myVehicleParamKey->appendItem(mySettings->vehicleParam.c_str());
1644 for (const std::string& attr : myParent->getVehicleParamKeys(false)) {
1645 myVehicleParamKey->appendItem(attr.c_str());
1646 myVehicleTextParamKey->appendItem(attr.c_str());
1647 myVehicleScalingParamKey->appendItem(attr.c_str());
1648 }
1649 myVehicleParamKey->setNumVisible(myVehicleParamKey->getNumItems());
1650 myVehicleTextParamKey->setNumVisible(myVehicleTextParamKey->getNumItems());
1651 myVehicleScalingParamKey->setNumVisible(myVehicleScalingParamKey->getNumItems());
1652}
1653
1654
1655void
1657 myPOITextParamKey->clearItems();
1658 myPOITextParamKey->appendItem(mySettings->poiTextParam.c_str());
1659 for (const std::string& attr : myParent->getPOIParamKeys()) {
1660 myPOITextParamKey->appendItem(attr.c_str());
1661 }
1662 myPOITextParamKey->setNumVisible(myPOITextParamKey->getNumItems());
1663}
1664
1665
1666std::string
1670
1671
1672void
1674 if (name.c_str() == mySchemeName->getItemText(mySchemeName->getCurrentItem())) {
1675 return;
1676 }
1677 for (int i = 0; i < mySchemeName->getNumItems(); ++i) {
1678 if (name.c_str() == mySchemeName->getItemText(i)) {
1680 onCmdNameChange(nullptr, 0, (void*)name.c_str());
1681 return;
1682 }
1683 }
1684}
1685
1686
1688 FXMatrix* parent,
1689 GUIDialog_ViewSettings* target,
1690 const std::string& title,
1691 const GUIVisualizationTextSettings& settings) {
1692 myCheck = new FXCheckButton(parent, title.c_str(), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1693 myCheck->setCheck(settings.showText);
1694 myMatrix0 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1695 mySelectedCheck = new FXCheckButton(myMatrix0, TL("Only for selected"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1696 mySelectedCheck->setCheck(settings.onlySelected);
1697 myConstSizeCheck = new FXCheckButton(myMatrix0, TL("constant text size"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1698 myConstSizeCheck->setCheck(settings.constSize);
1699 FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1700 new FXLabel(m1, TL("Size"), nullptr, GUIDesignViewSettingsLabel1);
1701 mySizeDial = new FXRealSpinner(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1702 mySizeDial->setRange(5, 1000);
1703 mySizeDial->setValue(settings.size);
1704 FXMatrix* m2 = new FXMatrix(parent, 4, GUIDesignViewSettingsMatrix5);
1705 new FXLabel(m2, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1707 new FXLabel(m2, TL("Background"), nullptr, GUIDesignViewSettingsLabel1);
1709}
1710
1711
1714 return GUIVisualizationTextSettings(myCheck->getCheck() != FALSE,
1715 mySizeDial->getValue(),
1716 MFXUtils::getRGBColor(myColorWell->getRGBA()),
1717 MFXUtils::getRGBColor(myBGColorWell->getRGBA()),
1718 myConstSizeCheck->getCheck() != FALSE,
1719 mySelectedCheck->getCheck() != FALSE);
1720}
1721
1722
1723void
1725 myCheck->setCheck(settings.showText);
1726 mySizeDial->setValue(settings.size);
1727 myColorWell->setRGBA(MFXUtils::getFXColor(settings.color));
1728 myBGColorWell->setRGBA(MFXUtils::getFXColor(settings.bgColor));
1729 myConstSizeCheck->setCheck(settings.constSize);
1730 mySelectedCheck->setCheck(settings.onlySelected);
1731}
1732
1733
1735 const GUIVisualizationSizeSettings& settings, GUIGlObjectType type):
1736 myDialogViewSettings(target),
1737 myType(type) {
1738 myCheck = new FXCheckButton(parent, TL("Draw with constant size when zoomed out"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1739 myCheck->setCheck(settings.constantSize);
1740 myCheckSelected = new FXCheckButton(parent, TL("Only for selected"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1741 myCheckSelected->setCheck(settings.constantSizeSelected);
1742 FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1743 new FXLabel(m1, TL("Minimum Size"), nullptr, GUIDesignViewSettingsLabel1);
1745 myMinSizeDial->setValue(settings.minSize);
1746 FXMatrix* m2 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1747 new FXLabel(m2, TL("Exaggerate by"), nullptr, GUIDesignViewSettingsLabel1);
1749 myExaggerateDial->setRange(0, 10000);
1750 myExaggerateDial->setValue(settings.exaggeration);
1751}
1752
1753
1757 myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1758 myCheck->getCheck() != FALSE,
1759 myCheckSelected->getCheck() != FALSE);
1760}
1761
1762
1763void
1765 myCheck->setCheck(settings.constantSize);
1766 myCheckSelected->setCheck(settings.constantSizeSelected);
1767 myMinSizeDial->setValue(settings.minSize);
1768 myExaggerateDial->setValue(settings.exaggeration);
1769}
1770
1771
1772long
1773GUIDialog_ViewSettings::SizePanel::onCmdSizeChange(FXObject* obj, FXSelector sel, void* ptr) {
1774 // mark boundaries for recomputing
1776 // continue as a normal change
1777 return myDialogViewSettings->onCmdColorChange(obj, sel, ptr);
1778}
1779
1780
1782 FXComposite* parent,
1783 GUIDialog_ViewSettings* target,
1784 const GUIVisualizationRainbowSettings& settings) {
1785 FXMatrix* matrixRainbow = new FXMatrix(parent, 9, GUIDesignViewSettingsMatrix3);
1786 myColorRainbow = GUIDesigns::buildFXButton(matrixRainbow, TL("Recalibrate Rainbow"), "", "", nullptr, target, MID_SIMPLE_VIEW_COLORCHANGE,
1787 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
1788 myRainbowStyle = new MFXComboBoxIcon(matrixRainbow, nullptr, false, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsComboBox1);
1790 myRainbowStyle->appendIconItem(item.first.c_str());
1791 }
1792 myRainbowStyle->setCurrentItem(settings.rainbowScheme);
1793 myHideMinCheck = new FXCheckButton(matrixRainbow, TL("min"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1794 myHideMinCheck->setCheck(settings.hideMin);
1795 myMinThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1796 myMinThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1797 myMinThreshold->setValue(settings.minThreshold);
1798 myHideMaxCheck = new FXCheckButton(matrixRainbow, TL("max"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1799 myHideMaxCheck->setCheck(settings.hideMax);
1800 myMaxThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1801 myMaxThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1802 myMaxThreshold->setValue(settings.maxThreshold);
1803 mySetNeutral = new FXCheckButton(matrixRainbow, TL("center"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1804 mySetNeutral->setCheck(settings.setNeutral);
1805 myNeutralThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1806 myNeutralThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1807 myNeutralThreshold->setValue(settings.neutralThreshold);
1808 myFixRange = new FXCheckButton(matrixRainbow, TL("fix range"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1809 myFixRange->setCheck(settings.fixRange);
1810}
1811
1812
1815 GUIVisualizationRainbowSettings res(myHideMinCheck->getCheck() != FALSE,
1816 myMinThreshold->getValue(),
1817 myHideMaxCheck->getCheck() != FALSE,
1818 myMaxThreshold->getValue(),
1819 mySetNeutral->getCheck() != FALSE,
1820 myNeutralThreshold->getValue(),
1821 myFixRange->getCheck() != FALSE,
1822 myRainbowStyle->getCurrentItem());
1823 std::string sName = myRainbowStyle->getItemText(myRainbowStyle->getCurrentItem());
1825 return res;
1826}
1827
1828
1829void
1831 myHideMinCheck->setCheck(settings.hideMin);
1832 myMinThreshold->setValue(settings.minThreshold);
1833 myHideMaxCheck->setCheck(settings.hideMax);
1834 myMaxThreshold->setValue(settings.maxThreshold);
1835 mySetNeutral->setCheck(settings.setNeutral);
1836 myNeutralThreshold->setValue(settings.neutralThreshold);
1837 myFixRange->setCheck(settings.fixRange);
1838 myRainbowStyle->setCurrentItem(settings.rainbowScheme);
1839}
1840
1841void
1842GUIDialog_ViewSettings::buildHeader(FXVerticalFrame* contentFrame) {
1843 FXHorizontalFrame* horizontalFrame = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame1);
1844 mySchemeName = new MFXComboBoxIcon(horizontalFrame, nullptr, true, GUIDesignComboBoxVisibleItems,
1846 for (const auto& name : gSchemeStorage.getNames()) {
1847 const int index = mySchemeName->appendIconItem(name.c_str());
1848 if (name == mySettings->name) {
1849 mySchemeName->setCurrentItem((FXint)index);
1850 }
1851 }
1852
1853 GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Save the setting to registry"), GUIIconSubSys::getIcon(GUIIcon::SAVE_DATABASE), this, MID_SIMPLE_VIEW_SAVE, GUIDesignButtonToolbar);
1854 GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Remove the setting from registry"), GUIIconSubSys::getIcon(GUIIcon::REMOVEDB), this, MID_SIMPLE_VIEW_DELETE, GUIDesignButtonToolbar);
1855 GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Export setting to file"), GUIIconSubSys::getIcon(GUIIcon::SAVE), this, MID_SIMPLE_VIEW_EXPORT, GUIDesignButtonToolbar);
1856 GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Load setting from file"), GUIIconSubSys::getIcon(GUIIcon::OPEN), this, MID_SIMPLE_VIEW_IMPORT, GUIDesignButtonToolbar);
1857
1858 new FXVerticalSeparator(horizontalFrame);
1859 new FXLabel(horizontalFrame, TL("Export includes:"), nullptr, GUIDesignViewSettingsLabel1);
1860 mySaveViewPort = new FXCheckButton(horizontalFrame, TL("Viewport"));
1861 mySaveDelay = new FXCheckButton(horizontalFrame, TL("Delay"));
1862 mySaveDecals = new FXCheckButton(horizontalFrame, TL("Decals"));
1863 mySaveBreakpoints = new FXCheckButton(horizontalFrame, TL("Breakpoints"));
1864 if (mySettings->netedit) {
1865 mySaveBreakpoints->disable();
1866 }
1867}
1868
1869
1870void
1872 // tab for the background
1873 new FXTabItem(tabbook, TL("Background"), nullptr, GUIDesignViewSettingsTabItemBook1);
1874 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1875 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1876
1877 FXMatrix* matrixColor = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
1878 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1880
1881 FXVerticalFrame* verticalFrameDecals = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame3);
1882 new FXLabel(verticalFrameDecals, TL("Decals:"));
1883 myDecalsTable = new MFXDecalsTable(this, verticalFrameDecals);
1884 FXHorizontalFrame* horizontalFrameButtonsDecals = new FXHorizontalFrame(verticalFrameDecals, GUIDesignViewSettingsHorizontalFrame2);
1885 GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Load XML Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_LOAD_DECALS_XML, GUIDesignViewSettingsButton1);
1886 GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Save XML Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_SAVE_DECALS_XML, GUIDesignViewSettingsButton1);
1887 GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Clear Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_CLEAR_DECALS, GUIDesignViewSettingsButton1);
1888
1889 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1890
1891 FXMatrix* matrixGrid = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1892 myShowGrid = new FXCheckButton(matrixGrid, TL("Toggle grid"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1893 myShowGrid->setCheck(mySettings->showGrid);
1894 new FXLabel(matrixGrid, "");
1895 FXMatrix* matrixGridX = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1896 new FXLabel(matrixGridX, TL("x-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1897 myGridXSizeDialer = new FXRealSpinner(matrixGridX, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1898 myGridXSizeDialer->setRange(1, 10000);
1900 FXMatrix* matrixGridY = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1901 new FXLabel(matrixGridY, TL("y-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1902 myGridYSizeDialer = new FXRealSpinner(matrixGridY, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1903 myGridYSizeDialer->setRange(1, 10000);
1905}
1906
1907
1908void
1910 new FXTabItem(tabbook, TL("Streets"), nullptr, GUIDesignViewSettingsTabItemBook1);
1911 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1912 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1913 // ... color settings
1914 FXVerticalFrame* verticalFrameColor = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1915 FXMatrix* matrixColor = new FXMatrix(verticalFrameColor, 5, GUIDesignViewSettingsMatrix3);
1916 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1917 myLaneEdgeColorMode = new MFXComboBoxIcon(matrixColor, nullptr, true, GUIDesignComboBoxVisibleItems,
1919 myLaneColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1920 myLaneColorSettingFrame = new FXVerticalFrame(verticalFrameColor, GUIDesignViewSettingsVerticalFrame4);
1921 myMeanDataID = new MFXComboBoxIcon(matrixColor, nullptr, false, GUIDesignComboBoxVisibleItems,
1924 myMeanDataID->hide();
1925 myParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1926 myParamKey->setEditable(true);
1927 myParamKey->disable();
1928
1929 // rainbow settings
1930 myEdgeRainbowPanel = new RainbowPanel(verticalFrameColor, this, mySettings->edgeValueRainBow);
1931
1932 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1933 // ... scale settings
1934 FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1935 FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 5, GUIDesignViewSettingsMatrix3);
1936 new FXLabel(matrixScale, TL("Scale width"), nullptr, GUIDesignViewSettingsLabel1);
1937 myLaneEdgeScaleMode = new MFXComboBoxIcon(matrixScale, nullptr, true, GUIDesignComboBoxVisibleItems,
1939 myLaneScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1940 myLaneScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
1941 myScalingParamKey = new FXComboBox(matrixScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1942 myScalingParamKey->setEditable(true);
1943 myScalingParamKey->disable();
1944
1948 } else {
1951 }
1952
1953 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1954 FXMatrix* matrixLanes = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1955
1956 myShowBikeMarkings = new FXCheckButton(matrixLanes, TL("Show bike markings"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1958 myShowLaneDecals = new FXCheckButton(matrixLanes, TL("Show turning arrows"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1960
1961 myShowLinkRules = new FXCheckButton(matrixLanes, TL("Show right-of-way rules"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1963 myRealisticLinkRules = new FXCheckButton(matrixLanes, TL("Realistic stop line colors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1965
1966 myShowLaneBorders = new FXCheckButton(matrixLanes, TL("Show lane borders"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1968 myShowLaneDirection = new FXCheckButton(matrixLanes, TL("Show lane direction"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1970
1971 myHideMacroConnectors = new FXCheckButton(matrixLanes, TL("Hide macro connectors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1973 myShowSublanes = new FXCheckButton(matrixLanes, TL("Show sublanes"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1975
1976 myShowRails = new FXCheckButton(matrixLanes, TL("Show rails"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1977 myShowRails->setCheck(mySettings->showRails);
1978
1979 mySpreadSuperposed = new FXCheckButton(matrixLanes, TL("Spread bidirectional railways/roads"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1980 mySpreadSuperposed->setHelpText(TL("Make both directional edges for a bidirectional railways or roads visible"));
1982
1983 mySecondaryShape = new FXCheckButton(matrixLanes, TL("Secondary shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1985 new FXLabel(matrixLanes, " ", nullptr, GUIDesignViewSettingsLabel1);
1986 if (!OptionsCont::getOptions().exists("alternative-net-file") ||
1987 !OptionsCont::getOptions().isSet("alternative-net-file")) {
1988 mySecondaryShape->disable();
1989 }
1990
1991 FXMatrix* tmp0 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1992 new FXLabel(tmp0, TL("Exaggerate width by"), nullptr, GUIDesignViewSettingsLabel1);
1994 myLaneWidthUpscaleDialer->setRange(0, 1000000);
1996
1997 FXMatrix* tmp1 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1998 new FXLabel(tmp1, TL("Minimum size"), nullptr, GUIDesignViewSettingsLabel1);
2000 myLaneMinWidthDialer->setRange(0, 1000000);
2002
2003 // edge name
2004 myEdgeNamePanel = new NamePanel(matrixLanes, this, TL("Show edge id"), mySettings->edgeName);
2005 myStreetNamePanel = new NamePanel(matrixLanes, this, TL("Show street name"), mySettings->streetName);
2006 myEdgeValuePanel = new NamePanel(matrixLanes, this, TL("Show edge color value"), mySettings->edgeValue);
2007 myEdgeScaleValuePanel = new NamePanel(matrixLanes, this, TL("Show edge scale value"), mySettings->edgeScaleValue);
2008}
2009
2010
2011void
2013 new FXTabItem(tabbook, TL("Vehicles"), nullptr, GUIDesignViewSettingsTabItemBook1);
2014 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2015 FXVerticalFrame* verticalframe = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2016
2017 FXMatrix* matrixShowAs = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix3);
2018 new FXLabel(matrixShowAs, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
2019 myVehicleShapeDetail = new MFXComboBoxIcon(matrixShowAs, nullptr, false, GUIDesignComboBoxVisibleItems,
2021 myVehicleShapeDetail->appendIconItem(TL("'triangles'"));
2023 myVehicleShapeDetail->appendIconItem(TL("'simple shapes'"));
2024 myVehicleShapeDetail->appendIconItem(TL("'raster images'"));
2025 myVehicleShapeDetail->appendIconItem(TL("'circles'"));
2027
2028 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
2029
2030 FXMatrix* matrixColor = new FXMatrix(verticalframe, 4, GUIDesignViewSettingsMatrix3);
2031 new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2032 myVehicleColorMode = new MFXComboBoxIcon(matrixColor, nullptr, true, GUIDesignComboBoxVisibleItems,
2035 myVehicleColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2036 myVehicleParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
2037 myVehicleParamKey->setEditable(true);
2038 myVehicleParamKey->disable();
2039
2040 // rainbow settings
2042
2043 myVehicleColorSettingFrame = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame4);
2044 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
2045
2046 // vehicle scale settings
2047 FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame6);
2048 FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 4, GUIDesignViewSettingsMatrix3);
2049 new FXLabel(matrixScale, TL("Scale size"), nullptr, GUIDesignViewSettingsLabel1);
2050 myVehicleScaleMode = new MFXComboBoxIcon(matrixScale, nullptr, true, GUIDesignComboBoxVisibleItems,
2052 myVehicleScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2053 myVehicleScalingParamKey = new FXComboBox(matrixScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
2054 myVehicleScalingParamKey->setEditable(true);
2055 myVehicleScalingParamKey->disable();
2056 myVehicleScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
2058 new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
2059
2060 FXMatrix* matrixVehicle = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
2061 myVehicleNamePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle id"), mySettings->vehicleName);
2062 myVehicleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle color value"), mySettings->vehicleValue);
2063 myVehicleScaleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle scale value"), mySettings->vehicleScaleValue);
2064 myVehicleTextPanel = new NamePanel(matrixVehicle, this, TL("Show vehicle text param"), mySettings->vehicleText);
2066 myVehicleTextParamKey->setEditable(true);
2067 //new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
2068
2069 FXMatrix* matrixShow = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
2070 myShowBlinker = new FXCheckButton(matrixShow, TL("Show blinker / brake lights"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2072 myShowMinGap = new FXCheckButton(matrixShow, TL("Show minimum gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2074 myShowBrakeGap = new FXCheckButton(matrixShow, TL("Show brake gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2076 myShowBTRange = new FXCheckButton(matrixShow, TL("Show Bluetooth range"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2078 myShowRouteIndex = new FXCheckButton(matrixShow, TL("Show route index"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2080 myScaleLength = new FXCheckButton(matrixShow, TL("Scale length with geometry"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2082 const std::string parkingInfo = mySettings->netedit ? TL("Show stopping info") : TL("Show parking info");
2083 myShowParkingInfo = new FXCheckButton(matrixShow, parkingInfo.c_str(), this, MID_SIMPLE_VIEW_COLORCHANGE);
2085 myShowChargingInfo = new FXCheckButton(matrixShow, TL("Show charging info"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2087 myDrawReversed = new FXCheckButton(matrixShow, TL("Draw reversed vehicles in reverse"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2089 //new FXLabel(matrixShow, " ", nullptr, GUIDesignViewSettingsLabel1);
2090 //myShowLaneChangePreference = new FXCheckButton(matrixShow, TL("Show lane change preference"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2091 //myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
2092 //tmpc = new FXCheckButton(matrixShow, TL("Show needed headway"), 0 ,0);
2093 //tmpc->disable();
2094
2095 //new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
2096
2097 FXMatrix* matrixSize = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix1);
2099}
2100
2101
2102void
2104 new FXTabItem(tabbook, TL("Persons"), nullptr, GUIDesignViewSettingsTabItemBook1);
2105 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2106 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2107
2108 FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
2109 new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
2112 myPersonShapeDetail->appendIconItem(TL("'triangles'"));
2113 myPersonShapeDetail->appendIconItem(TL("'circles'"));
2114 myPersonShapeDetail->appendIconItem(TL("'simple shapes'"));
2115 myPersonShapeDetail->appendIconItem(TL("'raster images'"));
2117
2118 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2119
2120 FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2121 new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2125 myPersonColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2126
2127 myPersonColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2128
2129 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2130
2131 FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2132 myPersonNamePanel = new NamePanel(m103, this, TL("Show person id"), mySettings->personName);
2133 myPersonValuePanel = new NamePanel(m103, this, TL("Show person color value"), mySettings->personValue);
2134
2135 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2136
2137 FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2139
2140 FXMatrix* m105 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
2141 myShowPedestrianNetwork = new FXCheckButton(m105, TL("Show JuPedSim pedestrian network"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2144#ifdef JPS_VERSION
2145 if (mySettings->netedit) {
2146#endif
2147 myShowPedestrianNetwork->disable();
2148 myPedestrianNetworkColor->disable();
2149#ifdef JPS_VERSION
2150 }
2151#endif
2152}
2153
2154
2155void
2157 new FXTabItem(tabbook, TL("Containers"), nullptr, GUIDesignViewSettingsTabItemBook1);
2158 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2159 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2160
2161 FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
2162 new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
2165 myContainerShapeDetail->appendIconItem(TL("'triangles'"));
2167 myContainerShapeDetail->appendIconItem(TL("'simple shapes'"));
2168 myContainerShapeDetail->appendIconItem(TL("'raster images'"));
2170
2171 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2172
2173 FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2174 new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2178 myContainerColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2179
2180 myContainerColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2181
2182 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2183
2184 FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2185 myContainerNamePanel = new NamePanel(m103, this, TL("Show container id"), mySettings->containerName);
2186
2187 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2188
2189 FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2191}
2192
2193
2194void
2196 new FXTabItem(tabbook, TL("Junctions"), nullptr, GUIDesignViewSettingsTabItemBook1);
2197 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2198 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2199 FXMatrix* m41 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2200 new FXLabel(m41, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2205
2206 myJunctionColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2208
2209 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2210 FXMatrix* m42 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2212 myDrawJunctionShape = new FXCheckButton(m42, TL("Draw junction shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2214 myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, TL("Draw crossings/walkingareas"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2216 myShowLane2Lane = new FXCheckButton(m42, TL("Show lane to lane connections"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2218 new FXLabel(m42, " ", nullptr, GUIDesignViewSettingsLabel1);
2219
2220 myTLIndexPanel = new NamePanel(m42, this, TL("Show link tls index"), mySettings->drawLinkTLIndex);
2221 myJunctionIndexPanel = new NamePanel(m42, this, TL("Show link junction index"), mySettings->drawLinkJunctionIndex);
2222 myJunctionIDPanel = new NamePanel(m42, this, TL("Show junction id"), mySettings->junctionID);
2223 myInternalJunctionNamePanel = new NamePanel(m42, this, TL("Show internal junction id"), mySettings->internalJunctionName);
2224 myInternalEdgeNamePanel = new NamePanel(m42, this, TL("Show internal edge id"), mySettings->internalEdgeName);
2225 myCwaEdgeNamePanel = new NamePanel(m42, this, TL("Show crossing and walkingarea id"), mySettings->cwaEdgeName);
2226 myTLSPhaseIndexPanel = new NamePanel(m42, this, TL("Show traffic light phase index"), mySettings->tlsPhaseIndex);
2227 myTLSPhaseNamePanel = new NamePanel(m42, this, TL("Show traffic light phase name"), mySettings->tlsPhaseName);
2228 myJunctionNamePanel = new NamePanel(m42, this, TL("Show junction name"), mySettings->junctionName);
2229}
2230
2231
2232void
2234 new FXTabItem(tabbook, TL("Additional"), nullptr, GUIDesignViewSettingsTabItemBook1);
2235 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2236 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2237 // IDs
2238 FXMatrix* matrixIDs = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2239 myAddNamePanel = new NamePanel(matrixIDs, this, TL("Show object id"), mySettings->addName);
2240 myAddFullNamePanel = new NamePanel(matrixIDs, this, TL("Show full name"), mySettings->addFullName);
2241 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2242 //Sizes
2243 FXMatrix* matrixSizes = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2245 // color
2246 FXMatrix* matrixColor = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2247 new FXLabel(matrixColor, TL("StoppingPlace"), nullptr, GUIDesignViewSettingsLabel1);
2248 new FXLabel(matrixColor, TL("body"), nullptr, GUIDesignViewSettingsLabel1);
2249 new FXLabel(matrixColor, TL("sign"), nullptr, GUIDesignViewSettingsLabel1);
2250 new FXLabel(matrixColor, "busStops", nullptr, GUIDesignViewSettingsLabel1);
2253 new FXLabel(matrixColor, "trainStops", nullptr, GUIDesignViewSettingsLabel1);
2256 new FXLabel(matrixColor, "containerStops", nullptr, GUIDesignViewSettingsLabel1);
2259 new FXLabel(matrixColor, "chargingStations", nullptr, GUIDesignViewSettingsLabel1);
2262}
2263
2264
2265void
2267 new FXTabItem(tabbook, TL("Demand"), nullptr, GUIDesignViewSettingsTabItemBook1);
2268 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2269 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2270 // elements
2271 FXMatrix* demandMatrix = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2272 new FXLabel(demandMatrix, TL("element"), nullptr, GUIDesignViewSettingsLabel1);
2273 new FXLabel(demandMatrix, TL("color"), nullptr, GUIDesignViewSettingsLabel1);
2274 new FXLabel(demandMatrix, TL("width"), nullptr, GUIDesignViewSettingsLabel1);
2275 new FXLabel(demandMatrix, "trips", nullptr, GUIDesignViewSettingsLabel1);
2277 myTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2279 new FXLabel(demandMatrix, "personTrips", nullptr, GUIDesignViewSettingsLabel1);
2281 myPersonTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2283 new FXLabel(demandMatrix, "walks", nullptr, GUIDesignViewSettingsLabel1);
2285 myWalkWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2287 new FXLabel(demandMatrix, "rides", nullptr, GUIDesignViewSettingsLabel1);
2289 myRideWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2291 new FXLabel(demandMatrix, "transport", nullptr, GUIDesignViewSettingsLabel1);
2293 myTransportWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2295 new FXLabel(demandMatrix, "tranship", nullptr, GUIDesignViewSettingsLabel1);
2297 myTranshipWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2299 // stops
2300 FXMatrix* stopMatrix = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2301 new FXLabel(stopMatrix, "stop", nullptr, GUIDesignViewSettingsLabel1);
2303 new FXLabel(stopMatrix, "waypoint", nullptr, GUIDesignViewSettingsLabel1);
2305 new FXLabel(stopMatrix, "stop (persons)", nullptr, GUIDesignViewSettingsLabel1);
2307 new FXLabel(stopMatrix, "stop (containers)", nullptr, GUIDesignViewSettingsLabel1);
2309}
2310
2311
2312void
2314 new FXTabItem(tabbook, TL("POIs"), nullptr, GUIDesignViewSettingsTabItemBook1);
2315 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2316 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2317
2318 FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2319 new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2323 myPOIColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2324 myPOIColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2325
2326 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2327
2328 FXMatrix* m61 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2329
2330 new FXLabel(m61, TL("POI detail"), nullptr, GUIDesignViewSettingsLabel1);
2332 myPoiDetail->setRange(3, 100);
2333 myPoiDetail->setValue(mySettings->poiDetail);
2334
2335 myPOIUseCustomLayer = new FXCheckButton(m61, TL("Custom Layer"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2338 myPOICustomLayer->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
2340
2341 myPOINamePanel = new NamePanel(m61, this, TL("Show poi id"), mySettings->poiName);
2342 myPOITypePanel = new NamePanel(m61, this, TL("Show poi type"), mySettings->poiType);
2343 myPOITextPanel = new NamePanel(m61, this, TL("Show poi text param"), mySettings->poiText);
2345 myPOITextParamKey->setEditable(true);
2346
2347 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2348
2349 FXMatrix* m62 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2351}
2352
2353
2354void
2356 new FXTabItem(tabbook, TL("Polygons"), nullptr, GUIDesignViewSettingsTabItemBook1);
2357 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2358 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2359
2360 FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2361 new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2365 myPolyColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2366 myPolyColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2367
2368 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2369
2370 FXMatrix* m91 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2371
2372 myPolyUseCustomLayer = new FXCheckButton(m91, TL("Custom Layer"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2375 myPolyCustomLayer->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
2377
2378 myPolyNamePanel = new NamePanel(m91, this, TL("Show polygon id"), mySettings->polyName);
2379 myPolyTypePanel = new NamePanel(m91, this, TL("Show polygon types"), mySettings->polyType);
2380 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2381
2383}
2384
2385
2386void
2388 new FXTabItem(tabbook, TL("Selection"), nullptr, GUIDesignViewSettingsTabItemBook1);
2389 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2390 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2391
2392 FXMatrix* m102 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2393 new FXLabel(m102, TL("Default Selection Color"), nullptr, GUIDesignViewSettingsLabel1);
2394 new FXLabel(m102, "", nullptr, GUIDesignViewSettingsLabel1);
2395
2396 new FXLabel(m102, TL("Miscellaneous"), nullptr, GUIDesignViewSettingsLabel1);
2398 new FXLabel(m102, "Edge", nullptr, GUIDesignViewSettingsLabel1);
2400 new FXLabel(m102, "Lane Edge", nullptr, GUIDesignViewSettingsLabel1);
2402 new FXLabel(m102, "Connection", nullptr, GUIDesignViewSettingsLabel1);
2404 new FXLabel(m102, "Prohibition", nullptr, GUIDesignViewSettingsLabel1);
2406 new FXLabel(m102, "Crossing", nullptr, GUIDesignViewSettingsLabel1);
2408 new FXLabel(m102, "Additional", nullptr, GUIDesignViewSettingsLabel1);
2410 new FXLabel(m102, "Route", nullptr, GUIDesignViewSettingsLabel1);
2412 new FXLabel(m102, "Vehicle", nullptr, GUIDesignViewSettingsLabel1);
2414 new FXLabel(m102, "Person", nullptr, GUIDesignViewSettingsLabel1);
2416 new FXLabel(m102, "PersonPlan", nullptr, GUIDesignViewSettingsLabel1);
2418 new FXLabel(m102, "edgeData", nullptr, GUIDesignViewSettingsLabel1);
2420}
2421
2422
2423void
2425 new FXTabItem(tabbook, TL("Data"), nullptr, GUIDesignViewSettingsTabItemBook1);
2426 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2427 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2428 // ... color settings
2429 FXVerticalFrame* verticalFrame2 = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
2430 FXMatrix* m111 = new FXMatrix(verticalFrame2, 4, GUIDesignViewSettingsMatrix3);
2431 new FXLabel(m111, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2434 myDataColorInterpolation = new FXCheckButton(m111, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2435 myDataColorSettingFrame = new FXVerticalFrame(verticalFrame2, GUIDesignViewSettingsVerticalFrame4);
2436 myDataParamKey = new FXComboBox(m111, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxFixed(100));
2437 myDataParamKey->setEditable(true);
2438 myDataParamKey->disable();
2440
2441 // rainbow settings
2442 myDataRainbowPanel = new RainbowPanel(verticalFrame2, this, mySettings->dataValueRainBow);
2443
2444 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2445
2446 // data scale settings
2447 FXVerticalFrame* verticalFrameDataScale = new FXVerticalFrame(verticalFrame2, GUIDesignViewSettingsVerticalFrame6);
2448 FXMatrix* matrixDataScale = new FXMatrix(verticalFrameDataScale, 4, GUIDesignViewSettingsMatrix3);
2449 new FXLabel(matrixDataScale, TL("Scale size"), nullptr, GUIDesignViewSettingsLabel1);
2450 myDataScaleMode = new MFXComboBoxIcon(matrixDataScale, nullptr, true, GUIDesignComboBoxVisibleItems,
2452 myDataScaleInterpolation = new FXCheckButton(matrixDataScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2453 myDataScaleParamKey = new FXComboBox(matrixDataScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
2454 myDataScaleParamKey->setEditable(true);
2455 myDataScaleParamKey->disable();
2456 myDataScaleSettingFrame = new FXVerticalFrame(verticalFrameDataScale, GUIDesignViewSettingsVerticalFrame4);
2458 new FXHorizontalSeparator(verticalFrame2, GUIDesignHorizontalSeparator);
2459
2460 FXMatrix* m112 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2461
2462 new FXLabel(m112, TL("Exaggerate edgeRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2464 myEdgeRelationUpscaleDialer->setRange(0, 1000000);
2466
2467 new FXLabel(m112, TL("Exaggerate tazRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2469 myTazRelationUpscaleDialer->setRange(0, 1000000);
2471
2472 // text decoration
2473 myDataValuePanel = new NamePanel(m112, this, TL("Show data color value"), mySettings->dataValue);
2474}
2475
2476
2477void
2479 new FXTabItem(tabbook, TL("Legend"), nullptr, GUIDesignViewSettingsTabItemBook1);
2480 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2481 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2482
2483 FXMatrix* m72 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2484 myShowSizeLegend = new FXCheckButton(m72, TL("Show Size Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2486 new FXLabel(m72, "");
2487 myShowColorLegend = new FXCheckButton(m72, TL("Show Edge Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2489 new FXLabel(m72, "");
2490 myShowVehicleColorLegend = new FXCheckButton(m72, TL("Show Vehicle Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2492 new FXLabel(m72, "");
2493}
2494
2495
2496void
2498 new FXTabItem(tabbook, "openGL", nullptr, GUIDesignViewSettingsTabItemBook1);
2499 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2500 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2501
2502 FXMatrix* m80 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2503 myTrueZ = new FXCheckButton(m80, "Draw all objects at their true Z-level", this, MID_SIMPLE_VIEW_COLORCHANGE);
2504 myTrueZ->setCheck(mySettings->trueZ);
2505 FXMatrix* m81 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2506 new FXLabel(m81, TL("Combobox max rows"), nullptr, GUIDesignViewSettingsLabel1);
2507 myComboRows = new FXRealSpinner(m81, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2509 FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2510 myDisableHideByZoom = new FXCheckButton(m82, TL("Disable hide by zoom"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2511 myDisableHideByZoom->setHelpText(TL("Disable hiding edges with high zoom out"));
2513 FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2514 myDither = new FXCheckButton(m83, TL("Dither"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2515 myDither->setCheck(mySettings->dither);
2516 FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2517 myFPS = new FXCheckButton(m84, "FPS", this, MID_SIMPLE_VIEW_COLORCHANGE);
2518 myFPS->setCheck(mySettings->fps);
2519 FXMatrix* m85 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2520 myDrawBoundaries = new FXCheckButton(m85, TL("Draw boundaries"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2522 FXMatrix* m86 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2523 myForceDrawForRectangleSelection = new FXCheckButton(m86, TL("Force draw for rectangle selection"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2525 FXMatrix* m87 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2526 myDisableDottedContours = new FXCheckButton(m87, TL("Disable dotted contours during selection/deletion"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2528 FXMatrix* m88 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2529 myRecalculateBoundaries = GUIDesigns::buildFXButton(m88, TL("Recalculate boundaries"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
2530 (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2531 FXMatrix* m89 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2532 myGeometryIndicesPanel = new NamePanel(m89, this, TL("Show geometry point indices"), mySettings->geometryIndices);
2533}
2534
2535
2536void
2538 myFrame3D = new FXTabItem(tabbook, TL("3D view"), nullptr, GUIDesignViewSettingsTabItemBook1);
2539 FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2540 FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2541
2542 FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2543 myIgnoreColorSchemeFor3DVehicles = new FXCheckButton(m82, TL("Ignore color scheme for vehicles"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2545 myShow3DTLSLinkMarkers = new FXCheckButton(m82, TL("Show TLS link markers"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2547 //FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2548 myShow3DTLSDomes = new FXCheckButton(m82, TL("Show domes around TLS models from decals"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2550 //FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2551 myGenerate3DTLSModels = new FXCheckButton(m82, TL("Show auto-generated TLS models"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2553 myShow3DHeadUpDisplay = new FXCheckButton(m82, TL("Show head-up display"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2555
2556 new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2557
2558 FXMatrix* m2 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2559 new FXLabel(m2, TL("Sun brightness"), nullptr, GUIDesignViewSettingsLabel1);
2561 myLight3DFactor->setRange(0, 255);
2563 /*
2564 new FXLabel(m2, "Ambient", nullptr, GUIDesignViewSettingsLabel1);
2565 myAmbient3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->ambient3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2566 myAmbient3DLight->setOpaqueOnly(true);
2567 new FXLabel(m2, "Diffuse", nullptr, GUIDesignViewSettingsLabel1);
2568 myDiffuse3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->diffuse3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2569 myDiffuse3DLight->setOpaqueOnly(true);
2570 */
2571 new FXLabel(m2, TL("Sky color"), nullptr, GUIDesignViewSettingsLabel1);
2573 mySkyColor->setOpaqueOnly(true);
2574
2575#ifdef HAVE_OSG
2577#else
2578 myFrame3D->disable();
2579#endif
2580}
2581
2582
2583void
2584GUIDialog_ViewSettings::buildButtons(FXVerticalFrame* contentFrame) {
2585 FXHorizontalFrame* horizontalFrameButtons = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame2);
2586 FXButton* OK = GUIDesigns::buildFXButton(horizontalFrameButtons, TL("&OK"), "", "", nullptr, this, MID_SETTINGS_OK, GUIDesignViewSettingsButton2);
2587 GUIDesigns::buildFXButton(horizontalFrameButtons, TL("&Cancel"), "", "", nullptr, this, MID_SETTINGS_CANCEL, GUIDesignViewSettingsButton3);
2588 OK->setFocus();
2589}
2590
2591/****************************************************************************/
long long int SUMOTime
Definition GUI.h:36
@ MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
Definition GUIAppEnum.h:633
@ MID_SIMPLE_VIEW_CLEAR_DECALS
For the clear-decals - button.
Definition GUIAppEnum.h:649
@ MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
Definition GUIAppEnum.h:635
@ MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
Definition GUIAppEnum.h:641
@ MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
Definition GUIAppEnum.h:639
@ MID_SIMPLE_VIEW_DELETE
For the delete - button.
Definition GUIAppEnum.h:637
@ MID_SIMPLE_VIEW_LOAD_DECALS_XML
For the load-decals - button.
Definition GUIAppEnum.h:645
@ MID_SIMPLE_VIEW_LOAD_DECAL
For the load-decals - button.
Definition GUIAppEnum.h:643
@ MID_SETTINGS_OK
Ok-button was pushed.
Definition GUIAppEnum.h:553
@ MID_SETTINGS_CANCEL
Cancel-button was pushed.
Definition GUIAppEnum.h:555
@ MID_SIMPLE_VIEW_SIZECHANGE
Informs the dialog about a size value's change.
Definition GUIAppEnum.h:631
@ MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
Definition GUIAppEnum.h:629
@ MID_SIMPLE_VIEW_SAVE_DECALS_XML
For the save-decals - button.
Definition GUIAppEnum.h:647
GUICompleteSchemeStorage gSchemeStorage
#define GUIDesignViewSettingsColorWell2
Definition GUIDesigns.h:616
#define GUIDesignViewSettingsMatrix3
Definition GUIDesigns.h:573
#define GUIDesignViewSettingsMainDialog
Definition GUIDesigns.h:544
#define GUIDesignViewSettingsMatrix5
Definition GUIDesigns.h:577
#define GUIDesignComboBoxStatic
Combo box static (not editable)
Definition GUIDesigns.h:298
#define GUIDesignViewSettingsComboBox1
Combo boxes.
Definition GUIDesigns.h:580
#define GUIDesignViewSettingsHorizontalFrame3
Definition GUIDesigns.h:566
#define GUIDesignViewSettingsVerticalFrame6
Definition GUIDesigns.h:559
#define GUIDesignViewSettingsHorizontalFrame2
Definition GUIDesigns.h:564
#define GUIDesignViewSettingsButton2
Definition GUIDesigns.h:605
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition GUIDesigns.h:144
#define GUIDesignViewSettingsMatrix1
Matrix.
Definition GUIDesigns.h:569
#define GUIDesignComboBoxFixed(customWidth)
comboBox with thick frame, fixed width
Definition GUIDesigns.h:307
#define GUIDesignViewSettingsColorWell1
Color wells.
Definition GUIDesigns.h:614
#define GUIDesignViewSettingsButton4
Definition GUIDesigns.h:609
#define GUIDesignViewSettingsDialog
Definition GUIDesigns.h:546
#define GUIDesignViewSettingsMatrix4
Definition GUIDesigns.h:575
#define GUIDesignViewSettingsSpinDial2
Definition GUIDesigns.h:587
#define GUIDesignViewSettingsButton5
Definition GUIDesigns.h:611
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
Definition GUIDesigns.h:562
#define GUIDesignViewSettingsSpinDial1
Definition GUIDesigns.h:585
#define GUIDesignViewSettingsVerticalFrame5
Definition GUIDesigns.h:557
#define GUIDesignViewSettingsMatrix2
Definition GUIDesigns.h:571
#define GUIDesignViewSettingsLabel1
Label.
Definition GUIDesigns.h:595
#define GUIDesignComboBoxVisibleItems
Definition GUIDesigns.h:64
#define GUIDesignViewSettingsTabBook1
Tab books.
Definition GUIDesigns.h:590
#define GUIDesignViewSettingsButton3
Definition GUIDesigns.h:607
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
Definition GUIDesigns.h:374
#define GUIDesignViewSettingsVerticalFrame2
Definition GUIDesigns.h:551
#define GUIDesignViewSettingsVerticalFrame3
Definition GUIDesigns.h:553
#define GUIDesignViewSettingsColorWell
ColorWell.
Definition GUIDesigns.h:583
#define GUIDesignHorizontalSeparator
Definition GUIDesigns.h:494
#define GUIDesignViewSettingsVerticalFrame4
Definition GUIDesigns.h:555
#define GUIDesignViewSettingsTabItemBook1
Definition GUIDesigns.h:592
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
Definition GUIDesigns.h:549
#define GUIDesignViewSettingsLabel2
Definition GUIDesigns.h:597
#define GUIDesignViewSettingsTextField1
textFields
Definition GUIDesigns.h:600
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
Definition GUIDesigns.h:209
#define GUIDesignViewSettingsButton1
Buttons.
Definition GUIDesigns.h:603
FXDEFMAP(GUIDialog_ViewSettings::SizePanel) GUIDialog_SizeMap[]
GUIGlObjectType
@ GLO_TAZRELDATA
TAZ relation data.
@ GLO_JUNCTION
a junction
@ GLO_LANE
a lane
@ GLO_CONTAINER
a container
@ GLO_ADDITIONALELEMENT
reserved GLO type for packing all additionals elements
@ GLO_VEHICLE
a vehicle
@ GLO_PERSON
a person
@ GLO_POI
poi (over view, geo and lane)
@ GLO_POLYGON
polygon
GUIViewObjectsHandler gViewObjectsHandler
FXString gCurrentFolder
The folder used as last.
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
@ OPEN
open icons
@ SAVE_DATABASE
@ SAVE
save icons
#define TL(string)
Definition MsgHandler.h:304
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition SUMOTime.cpp:91
@ SUMO_TAG_DELAY
@ SUMO_TAG_BREAKPOINT
@ SUMO_TAG_VIEWSETTINGS_DECAL
@ SUMO_TAG_VIEWSETTINGS
@ SUMO_TAG_VIEWSETTINGS_LIGHT
@ SUMO_ATTR_VALUE
@ SUMO_ATTR_CENTER_Y
@ SUMO_ATTR_INDEX
@ SUMO_ATTR_LAYER
A layer number.
@ SUMO_ATTR_HEIGHT
@ SUMO_ATTR_TYPE
@ SUMO_ATTR_CENTER_Z
@ SUMO_ATTR_CENTER_X
@ SUMO_ATTR_WIDTH
@ SUMO_ATTR_TIME
trigger: the time of the step
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition ToString.h:46
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
void remove(const std::string name)
Removes the setting with the given name.
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
int getNumInitialSettings() const
Returns the number of initial settings.
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
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
void writeXML(OutputDevice &dev)
write the settings to the given device
GUIVisualizationTextSettings getSettings()
get settings
FXColorWell * myBGColorWell
BGColor well.
void update(const GUIVisualizationTextSettings &settings)
update
FXCheckButton * myCheck
check button
FXCheckButton * myConstSizeCheck
const size check
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
constructor
FXCheckButton * mySelectedCheck
draw only for selected?
void update(const GUIVisualizationRainbowSettings &settings)
update
GUIVisualizationRainbowSettings getSettings()
get settings
RainbowPanel(FXComposite *parent, GUIDialog_ViewSettings *target, const GUIVisualizationRainbowSettings &settings)
constructor
FXCheckButton * myCheckSelected
check selected button
long onCmdSizeChange(FXObject *obj, FXSelector sel, void *ptr)
FXRealSpinner * myMinSizeDial
min size dial
void update(const GUIVisualizationSizeSettings &settings)
update
GUIVisualizationSizeSettings getSettings()
get settings
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings, GUIGlObjectType type)
FOX Declaration.
FXRealSpinner * myExaggerateDial
exaggerate dial
The dialog to change the view (gui) settings.
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
FXVerticalFrame * myVehicleColorSettingFrame
void buildBackgroundFrame(FXTabBook *tabbook)
build frames
FXCheckButton * myVehicleColorInterpolation
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
MFXComboBoxIcon * myPolyColorMode
Polygons.
FXCheckButton * myShowPedestrianNetwork
FXVerticalFrame * myDataColorSettingFrame
GUISUMOAbstractView * myParent
The parent view (which settings are changed)
std::vector< FXColorWell * > myPolyColors
MFXComboBoxIcon * myJunctionColorMode
junctions
FXVerticalFrame * myJunctionColorSettingFrame
void buildSelectionFrame(FXTabBook *tabbook)
void buildOpenGLFrame(FXTabBook *tabbook)
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
FXVerticalFrame * myContainerColorSettingFrame
FXRealSpinner * myLaneWidthUpscaleDialer
std::vector< FXColorWell * > myPOIColors
FXColorWell * myBusStopColor
additional colors
std::vector< FXButton * > myLaneScaleButtons
FXCheckButton * myDisableDottedContours
std::vector< FXColorWell * > myPersonColors
MFXComboBoxIcon * myVehicleShapeDetail
std::vector< FXButton * > myDataButtons
std::vector< FXRealSpinner * > myVehicleScales
std::vector< FXRealSpinner * > myPolyThresholds
FXCheckButton * myPOIColorInterpolation
std::vector< FXButton * > myContainerButtons
std::vector< FXRealSpinner * > myJunctionThresholds
FXCheckButton * myVehicleScaleInterpolation
FXMatrix * rebuildColorMatrix(FXVerticalFrame *frame, std::vector< FXColorWell * > &colors, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIColorScheme &scheme)
Rebuilds manipulators for the current coloring scheme.
void buildJunctionsFrame(FXTabBook *tabbook)
std::vector< FXRealSpinner * > myPersonThresholds
long onKeyPress(FXObject *o, FXSelector sel, void *data)
keyboard functions
void show()
show view settings dialog
std::vector< FXButton * > myJunctionButtons
FXCheckButton * myShowVehicleColorLegend
void buildStreetsFrame(FXTabBook *tabbook)
FXRealSpinner * myTripWidth
demand widths
FXCheckButton * mySaveViewPort
load/save-menu
void buildVehiclesFrame(FXTabBook *tabbook)
FXVerticalFrame * myDataScaleSettingFrame
FXCheckButton * myIgnoreColorSchemeFor3DVehicles
std::vector< FXColorWell * > myJunctionColors
MFXComboBoxIcon * myLaneEdgeScaleMode
... lane scaler
FXCheckButton * myPersonColorInterpolation
long onCmdLoadXMLDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
FXColorWell * mySelectionColor
selection colors
RainbowPanel * myEdgeRainbowPanel
rainbow panels
FXVerticalFrame * myLaneScaleSettingFrame
std::vector< FXColorWell * > myVehicleColors
FXMatrix * rebuildScaleMatrix(FXVerticalFrame *frame, std::vector< FXRealSpinner * > &scales, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIScaleScheme &scheme)
Rebuilds manipulators for the current scaling scheme.
std::vector< FXRealSpinner * > myVehicleThresholds
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXCheckButton * myPolyColorInterpolation
std::vector< FXButton * > myPersonButtons
FXCheckButton * myJunctionColorInterpolation
FXRealSpinner * myTazRelationUpscaleDialer
void buildHeader(FXVerticalFrame *contentFrame)
build header
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
FXVerticalFrame * myLaneColorSettingFrame
MFXComboBoxIcon * myPersonShapeDetail
FXCheckButton * myLaneScaleInterpolation
void buildDemandFrame(FXTabBook *tabbook)
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
FXVerticalFrame * myVehicleScaleSettingFrame
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
FXCheckButton * myDataScaleInterpolation
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
void saveDecals(OutputDevice &dev) const
Writes the currently used decals into a file.
FXVerticalFrame * myPolyColorSettingFrame
std::vector< FXRealSpinner * > myLaneScales
void loadSettings(const std::string &file)
Loads a scheme from a file.
long onCmdClearDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be cleared.
std::vector< FXRealSpinner * > myDataThresholds
FXCheckButton * myDataColorInterpolation
FXCheckButton * myDrawCrossingsAndWalkingAreas
std::vector< FXButton * > myLaneButtons
FXCheckButton * myLaneColorInterpolation
FXVerticalFrame * myPersonColorSettingFrame
void buildContainersFrame(FXTabBook *tabbook)
MFXComboBoxIcon * myVehicleColorMode
Vehicles.
void buildLegendFrame(FXTabBook *tabbook)
std::vector< FXRealSpinner * > myVehicleScaleThresholds
long onCmdLoadDecal(FXObject *, FXSelector, void *data)
Called if the decal shall be loaded from a file.
FXCheckButton * myContainerColorInterpolation
std::vector< FXColorWell * > myLaneColors
SizePanel * myVehicleSizePanel
size panels
GUIVisualizationSettings * mySettings
The current settings.
long onCmdDeleteSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be deleted.
void loadDecals(const std::string &file)
Loads decals from a file.
FXVerticalFrame * myPOIColorSettingFrame
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
std::vector< FXColorWell * > myContainerColors
std::vector< FXRealSpinner * > myDataScaleThresholds
FXCheckButton * myForceDrawForRectangleSelection
std::vector< FXButton * > myDataScaleButtons
GUISUMOAbstractView * getSUMOAbstractView()
get GUISUMOAbstractView parent
MFXComboBoxIcon * myContainerColorMode
Containers.
std::vector< FXRealSpinner * > myLaneScaleThresholds
FXCheckButton * myDither
openGL
MFXComboBoxIcon * myContainerShapeDetail
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
std::vector< FXRealSpinner * > myContainerThresholds
void buildPersonsFrame(FXTabBook *tabbook)
MFXComboBoxIcon * myPOIColorMode
POIs.
void updatePOIParams()
reload known POI parameters
std::vector< FXRealSpinner * > myDataScales
FXCheckButton * myShowLane2Lane
buttons
std::vector< FXColorWell * > myDataColors
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
long onCmdSaveSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be saved into the registry.
MFXComboBoxIcon * myLaneEdgeColorMode
... lane colorer
long onCmdSaveXMLDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
void buildAdditionalsFrame(FXTabBook *tabbook)
MFXComboBoxIcon * myDataScaleMode
Data scaler.
void buildPOIsFrame(FXTabBook *tabbook)
void buildPolygonsFrame(FXTabBook *tabbook)
void buildDataFrame(FXTabBook *tabbook)
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
void buildButtons(FXVerticalFrame *contentFrame)
build buttons
MFXComboBoxIcon * myVehicleScaleMode
vehicle scaler
std::vector< FXButton * > myVehicleScaleButtons
MFXComboBoxIcon * myPersonColorMode
Persons.
bool updateColorRanges(FXObject *sender, std::vector< FXColorWell * >::const_iterator colIt, std::vector< FXColorWell * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIColorScheme &scheme)
update color ranges
std::vector< FXRealSpinner * > myLaneThresholds
long onUpdDeleteSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to delete settings.
bool updateScaleRanges(FXObject *sender, std::vector< FXRealSpinner * >::const_iterator colIt, std::vector< FXRealSpinner * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIScaleScheme &scheme)
update scale ranges
void build3DFrame(FXTabBook *tabbook)
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
MFXComboBoxIcon * myDataColorMode
Data color.
std::vector< FXButton * > myPOIButtons
NamePanel * myEdgeNamePanel
name panels
FXRealSpinner * myEdgeRelationUpscaleDialer
void updateVehicleParams()
reload known vehicle parameters
std::vector< FXRealSpinner * > myPOIThresholds
std::vector< FXButton * > myPolyButtons
std::vector< FXButton * > myVehicleButtons
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Persists window position in the registry.
const std::vector< double > & getThresholds() const
void setColor(const int pos, const T &color)
void setThreshold(const int pos, const double threshold)
const std::vector< std::string > & getNames() const
void removeColor(const int pos)
const std::string & getName() const
const std::vector< T > & getColors() const
int addColor(const T &color, const double threshold, const std::string &name="")
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
bool isInterpolated() const
bool allowsNegativeValues() const
void fill(MFXComboBoxIcon &cb)
Fills the given combobox with the names of available colorings.
MFXComboBoxIcon * getColoringSchemesCombo()
get coloring schemes combo
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, const GUIVisualizationRainbowSettings &)
recalibrate color scheme according to the current value range
virtual std::vector< std::string > getMeanDataAttrs(const std::string &meanDataID) const
return list of available attributes for the given meanData id
void setDelay(double delay)
Sets the delay of the parent application.
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
std::vector< Decal > & getDecals()
The list of decals to show.
double getDelay() const
Returns the delay of the parent application.
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
virtual void drawPedestrianNetwork(const GUIVisualizationSettings &) const
Draw (or not) the JuPedSim pedestrian network.
virtual std::vector< std::string > getMeanDataIDs() const
return list of loaded edgeData ids (being computed in the current simulation)
virtual void recalculateBoundaries()
recalculate boundaries
FXMutex & getDecalsLockMutex()
The mutex to use before accessing the decals list in order to avoid thread conflicts.
virtual bool is3DView() const
return whether this is a 3D view
virtual std::vector< std::string > getPOIParamKeys() const
return list of available vehicle parameters
virtual void changePedestrianNetworkColor(const GUIVisualizationSettings &) const
Change the color of the JuPedSim pedestrian network.
void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
virtual bool setColorScheme(const std::string &)
set color scheme
virtual std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
void remove(GUIDialog_EditViewport *)
remove viewport
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
An XML-handler for visualisation schemes.
double getDelay() const
Returns the parsed delay.
bool hasDecals() const
Returns whether any decals have been parsed.
const std::vector< std::string > & addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
GUIGlObjectType recomputeBoundaries
recompute boundaries
Stores the information about how to visualize structures.
GUIVisualizationTextSettings addName
GUIVisualizationTextSettings tlsPhaseIndex
bool poiUseCustomLayer
whether the rendering layer of POIs should be overriden
GUIVisualizationTextSettings vehicleName
GUIVisualizationTextSettings junctionName
RGBColor backgroundColor
The background color to use.
GUIVisualizationSizeSettings vehicleSize
GUIVisualizationSizeSettings containerSize
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings internalEdgeName
bool showPedestrianNetwork
Flag for visualizing the pedestrian network generated for JuPedSim.
RGBColor skyColor
sky background color
double polyCustomLayer
the custom layer for polygons
GUIVisualizationSizeSettings junctionSize
static const std::string SCHEME_NAME_DATA_ATTRIBUTE_NUMERICAL
bool drawBoundaries
enable or disable draw boundaries
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
std::string edgeDataID
id for coloring by live edgeData
GUIScaler laneScaler
The lane scaler.
GUIVisualizationTextSettings edgeScaleValue
bool dither
Information whether dithering shall be enabled.
GUIColorer vehicleColorer
The vehicle colorer.
bool disableHideByZoom
disable hide by zoom
std::string relDataScaleAttr
key for scaling by edgeRelation / tazRelation attribute
static const std::string SCHEME_NAME_EDGEDATA_LIVE
GUIVisualizationTextSettings personValue
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
GUIScaler dataScaler
The size scaling settings for data elements.
GUIVisualizationRainbowSettings vehicleValueRainBow
GUIVisualizationTextSettings poiType
GUIVisualizationSizeSettings addSize
std::string name
The name of this setting.
GUIColorer edgeColorer
The mesoscopic edge colorer.
int containerQuality
The quality of container drawing.
RGBColor pedestrianNetworkColor
The color of the pedestrian network generated for JuPedSim.
GUIVisualizationTextSettings internalJunctionName
GUIVisualizationTextSettings vehicleScaleValue
GUIVisualizationSizeSettings poiSize
bool drawJunctionShape
whether the shape of the junction should be drawn
std::string edgeData
key for coloring by edgeData
GUIVisualizationTextSettings geometryIndices
GUIVisualizationTextSettings dataValue
bool show3DTLSDomes
whether the semi-transparent domes around 3D TL models should be drawn
bool realisticLinkRules
Information whether link rules (colored bars) shall be drawn with a realistic color scheme.
bool trueZ
drawl all objects according to their z data
int personQuality
The quality of person drawing.
GUIColorer poiColorer
The POI colorer.
GUIVisualizationWidthSettings widthSettings
width settings
GUIVisualizationTextSettings poiName
std::string vehicleScaleParam
key for scaling by vehicle parameter
bool showParkingInfo
Set whether parking related information should be shown.
GUIVisualizationTextSettings vehicleValue
bool disableDottedContours
flag for disable dotted contours in netedit
GUIColorer polyColorer
The polygon colorer.
int vehicleQuality
The quality of vehicle drawing.
GUIVisualizationTextSettings drawLinkJunctionIndex
bool generate3DTLSModels
whether 3D TLS models should be generated automatically
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
GUIVisualizationTextSettings addFullName
GUIVisualizationTextSettings edgeValue
bool fps
Information whether frames-per-second should be drawn.
std::string vehicleParam
key for coloring by vehicle parameter
bool showRails
Information whether rails shall be drawn.
GUIVisualizationSizeSettings personSize
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIVisualizationTextSettings cwaEdgeName
GUIVisualizationTextSettings junctionID
std::string vehicleTextParam
key for rendering vehicle textual parameter
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
GUIVisualizationColorSettings colorSettings
color settings
bool showSublanes
Whether to show sublane boundaries.
GUIVisualizationRainbowSettings edgeValueRainBow
checks and thresholds for rainbow coloring
bool showGrid
Information whether a grid shall be shown.
bool scaleLength
Whether vehicle length shall be scaled with length/geometry factor.
bool showVehicleColorLegend
Information whether the vehicle color legend shall be drawn.
double edgeRelWidthExaggeration
The edgeRelation exaggeration (upscale thickness)
bool hideConnectors
flag to show or hide connectors
GUIScaler vehicleScaler
The size scaling settings for vehicles.
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
GUIColorer personColorer
The person colorer.
void save(OutputDevice &dev) const
Writes the settings into an output device.
bool show3DTLSLinkMarkers
whether the TLS link markers should be drawn
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling scheme.
bool polyUseCustomLayer
whether the rendering layer of polygons should be overriden
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring scheme.
double poiCustomLayer
the custom layer for POIs
bool showChargingInfo
Set whether the charging search related information should be shown.
RGBColor ambient3DLight
3D material light components
GUIVisualizationRainbowSettings junctionValueRainBow
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
bool netedit
Whether the settings are for Netedit.
bool showLaneDirection
Whether to show direction indicators for lanes.
GUIVisualizationRainbowSettings dataValueRainBow
value below which edgeData and edgeRelation data value should not be rendered
bool secondaryShape
whether secondary lane shape shall be drawn
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring scheme.
GUIScaler edgeScaler
The mesoscopic edge scaler.
bool drawMinGap
Information whether the minimum gap shall be drawn.
GUIVisualizationTextSettings streetName
GUIVisualizationTextSettings poiText
GUIVisualizationTextSettings vehicleText
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling scheme.
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
bool show3DHeadUpDisplay
whether to draw the head up display items
GUIColorer laneColorer
The lane colorer.
GUIVisualizationTextSettings polyName
double tazRelWidthExaggeration
The tazRelation exaggeration (upscale thickness)
bool laneShowBorders
Information whether lane borders shall be drawn.
GUIVisualizationTextSettings tlsPhaseName
GUIVisualizationTextSettings edgeName
Setting bundles for optional drawing names with size and color.
bool showSizeLegend
Information whether the size legend shall be drawn.
double laneMinSize
The minimum visual lane width for drawing.
GUIVisualizationTextSettings drawLinkTLIndex
GUIVisualizationTextSettings containerName
static std::map< std::string, std::vector< RGBColor > > RAINBOW_SCHEMES
GUIVisualizationSizeSettings polySize
GUIColorer containerColorer
The container colorer.
double gridXSize
Information about the grid spacings.
bool showBTRange
Information whether the communication range shall be drawn.
bool drawReversed
Whether to draw reversed vehicles in their reversed state.
GUIVisualizationTextSettings personName
bool showColorLegend
Information whether the edge color legend shall be drawn.
std::string poiTextParam
key for rendering poi textual parameter
bool showRouteIndex
Information whether the route index should be shown.
bool drawCrossingsAndWalkingareas
whether crossings and walkingareas shall be drawn
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
std::string relDataAttr
key for coloring by edgeRelation / tazRelation attribute
GUIColorer junctionColorer
The junction colorer.
void copy(const GUIVisualizationSettings &s)
copy all content from another GUIVisualizationSettings (note: DON'T USE in DrawGL functions!...
static const std::string SCHEME_NAME_PARAM_NUMERICAL
std::string edgeParam
key for coloring by edge parameter
bool drawBrakeGap
Information whether the brake gap shall be drawn.
GUIVisualizationTextSettings polyType
int poiDetail
The detail level for drawing POIs.
std::string edgeDataScaling
key for scaling by edgeData
FXint insertIconItem(FXint index, const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
insert icon item in the given position
long setCurrentItem(const FXint index, FXbool notify=FALSE)
Set the current item (index is zero-based)
FXint getCurrentItem() const
Get the current item's index.
FXint findItem(const FXString &text) const
find item
void removeItem(FXint index)
Remove this item from the list.
FXint getNumItems() const
Return the number of items in the list.
FXString getText() const
Get the text.
virtual void clearItems()
Remove all items from the list.
std::string getItemText(FXint index) const
Get text for specified item.
void disable()
Disable combo box.
FXint appendIconItem(const FXString &text, FXIcon *icon=nullptr, FXColor bgColor=FXRGB(255, 255, 255), void *ptr=nullptr)
append icon item in the last position
void enable()
Enable combo box.
void fillTable()
fill table
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extensions, FXIcon *icon, FXString &currentFolder)
Returns the file name to write.
Definition MFXUtils.cpp:116
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
Definition MFXUtils.cpp:31
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:145
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition MFXUtils.cpp:139
static OptionsCont & getOptions()
Retrieves the options.
Static storage of an output device and its base (abstract) implementation.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
void close()
Closes the device and removes it from the dictionary.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
static OutputDevice & getDevice(const std::string &name, bool usePrefix=true)
Returns the described OutputDevice.
unsigned char red() const
Returns the red-amount of the color.
Definition RGBColor.cpp:74
void set(unsigned char r, unsigned char g, unsigned char b, unsigned char a)
assigns new values
Definition RGBColor.cpp:98
static StringBijection< XMLFileExtension > XMLFileExtensions
XML file Extensions.
static StringBijection< ViewSettingsFileExtension > ViewSettingsFileExtensions
view settings file extensions
static bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
#define UNUSED_PARAMETER(x)
RGBColor vehicleTripColor
color for vehicle trips
RGBColor selectionColor
basic selection color
RGBColor selectedEdgeColor
edge selection color
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, stopPersons...)
RGBColor stopPersonColor
color for stopPersons
RGBColor selectedCrossingColor
crossings selection color
RGBColor chargingStationColor
color for chargingStations
RGBColor selectedLaneColor
lane selection color
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
RGBColor selectedEdgeDataColor
edge data selection color
RGBColor trainStopColorSign
color for trainStops signs
RGBColor transhipColor
color for tranships
RGBColor waypointColor
color for Waypoints
RGBColor containerStopColor
color for containerStops
RGBColor selectedProhibitionColor
prohibition selection color
RGBColor selectedConnectionColor
connection selection color
RGBColor busStopColorSign
color for busStops signs
RGBColor containerStopColorSign
color for containerStop signs
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
RGBColor transportColor
color for transport
RGBColor busStopColor
color for busStops
RGBColor selectedVehicleColor
vehicle selection color
RGBColor selectedPersonColor
person selection color
RGBColor personTripColor
color for stopPersons
RGBColor stopContainerColor
color for containerStops
RGBColor trainStopColor
color for trainStops
RGBColor chargingStationColorSign
color for chargingStation sign
bool hideMax
whether data above threshold should not be colored
bool setNeutral
whether the scale should be centered at a specific value
bool fixRange
whether the color scale should be fixed to the given min/max values
double minThreshold
threshold below which value should not be colored
std::vector< RGBColor > colors
color steps for the rainbow;
int rainbowScheme
index in the list of color schemes
bool hideMin
whether data below threshold should not be colored
double neutralThreshold
neutral point of scale
double maxThreshold
threshold above which value should not be colored
double exaggeration
The size exaggeration (upscale)
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
double minSize
The minimum size to draw this object.
bool constantSizeSelected
whether only selected objects shall be drawn with constant
RGBColor bgColor
background text color
bool onlySelected
whether only selected objects shall have text drawn
bool constSize
flag to avoid size changes
double personTripWidth
width for person trips