Eclipse SUMO - Simulation of Urban MObility
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-2024 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>
31 #include <utils/common/RGBColor.h>
32 #include <utils/common/ToString.h>
43 
44 #include "GUIDialog_EditViewport.h"
45 #include "GUIDialog_ViewSettings.h"
46 
47 
48 // ===========================================================================
49 // FOX callback mapping
50 // ===========================================================================
51 
55 };
56 
57 FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[] = {
61  FXMAPFUNC(SEL_COMMAND, MID_SETTINGS_OK, GUIDialog_ViewSettings::onCmdOk),
63  // settings
72  // decals
77 };
78 
79 FXIMPLEMENT(GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
80 FXIMPLEMENT(GUIDialog_ViewSettings::SizePanel, FXObject, GUIDialog_SizeMap, ARRAYNUMBER(GUIDialog_SizeMap))
81 
82 // ===========================================================================
83 // method definitions
84 // ===========================================================================
85 
87  FXDialogBox(parent, TL("View Settings"), GUIDesignViewSettingsMainDialog),
88  GUIPersistentWindowPos(this, "VIEWSETTINGS", true, 20, 40, 700, 500, 400, 20),
89  myParent(parent),
90  mySettings(settings),
91  myBackup(settings->name, settings->netedit) {
92  // make a backup copy
93  myBackup.copy(*settings);
94  // create content frame
95  FXVerticalFrame* contentFrame = new FXVerticalFrame(this, GUIDesignViewSettingsVerticalFrame1);
96  // build header
97  buildHeader(contentFrame);
98  // create tabbook for every section
99  FXTabBook* tabbook = new FXTabBook(contentFrame, nullptr, 0, GUIDesignViewSettingsTabBook1);
100  // build background frame
101  buildBackgroundFrame(tabbook);
102  // build streets frame
103  buildStreetsFrame(tabbook);
104  // build vehicles frame
105  buildVehiclesFrame(tabbook);
106  // build persons frame
107  buildPersonsFrame(tabbook);
108  // build containers frame
109  buildContainersFrame(tabbook);
110  // build junctions frame
111  buildJunctionsFrame(tabbook);
112  // build additionals frame
113  buildAdditionalsFrame(tabbook);
114  // build demand frame
115  if (mySettings->netedit) {
116  buildDemandFrame(tabbook);
117  }
118  // build POIs frame
119  buildPOIsFrame(tabbook);
120  // build polygons frame
121  buildPolygonsFrame(tabbook);
122  // build selection frame (only in netedit)
123  if (mySettings->netedit) {
124  buildSelectionFrame(tabbook);
125  }
126  // build data frame (only in netedit)
127  if (mySettings->netedit) {
128  buildDataFrame(tabbook);
129  }
130  // build legend frame
131  buildLegendFrame(tabbook);
132  // build 3D frame
133  build3DFrame(tabbook);
134  if (mySettings->netedit) {
135  myFrame3D->disable();
136  }
137  // build openGL frame
138  buildOpenGLFrame(tabbook);
139  // build buttons
140  buildButtons(contentFrame);
141  // rebuild color matrix
142  rebuildColorMatrices(false);
144  loadWindowPos();
145 }
146 
147 
149  myParent->remove(this);
150  // delete name panels
153  delete myTLSPhaseIndexPanel;
154  delete myTLSPhaseNamePanel;
155  delete myCwaEdgeNamePanel;
156  delete myStreetNamePanel;
157  delete myEdgeValuePanel;
158  delete myEdgeScaleValuePanel;
159  delete myJunctionIndexPanel;
160  delete myTLIndexPanel;
161  delete myJunctionIDPanel;
162  delete myJunctionNamePanel;
163  delete myVehicleNamePanel;
164  delete myVehicleValuePanel;
166  delete myVehicleTextPanel;
167  delete myPersonNamePanel;
168  delete myPersonValuePanel;
169  delete myAddNamePanel;
170  delete myAddFullNamePanel;
171  delete myPOINamePanel;
172  delete myPOITypePanel;
173  delete myPOITextPanel;
174  delete myPolyNamePanel;
175  delete myPolyTypePanel;
176  delete myEdgeNamePanel;
177  delete myDataValuePanel;
178  delete myGeometryIndicesPanel;
179  // delete size panels
180  delete myVehicleSizePanel;
181  delete myPersonSizePanel;
182  delete myJunctionSizePanel;
183  delete myPOISizePanel;
184  delete myPolySizePanel;
185  delete myAddSizePanel;
186  // delete rainbow panels
187  delete myEdgeRainbowPanel;
188  delete myJunctionRainbowPanel;
189  delete myDataRainbowPanel;
190 }
191 
192 
193 void
195  // update buttons that can be changed externally
196  myShowGrid->setCheck(mySettings->showGrid);
199  // create myNewDecalsTable
200  myDecalsTable->create();
202  FXDialogBox::show();
203 }
204 
205 
208  return myParent;
209 }
210 
211 
212 void
214  mySettings = settings;
215  myBackup.copy(*settings);
216  onCmdNameChange(nullptr, 0, nullptr);
217 }
218 
219 
220 long
221 GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) {
222  getApp()->reg().writeIntEntry("SETTINGS", "comboRows", (int)myComboRows->getValue());
223  hide();
224  return 1;
225 }
226 
227 
228 long
229 GUIDialog_ViewSettings::onCmdCancel(FXObject*, FXSelector, void*) {
230  hide();
232  myParent->update();
233  return 1;
234 }
235 
236 
237 long
238 GUIDialog_ViewSettings::onCmdNameChange(FXObject*, FXSelector, void* ptr) {
239  if (ptr != nullptr) {
240  FXString dataS = (char*) ptr; // !!!unicode
241  // check whether this item has been added twice
242  if (dataS.text() == mySchemeName->getItemText(mySchemeName->getNumItems() - 1)) {
243  for (int i = 0; i < mySchemeName->getNumItems() - 1; ++i) {
244  if (dataS.text() == mySchemeName->getItemText(i)) {
246  }
247  }
248  }
249  myBackup.copy(gSchemeStorage.get(dataS.text()));
250  mySettings = &gSchemeStorage.get(dataS.text());
251  }
252  rebuildColorMatrices(true);
253 
255 
264  if (mySettings->netedit) {
275 
282 
295 
301  }
302 
310  myShowRails->setCheck(mySettings->showRails);
326 
331  myShowMinGap->setCheck(mySettings->drawMinGap);
339  /*
340  myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
341  */
347 
353 
358 
369 
373 
374  myPoiDetail->setValue(mySettings->poiDetail);
379 
383 
387  myDither->setCheck(mySettings->dither);
388  myFPS->setCheck(mySettings->fps);
389  myTrueZ->setCheck(mySettings->trueZ);
397 
400 
402  update();
403  myParent->update();
404  return 1;
405 }
406 
407 
408 bool
409 GUIDialog_ViewSettings::updateColorRanges(FXObject* sender, std::vector<FXColorWell*>::const_iterator colIt,
410  std::vector<FXColorWell*>::const_iterator colEnd,
411  std::vector<FXRealSpinner*>::const_iterator threshIt,
412  std::vector<FXRealSpinner*>::const_iterator threshEnd,
413  std::vector<FXButton*>::const_iterator buttonIt,
414  GUIColorScheme& scheme) {
415  UNUSED_PARAMETER(threshEnd);
416  int pos = 0;
417  while (colIt != colEnd) {
418  if (scheme.isFixed()) {
419  if (sender == *colIt) {
420  scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
421  }
422  } else {
423  if (sender == *threshIt) {
424  const double val = (*threshIt)->getValue();
425  scheme.setThreshold(pos, val);
426  return false;
427  }
428  if (sender == *colIt) {
429  scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
430  return false;
431  }
432  if (sender == *buttonIt) {
433  scheme.addColor(MFXUtils::getRGBColor((*colIt)->getRGBA()), (*threshIt)->getValue());
434  return true;
435  } else if (sender == *(buttonIt + 1)) {
436  scheme.removeColor(pos);
437  return true;
438  }
439  // 2 buttons per item (add / remove)
440  threshIt++;
441  buttonIt += 2;
442  }
443  ++colIt;
444  pos++;
445  }
446  return false;
447 }
448 
449 
450 bool
451 GUIDialog_ViewSettings::updateScaleRanges(FXObject* sender, std::vector<FXRealSpinner*>::const_iterator scaleIt,
452  std::vector<FXRealSpinner*>::const_iterator scaleEnd,
453  std::vector<FXRealSpinner*>::const_iterator threshIt,
454  std::vector<FXRealSpinner*>::const_iterator threshEnd,
455  std::vector<FXButton*>::const_iterator buttonIt,
456  GUIScaleScheme& scheme) {
457  int pos = 0;
458  while (scaleIt != scaleEnd) {
459  if (scheme.isFixed()) {
460  if (sender == *scaleIt) {
461  scheme.setColor(pos, (*scaleIt)->getValue());
462  }
463  } else {
464  if (sender == *threshIt) {
465  const double val = (*threshIt)->getValue();
466  double lo, hi;
467  if (pos != 0) {
468  threshIt--;
469  (*threshIt)->getRange(lo, hi);
470  (*threshIt)->setRange(lo, val);
471  threshIt++;
472  }
473  threshIt++;
474  if (threshIt != threshEnd) {
475  (*threshIt)->getRange(lo, hi);
476  (*threshIt)->setRange(val, hi);
477  }
478  scheme.setThreshold(pos, val);
479  return false;
480  }
481  if (sender == *scaleIt) {
482  scheme.setColor(pos, (*scaleIt)->getValue());
483  return false;
484  }
485  if (sender == *buttonIt) {
486  scheme.addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
487  return true;
488  } else if (sender == *(buttonIt + 1)) {
489  scheme.removeColor(pos);
490  return true;
491  }
492  threshIt++;
493  buttonIt += 2;
494  }
495  ++scaleIt;
496  pos++;
497  }
498  return false;
499 }
500 
501 
502 long
503 GUIDialog_ViewSettings::onCmdColorChange(FXObject* sender, FXSelector, void* /*val*/) {
505  tmpSettings.copy(*mySettings);
506  int prevLaneMode = mySettings->getLaneEdgeMode();
507  int prevLaneScaleMode = mySettings->getLaneEdgeScaleMode();
508  int prevVehicleMode = mySettings->vehicleColorer.getActive();
509  int prevVehicleScaleMode = mySettings->vehicleScaler.getActive();
510  int prevPersonMode = mySettings->personColorer.getActive();
511  int prevContainerMode = mySettings->containerColorer.getActive();
512  int prevJunctionMode = mySettings->junctionColorer.getActive();
513  int prevPOIMode = mySettings->poiColorer.getActive();
514  int prevPolyMode = mySettings->polyColorer.getActive();
515  int prevDataMode = mySettings->dataColorer.getActive();
516  bool doRebuildColorMatrices = false;
517 
518  tmpSettings.name = mySettings->name;
519  tmpSettings.backgroundColor = MFXUtils::getRGBColor(myBackgroundColor->getRGBA());
520 
521  // additionals
530  if (mySettings->netedit) {
531  tmpSettings.colorSettings.stopColor = MFXUtils::getRGBColor(myStopColor->getRGBA());
536  tmpSettings.colorSettings.walkColor = MFXUtils::getRGBColor(myWalkColor->getRGBA());
537  tmpSettings.colorSettings.rideColor = MFXUtils::getRGBColor(myRideColor->getRGBA());
541 
542  tmpSettings.widthSettings.tripWidth = myTripWidth->getValue();
543  tmpSettings.widthSettings.personTripWidth = myPersonTripWidth->getValue();
544  tmpSettings.widthSettings.walkWidth = myWalkWidth->getValue();
545  tmpSettings.widthSettings.rideWidth = myRideWidth->getValue();
546  tmpSettings.widthSettings.transportWidth = myTransportWidth->getValue();
547  tmpSettings.widthSettings.transhipWidth = myTranshipWidth->getValue();
548 
561  }
562 
563  tmpSettings.showGrid = (myShowGrid->getCheck() != FALSE);
564  tmpSettings.gridXSize = (double) myGridXSizeDialer->getValue();
565  tmpSettings.gridYSize = (double) myGridYSizeDialer->getValue();
566 
570  } else {
573  }
574  tmpSettings.laneShowBorders = (myShowLaneBorders->getCheck() != FALSE);
575  tmpSettings.showBikeMarkings = (myShowBikeMarkings->getCheck() != FALSE);
576  tmpSettings.showLinkDecals = (myShowLaneDecals->getCheck() != FALSE);
577  tmpSettings.realisticLinkRules = (myRealisticLinkRules->getCheck() != FALSE);
578  tmpSettings.showLinkRules = (myShowLinkRules->getCheck() != FALSE);
579  tmpSettings.showRails = (myShowRails->getCheck() != FALSE);
580  tmpSettings.secondaryShape = (mySecondaryShape->getCheck() != FALSE);
581  tmpSettings.edgeName = myEdgeNamePanel->getSettings();
583  tmpSettings.cwaEdgeName = myCwaEdgeNamePanel->getSettings();
584  tmpSettings.streetName = myStreetNamePanel->getSettings();
585  tmpSettings.edgeValue = myEdgeValuePanel->getSettings();
587  tmpSettings.hideConnectors = (myHideMacroConnectors->getCheck() != FALSE);
588  tmpSettings.showLaneDirection = (myShowLaneDirection->getCheck() != FALSE);
589  tmpSettings.showSublanes = (myShowSublanes->getCheck() != FALSE);
590  tmpSettings.spreadSuperposed = (mySpreadSuperposed->getCheck() != FALSE);
591  tmpSettings.disableHideByZoom = (myDisableHideByZoom->getCheck() != FALSE);
592  if (sender == myParamKey) {
594  tmpSettings.edgeParam = myParamKey->getText().text();
596  tmpSettings.laneParam = myParamKey->getText().text();
598  tmpSettings.edgeData = myParamKey->getText().text();
600  tmpSettings.edgeData = myParamKey->getText().text();
601  }
602  } else if (sender == myScalingParamKey) {
604  tmpSettings.edgeDataScaling = myScalingParamKey->getText().text();
605  }
606  } else if (sender == myVehicleParamKey) {
608  tmpSettings.vehicleParam = myVehicleParamKey->getText().text();
609  }
610  } else if (sender == myVehicleScalingParamKey) {
612  tmpSettings.vehicleScaleParam = myVehicleScalingParamKey->getText().text();
613  }
614  } else if (sender == myDataParamKey) {
616  tmpSettings.relDataAttr = myDataParamKey->getText().text();
617  }
618  } else if (sender == myVehicleTextPanel->myCheck) {
620  } else if (sender == myVehicleTextParamKey) {
621  tmpSettings.vehicleTextParam = myVehicleTextParamKey->getText().text();
622  } else if (sender == myPOITextPanel->myCheck) {
623  updatePOIParams();
624  } else if (sender == myPOITextParamKey) {
625  tmpSettings.poiTextParam = myPOITextParamKey->getText().text();
626  } else if (sender == myMeanDataID) {
627  tmpSettings.edgeDataID = myMeanDataID->getText().text();
628  }
630  tmpSettings.laneWidthExaggeration = myLaneWidthUpscaleDialer->getValue();
631  tmpSettings.laneMinSize = myLaneMinWidthDialer->getValue();
632 
636  tmpSettings.showBlinker = (myShowBlinker->getCheck() != FALSE);
637  tmpSettings.drawMinGap = (myShowMinGap->getCheck() != FALSE);
638  tmpSettings.drawBrakeGap = (myShowBrakeGap->getCheck() != FALSE);
639  tmpSettings.showBTRange = (myShowBTRange->getCheck() != FALSE);
640  tmpSettings.showRouteIndex = (myShowRouteIndex->getCheck() != FALSE);
641  tmpSettings.scaleLength = (myScaleLength->getCheck() != FALSE);
642  tmpSettings.drawReversed = (myDrawReversed->getCheck() != FALSE);
643  tmpSettings.showParkingInfo = (myShowParkingInfo->getCheck() != FALSE);
644  tmpSettings.showChargingInfo = (myShowChargingInfo->getCheck() != FALSE);
645  /*
646  tmpSettings.drawLaneChangePreference = (myShowLaneChangePreference->getCheck() != FALSE);
647  */
648  tmpSettings.vehicleName = myVehicleNamePanel->getSettings();
651  tmpSettings.vehicleText = myVehicleTextPanel->getSettings();
652  tmpSettings.vehicleSize = myVehicleSizePanel->getSettings();
653 
656  tmpSettings.personName = myPersonNamePanel->getSettings();
657  tmpSettings.personValue = myPersonValuePanel->getSettings();
658  tmpSettings.personSize = myPersonSizePanel->getSettings();
659 
664 
666  tmpSettings.drawLinkTLIndex = myTLIndexPanel->getSettings();
668  tmpSettings.junctionID = myJunctionIDPanel->getSettings();
675 
676  tmpSettings.addName = myAddNamePanel->getSettings();
677  tmpSettings.addFullName = myAddFullNamePanel->getSettings();
678  tmpSettings.addSize = myAddSizePanel->getSettings();
679 
681  tmpSettings.poiDetail = myPoiDetail->getValue();
682  tmpSettings.poiName = myPOINamePanel->getSettings();
683  tmpSettings.poiType = myPOITypePanel->getSettings();
684  tmpSettings.poiText = myPOITextPanel->getSettings();
685  tmpSettings.poiSize = myPOISizePanel->getSettings();
686 
688  tmpSettings.polyName = myPolyNamePanel->getSettings();
689  tmpSettings.polyType = myPolyTypePanel->getSettings();
690  tmpSettings.polySize = myPolySizePanel->getSettings();
691 
692  if (mySettings->netedit) {
693  tmpSettings.dataValue = myDataValuePanel->getSettings();
695  tmpSettings.dataValue = myDataValuePanel->getSettings();
696  tmpSettings.tazRelWidthExaggeration = myTazRelationUpscaleDialer->getValue();
697  tmpSettings.edgeRelWidthExaggeration = myEdgeRelationUpscaleDialer->getValue();
699  }
700 
701  tmpSettings.showLane2Lane = (myShowLane2Lane->getCheck() != FALSE);
702  tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE);
703  tmpSettings.drawCrossingsAndWalkingareas = (myDrawCrossingsAndWalkingAreas->getCheck() != FALSE);
704  tmpSettings.dither = (myDither->getCheck() != FALSE);
705  tmpSettings.fps = (myFPS->getCheck() != FALSE);
706  tmpSettings.trueZ = (myTrueZ->getCheck() != FALSE);
707  tmpSettings.drawBoundaries = (myDrawBoundaries->getCheck() != FALSE);
708  tmpSettings.forceDrawForRectangleSelection = (myForceDrawForRectangleSelection->getCheck() != FALSE);
709  tmpSettings.disableDottedContours = (myDisableDottedContours->getCheck() != FALSE);
711  tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE);
712  tmpSettings.showColorLegend = (myShowColorLegend->getCheck() != FALSE);
713  tmpSettings.showVehicleColorLegend = (myShowVehicleColorLegend->getCheck() != FALSE);
714  tmpSettings.show3DTLSDomes = (myShow3DTLSDomes->getCheck() != FALSE);
715  tmpSettings.show3DTLSLinkMarkers = (myShow3DTLSLinkMarkers->getCheck() != FALSE);
716  tmpSettings.show3DHeadUpDisplay = (myShow3DHeadUpDisplay->getCheck() != FALSE);
717  tmpSettings.generate3DTLSModels = (myGenerate3DTLSModels->getCheck() != FALSE);
718  const unsigned char lightFactor = (unsigned char)myLight3DFactor->getValue();
719  tmpSettings.ambient3DLight.set(lightFactor / 2, lightFactor / 2, lightFactor / 2, 255);
720  tmpSettings.diffuse3DLight.set(lightFactor, lightFactor, lightFactor, 255);
721  tmpSettings.skyColor = MFXUtils::getRGBColor(mySkyColor->getRGBA());
722 
723  // lanes (colors)
724  if (sender == myEdgeRainbowPanel->myColorRainbow) {
725  myParent->buildColorRainbow(tmpSettings, tmpSettings.getLaneEdgeScheme(), tmpSettings.getLaneEdgeMode(), GLO_LANE, myEdgeRainbowPanel->getSettings());
726  doRebuildColorMatrices = true;
727  } else if (sender == myJunctionRainbowPanel->myColorRainbow) {
729  doRebuildColorMatrices = true;
730  } else if (myDataRainbowPanel && sender == myDataRainbowPanel->myColorRainbow) {
732  doRebuildColorMatrices = true;
733  }
734  if (tmpSettings.getLaneEdgeMode() == prevLaneMode) {
735  if (updateColorRanges(sender, myLaneColors.begin(), myLaneColors.end(),
736  myLaneThresholds.begin(), myLaneThresholds.end(), myLaneButtons.begin(),
737  tmpSettings.getLaneEdgeScheme())) {
738  doRebuildColorMatrices = true;
739  }
740  if (sender == myLaneColorInterpolation) {
741  tmpSettings.getLaneEdgeScheme().setInterpolated(myLaneColorInterpolation->getCheck() != FALSE);
742  doRebuildColorMatrices = true;
743  }
744  } else {
745  doRebuildColorMatrices = true;
746  }
747  // lanes (scaling)
748  if (tmpSettings.getLaneEdgeScaleMode() == prevLaneScaleMode) {
749  if (updateScaleRanges(sender, myLaneScales.begin(), myLaneScales.end(),
751  tmpSettings.getLaneEdgeScaleScheme())) {
752  doRebuildColorMatrices = true;
753  }
754  if (sender == myLaneScaleInterpolation) {
755  tmpSettings.getLaneEdgeScaleScheme().setInterpolated(myLaneScaleInterpolation->getCheck() != FALSE);
756  doRebuildColorMatrices = true;
757  }
758  } else {
759  doRebuildColorMatrices = true;
760  }
761  // vehicles
762  if (tmpSettings.vehicleColorer.getActive() == prevVehicleMode) {
763  if (updateColorRanges(sender, myVehicleColors.begin(), myVehicleColors.end(),
765  tmpSettings.vehicleColorer.getScheme())) {
766  doRebuildColorMatrices = true;
767  }
768  if (sender == myVehicleColorInterpolation) {
769  tmpSettings.vehicleColorer.getScheme().setInterpolated(myVehicleColorInterpolation->getCheck() != FALSE);
770  doRebuildColorMatrices = true;
771  }
772  } else {
773  doRebuildColorMatrices = true;
774  }
775  // vehicles (scaling)
776  if (tmpSettings.vehicleScaler.getActive() == prevVehicleScaleMode) {
777  if (updateScaleRanges(sender, myVehicleScales.begin(), myVehicleScales.end(),
779  tmpSettings.vehicleScaler.getScheme())) {
780  doRebuildColorMatrices = true;
781  }
782  if (sender == myVehicleScaleInterpolation) {
783  tmpSettings.vehicleScaler.getScheme().setInterpolated(myVehicleScaleInterpolation->getCheck() != FALSE);
784  doRebuildColorMatrices = true;
785  }
786  } else {
787  doRebuildColorMatrices = true;
788  }
789  // persons
790  if (tmpSettings.personColorer.getActive() == prevPersonMode) {
791  if (updateColorRanges(sender, myPersonColors.begin(), myPersonColors.end(),
792  myPersonThresholds.begin(), myPersonThresholds.end(), myPersonButtons.begin(),
793  tmpSettings.personColorer.getScheme())) {
794  doRebuildColorMatrices = true;
795  }
796  if (sender == myPersonColorInterpolation) {
797  tmpSettings.personColorer.getScheme().setInterpolated(myPersonColorInterpolation->getCheck() != FALSE);
798  doRebuildColorMatrices = true;
799  }
800  } else {
801  doRebuildColorMatrices = true;
802  }
803  // containers
804  if (tmpSettings.containerColorer.getActive() == prevContainerMode) {
805  if (updateColorRanges(sender, myContainerColors.begin(), myContainerColors.end(),
807  tmpSettings.containerColorer.getScheme())) {
808  doRebuildColorMatrices = true;
809  }
810  if (sender == myContainerColorInterpolation) {
811  tmpSettings.containerColorer.getScheme().setInterpolated(myContainerColorInterpolation->getCheck() != FALSE);
812  doRebuildColorMatrices = true;
813  }
814  } else {
815  doRebuildColorMatrices = true;
816  }
817  // junctions
818  if (tmpSettings.junctionColorer.getActive() == prevJunctionMode) {
819  if (updateColorRanges(sender, myJunctionColors.begin(), myJunctionColors.end(),
821  tmpSettings.junctionColorer.getScheme())) {
822  doRebuildColorMatrices = true;
823  }
824  if (sender == myJunctionColorInterpolation) {
825  tmpSettings.junctionColorer.getScheme().setInterpolated(myJunctionColorInterpolation->getCheck() != FALSE);
826  doRebuildColorMatrices = true;
827  }
828  } else {
829  doRebuildColorMatrices = true;
830  }
831  // POIs
832  if (tmpSettings.poiColorer.getActive() == prevPOIMode) {
833  if (updateColorRanges(sender, myPOIColors.begin(), myPOIColors.end(),
834  myPOIThresholds.begin(), myPOIThresholds.end(), myPOIButtons.begin(),
835  tmpSettings.poiColorer.getScheme())) {
836  doRebuildColorMatrices = true;
837  }
838  if (sender == myPOIColorInterpolation) {
839  tmpSettings.poiColorer.getScheme().setInterpolated(myPOIColorInterpolation->getCheck() != FALSE);
840  doRebuildColorMatrices = true;
841  }
842  } else {
843  doRebuildColorMatrices = true;
844  }
845  // polygons
846  if (tmpSettings.polyColorer.getActive() == prevPolyMode) {
847  if (updateColorRanges(sender, myPolyColors.begin(), myPolyColors.end(),
848  myPolyThresholds.begin(), myPolyThresholds.end(), myPolyButtons.begin(),
849  tmpSettings.polyColorer.getScheme())) {
850  doRebuildColorMatrices = true;
851  }
852  if (sender == myPolyColorInterpolation) {
853  tmpSettings.polyColorer.getScheme().setInterpolated(myPolyColorInterpolation->getCheck() != FALSE);
854  doRebuildColorMatrices = true;
855  }
856  } else {
857  doRebuildColorMatrices = true;
858  }
859  // data
860  if (tmpSettings.netedit) {
861  if (tmpSettings.dataColorer.getActive() == prevDataMode) {
862  if (updateColorRanges(sender, myDataColors.begin(), myDataColors.end(),
863  myDataThresholds.begin(), myDataThresholds.end(), myDataButtons.begin(),
864  tmpSettings.dataColorer.getScheme())) {
865  doRebuildColorMatrices = true;
866  }
867  if (sender == myDataColorInterpolation) {
868  tmpSettings.dataColorer.getScheme().setInterpolated(myDataColorInterpolation->getCheck() != FALSE);
869  doRebuildColorMatrices = true;
870  }
871  } else {
872  doRebuildColorMatrices = true;
873  }
874  }
875  // openGL
876  if (sender == myRecalculateBoundaries) {
878  }
879 
880  if (sender == myShowPedestrianNetwork) {
881  tmpSettings.showPedestrianNetwork = (myShowPedestrianNetwork->getCheck() != FALSE);
882  myParent->drawPedestrianNetwork(tmpSettings);
883  }
884 
885  if (sender == myPedestrianNetworkColor) {
888  }
889 
890  if (tmpSettings == *mySettings) {
891  return 1;
892  }
893 
894  int index = mySchemeName->getCurrentItem();
895  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
896  // one of the initial settings is modified
897  // every time this happens we create a new scheme
898  int suffix = 1;
899  while (gSchemeStorage.contains("custom_" + toString(suffix))) {
900  suffix++;
901  }
902  tmpSettings.name = "custom_" + toString(suffix);
903  // the newly created settings must be entered in several places:
904  // - the comboBox mySchemeName of this dialog
905  // - the comboBox of the parent view (set as active)
906  // - the comboBox of all other views (only append) XXX @todo
907  index = mySchemeName->appendIconItem(tmpSettings.name.c_str());
909  myParent->getColoringSchemesCombo()->appendIconItem(tmpSettings.name.c_str());
910  }
912  myParent->getColoringSchemesCombo()->findItem(tmpSettings.name.c_str()));
913  gSchemeStorage.add(tmpSettings); // overwrites existing
914  mySettings = &gSchemeStorage.get(tmpSettings.name);
915  myParent->setColorScheme(tmpSettings.name);
916 
917  if (doRebuildColorMatrices) {
918  rebuildColorMatrices(true);
919  }
920  myParent->handle(this, FXSEL(SEL_CHANGED, MID_SIMPLE_VIEW_COLORCHANGE), nullptr);
921  myParent->forceRefresh();
922  getApp()->forceRefresh();
923  return 1;
924 }
925 
926 
927 void
928 GUIDialog_ViewSettings::loadSettings(const std::string& file) {
929  GUISettingsHandler handler(file, true, mySettings->netedit);
930  for (std::string settingsName : handler.addSettings(myParent)) {
931  FXint index = mySchemeName->appendIconItem(settingsName.c_str());
933  mySettings = &gSchemeStorage.get(settingsName);
934  }
935  if (handler.hasDecals()) {
936  myParent->getDecalsLockMutex().lock();
937  myParent->getDecals() = handler.getDecals();
939  myParent->update();
940  myParent->getDecalsLockMutex().unlock();
941  }
942  if (handler.getDelay() >= 0) {
943  myParent->setDelay(handler.getDelay());
944  }
945  if (handler.getBreakpoints().size() > 0) {
947  }
948  handler.applyViewport(myParent);
949  rebuildColorMatrices(true);
950 }
951 
952 
953 void
955  for (const auto& decal : myParent->getDecals()) {
956  // only save decals with non empty filename
957  if (decal.filename.size() > 0) {
958  // check if decal is a light
959  const bool isLight = (decal.filename.substr(0, 5) == "light") && (decal.filename.length() == 6) && isdigit(decal.filename[5]);
960  if (isLight) {
962  dev.writeAttr(SUMO_ATTR_INDEX, decal.filename.substr(5, 1));
963  } else {
965  dev.writeAttr("file", decal.filename);
966  dev.writeAttr("screenRelative", decal.screenRelative);
967  }
968  dev.writeAttr(SUMO_ATTR_CENTER_X, decal.centerX);
969  dev.writeAttr(SUMO_ATTR_CENTER_Y, decal.centerY);
970  dev.writeAttr(SUMO_ATTR_CENTER_Z, decal.centerZ);
971  dev.writeAttr(SUMO_ATTR_WIDTH, decal.width);
972  dev.writeAttr(SUMO_ATTR_HEIGHT, decal.height);
973  dev.writeAttr("altitude", decal.altitude);
974  dev.writeAttr("rotation", decal.rot);
975  dev.writeAttr("tilt", decal.tilt);
976  dev.writeAttr("roll", decal.roll);
977  dev.writeAttr(SUMO_ATTR_LAYER, decal.layer);
978  dev.closeTag();
979  }
980  }
981 }
982 
983 
984 void
985 GUIDialog_ViewSettings::loadDecals(const std::string& file) {
986  myParent->getDecalsLockMutex().lock();
987  GUISettingsHandler handler(file);
988  if (handler.hasDecals()) {
989  myParent->getDecals() = handler.getDecals();
990  }
992  myParent->update();
993  myParent->getDecalsLockMutex().unlock();
994 }
995 
996 
997 long
998 GUIDialog_ViewSettings::onCmdSaveSetting(FXObject*, FXSelector, void* /*data*/) {
999  int index = mySchemeName->getCurrentItem();
1000  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1001  return 1;
1002  }
1003  // get the name
1004  std::string name = "";
1005  while (name.length() == 0) {
1006  FXDialogBox dialog(this, TL("Enter a name"), GUIDesignViewSettingsDialog);
1007  FXVerticalFrame* content = new FXVerticalFrame(&dialog, GUIDesignViewSettingsVerticalFrame5);
1008  new FXLabel(content, TL("Please enter an alphanumeric name: "), nullptr, GUIDesignViewSettingsLabel2);
1009  FXTextField* text = new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsTextField1);
1010  new FXHorizontalSeparator(content, GUIDesignHorizontalSeparator);
1011  FXHorizontalFrame* buttons = new FXHorizontalFrame(content, GUIDesignViewSettingsHorizontalFrame3);
1012  GUIDesigns::buildFXButton(buttons, TL("&OK"), "", "", nullptr, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsButton4);
1013  GUIDesigns::buildFXButton(buttons, TL("&Cancel"), "", "", nullptr, &dialog, FXDialogBox::ID_CANCEL, GUIDesignViewSettingsButton5);
1014  dialog.create();
1015  text->setFocus();
1016  if (!dialog.execute()) {
1017  return 1;
1018  }
1019  name = text->getText().text();
1020  for (int i = 0; i < (int)name.length(); ++i) {
1021  if (name[i] != '_' && (name[i] < 'a' || name[i] > 'z') && (name[i] < 'A' || name[i] > 'Z') && (name[i] < '0' || name[i] > '9')) {
1022  name = "";
1023  break;
1024  }
1025  }
1026  }
1028  tmpSettings.copy(*mySettings);
1029  tmpSettings.name = name;
1030  if (name == mySettings->name || StringUtils::startsWith(mySettings->name, "custom_")) {
1032  myParent->getColoringSchemesCombo()->insertIconItem(index, name.c_str());
1033  } else {
1035  index = mySchemeName->appendIconItem(name.c_str());
1038  myParent->getColoringSchemesCombo()->findItem(name.c_str()));
1039  }
1040  gSchemeStorage.add(tmpSettings);
1041  mySchemeName->insertIconItem(index, name.c_str());
1042  myParent->setColorScheme(name);
1043  mySettings = &gSchemeStorage.get(name);
1045  gSchemeStorage.writeSettings(getApp());
1046  return 1;
1047 }
1048 
1049 
1050 long
1051 GUIDialog_ViewSettings::onUpdSaveSetting(FXObject* sender, FXSelector, void* ptr) {
1052  sender->handle(this,
1054  ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1055  ptr);
1056  return 1;
1057 }
1058 
1059 
1060 long
1061 GUIDialog_ViewSettings::onCmdDeleteSetting(FXObject*, FXSelector, void* /*data*/) {
1062  int index = mySchemeName->getCurrentItem();
1063  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1064  return 1;
1065  }
1066  std::string name = mySchemeName->getItemText(index);
1067  gSchemeStorage.remove(name);
1068  mySchemeName->removeItem(index);
1069  onCmdNameChange(nullptr, 0, (void*) mySchemeName->getItemText(0).c_str());
1070  gSchemeStorage.writeSettings(getApp());
1071  return 1;
1072 }
1073 
1074 
1075 long
1076 GUIDialog_ViewSettings::onUpdDeleteSetting(FXObject* sender, FXSelector, void* ptr) {
1077  sender->handle(this,
1079  ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1080  ptr);
1081  return 1;
1082 }
1083 
1084 
1085 long
1086 GUIDialog_ViewSettings::onCmdExportSetting(FXObject*, FXSelector, void* /*data*/) {
1087  FXString file = MFXUtils::getFilename2Write(this, TL("Export view settings"), ".xml", GUIIconSubSys::getIcon(GUIIcon::SAVE), gCurrentFolder);
1088  if (file == "") {
1089  return 1;
1090  }
1091  try {
1092  OutputDevice& dev = OutputDevice::getDevice(file.text(), false);
1094  if (myParent->is3DView()) {
1095  dev.writeAttr(SUMO_ATTR_TYPE, "osg");
1096  }
1097  mySettings->save(dev);
1098  if (mySaveViewPort->getCheck()) {
1100  }
1101  if (mySaveDelay->getCheck()) {
1102  dev.openTag(SUMO_TAG_DELAY);
1104  dev.closeTag();
1105  }
1106  if (mySaveDecals->getCheck()) {
1107  saveDecals(dev);
1108  }
1109  if (!mySettings->netedit && mySaveBreakpoints->getCheck()) {
1110  for (SUMOTime t : myParent->retrieveBreakpoints()) {
1113  dev.closeTag();
1114  }
1115  }
1116  dev.closeTag();
1117  dev.close();
1118  } catch (IOError& e) {
1119  FXMessageBox::error(this, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1120  }
1121  return 1;
1122 }
1123 
1124 
1125 long
1126 GUIDialog_ViewSettings::onUpdExportSetting(FXObject* sender, FXSelector, void* ptr) {
1127  sender->handle(this,
1129  && !mySaveViewPort->getCheck() && !mySaveDelay->getCheck() && !mySaveDecals->getCheck() && !mySaveBreakpoints->getCheck()) ?
1130  FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1131  ptr);
1132  return 1;
1133 }
1134 
1135 
1136 long
1137 GUIDialog_ViewSettings::onCmdImportSetting(FXObject*, FXSelector, void* /*data*/) {
1138  FXFileDialog opendialog(this, TL("Import view settings"));
1139  opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::OPEN));
1140  opendialog.setSelectMode(SELECTFILE_ANY);
1141  opendialog.setPatternList("*.xml,*.xml.gz");
1142  if (gCurrentFolder.length() != 0) {
1143  opendialog.setDirectory(gCurrentFolder);
1144  }
1145  if (opendialog.execute()) {
1146  gCurrentFolder = opendialog.getDirectory();
1147  loadSettings(opendialog.getFilename().text());
1148  }
1149  return 1;
1150 }
1151 
1152 
1153 long
1154 GUIDialog_ViewSettings::onCmdLoadDecal(FXObject*, FXSelector, void* /*data*/) {
1155  FXFileDialog opendialog(this, TL("Load Decals"));
1156  opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1157  opendialog.setSelectMode(SELECTFILE_ANY);
1158  opendialog.setPatternList("*.xml,*.xml.gz");
1159  if (gCurrentFolder.length() != 0) {
1160  opendialog.setDirectory(gCurrentFolder);
1161  }
1162  if (opendialog.execute()) {
1163  gCurrentFolder = opendialog.getDirectory();
1164  loadDecals(opendialog.getFilename().text());
1165  }
1166  return 1;
1167 }
1168 
1169 
1170 long
1171 GUIDialog_ViewSettings::onCmdLoadXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1172  FXFileDialog opendialog(this, TL("Load Decals"));
1173  opendialog.setIcon(GUIIconSubSys::getIcon(GUIIcon::EMPTY));
1174  opendialog.setSelectMode(SELECTFILE_ANY);
1175  opendialog.setPatternList("*.xml,*.xml.gz");
1176  if (gCurrentFolder.length() != 0) {
1177  opendialog.setDirectory(gCurrentFolder);
1178  }
1179  if (opendialog.execute()) {
1180  gCurrentFolder = opendialog.getDirectory();
1181  loadDecals(opendialog.getFilename().text());
1182  }
1183  return 1;
1184 }
1185 
1186 
1187 long
1188 GUIDialog_ViewSettings::onCmdSaveXMLDecals(FXObject*, FXSelector, void* /*data*/) {
1189  FXString file = MFXUtils::getFilename2Write(this, TL("Save Decals"), ".xml", GUIIconSubSys::getIcon(GUIIcon::EMPTY), gCurrentFolder);
1190  if (file == "") {
1191  return 1;
1192  }
1193  try {
1194  OutputDevice& dev = OutputDevice::getDevice(file.text());
1195  dev.openTag("decals");
1196  saveDecals(dev);
1197  dev.closeTag();
1198  dev.close();
1199  } catch (IOError& e) {
1200  FXMessageBox::error(myParent, MBOX_OK, TL("Storing failed!"), "%s", e.what());
1201  }
1202  return 1;
1203 }
1204 
1205 
1206 long
1207 GUIDialog_ViewSettings::onCmdClearDecals(FXObject*, FXSelector, void* /*data*/) {
1208  // lock decals mutex
1209  myParent->getDecalsLockMutex().lock();
1210  // clear decals
1211  myParent->getDecals().clear();
1212  // update view
1213  myParent->update();
1214  // fill table again
1216  // unlock decals mutex
1217  myParent->getDecalsLockMutex().unlock();
1218  return 1;
1219 }
1220 
1221 
1222 long
1223 GUIDialog_ViewSettings::onUpdImportSetting(FXObject* sender, FXSelector, void* ptr) {
1224  sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1225  return 1;
1226 }
1227 
1228 
1229 FXMatrix*
1231  std::vector<FXColorWell*>& colors,
1232  std::vector<FXRealSpinner*>& thresholds,
1233  std::vector<FXButton*>& buttons,
1234  FXCheckButton* interpolation,
1235  GUIColorScheme& scheme) {
1236  MFXUtils::deleteChildren(frame);
1237  FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1238  colors.clear();
1239  thresholds.clear();
1240  buttons.clear();
1241  const bool fixed = scheme.isFixed();
1242  std::vector<RGBColor>::const_iterator colIt = scheme.getColors().begin();
1243  std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1244  std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1245  while (colIt != scheme.getColors().end()) {
1246  colors.push_back(new FXColorWell(m, MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1));
1247  if (fixed) {
1248  new FXLabel(m, nameIt->c_str());
1249  new FXLabel(m, "");
1250  new FXLabel(m, "");
1251  } else {
1252  const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1253  FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1254  threshDialer->setValue(*threshIt);
1255  thresholds.push_back(threshDialer);
1256  if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1257  threshDialer->disable();
1258  threshDialer->hide();
1259  buttons.push_back(GUIDesigns::buildFXButton(m, "", "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1260  buttons.back()->hide();
1261  buttons.push_back(GUIDesigns::buildFXButton(m, TL("No Data"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1262  buttons.back()->disable();
1263  } else {
1264  buttons.push_back(GUIDesigns::buildFXButton(m, TL("Add"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1265  buttons.push_back(GUIDesigns::buildFXButton(m, TL("Remove"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1266  }
1267  }
1268  colIt++;
1269  threshIt++;
1270  nameIt++;
1271  }
1272  interpolation->setCheck(scheme.isInterpolated());
1273  if (fixed) {
1274  interpolation->disable();
1275  } else {
1276  if (colors.size() > 1) {
1277  interpolation->enable();
1278  if (interpolation->getCheck() != FALSE) {
1279  thresholds.front()->enable();
1280  } else {
1281  thresholds.front()->disable();
1282  }
1283  } else {
1284  interpolation->disable();
1285  thresholds.front()->disable();
1286  }
1287  }
1288  return m;
1289 }
1290 
1291 
1292 FXMatrix*
1294  std::vector<FXRealSpinner*>& scales,
1295  std::vector<FXRealSpinner*>& thresholds,
1296  std::vector<FXButton*>& buttons,
1297  FXCheckButton* interpolation,
1298  GUIScaleScheme& scheme) {
1299  MFXUtils::deleteChildren(frame);
1300  FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1301  scales.clear();
1302  thresholds.clear();
1303  buttons.clear();
1304  const bool fixed = scheme.isFixed();
1305  std::vector<double>::const_iterator scaleIt = scheme.getColors().begin();
1306  std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1307  std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1308  while (scaleIt != scheme.getColors().end()) {
1309  FXRealSpinner* scaleDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX);
1310  scaleDialer->setValue(*scaleIt);
1311  scales.push_back(scaleDialer);
1312  if (fixed) {
1313  new FXLabel(m, nameIt->c_str());
1314  new FXLabel(m, "");
1315  new FXLabel(m, "");
1316  } else {
1317  const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1318  FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, FRAME_THICK | FRAME_SUNKEN | LAYOUT_TOP | LAYOUT_CENTER_Y | SPIN_NOMAX | dialerOptions);
1319  threshDialer->setValue(*threshIt);
1320  thresholds.push_back(threshDialer);
1321  if (*threshIt == GUIVisualizationSettings::MISSING_DATA) {
1322  threshDialer->disable();
1323  threshDialer->hide();
1324  buttons.push_back(GUIDesigns::buildFXButton(m, "", "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1325  buttons.back()->hide();
1326  buttons.push_back(GUIDesigns::buildFXButton(m, TL("No Data"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1327  buttons.back()->disable();
1328  } else {
1329  buttons.push_back(GUIDesigns::buildFXButton(m, TL("Add"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1330  buttons.push_back(GUIDesigns::buildFXButton(m, TL("Remove"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1331  }
1332  }
1333  scaleIt++;
1334  threshIt++;
1335  nameIt++;
1336  }
1337  interpolation->setCheck(scheme.isInterpolated());
1338  if (fixed) {
1339  interpolation->disable();
1340  } else {
1341  if (scales.size() > 1) {
1342  interpolation->enable();
1343  if (interpolation->getCheck() != FALSE) {
1344  thresholds.front()->enable();
1345  } else {
1346  thresholds.front()->disable();
1347  }
1348  } else {
1349  interpolation->disable();
1350  thresholds.front()->disable();
1351  }
1352  }
1353  return m;
1354 }
1355 
1356 
1357 void
1360  if (doCreate) {
1361  m->create();
1362  }
1364  myEdgeRainbowPanel->myColorRainbow->disable();
1365  } else {
1367  }
1370  } else {
1372  }
1373  std::string activeSchemeName = myLaneEdgeColorMode->getText().text();
1374  std::string activeScaleSchemeName = myLaneEdgeScaleMode->getText().text();
1375  myParamKey->clearItems();
1376  myScalingParamKey->clearItems();
1378  myMeanDataID->hide();
1380  myParamKey->appendItem(mySettings->edgeParam.c_str());
1381  for (const std::string& attr : myParent->getEdgeLaneParamKeys(true)) {
1382  if (attr != mySettings->edgeParam) {
1383  myParamKey->appendItem(attr.c_str());
1384  }
1385  }
1386  myParamKey->enable();
1387  } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) {
1388  myParamKey->appendItem(mySettings->laneParam.c_str());
1389  for (const std::string& attr : myParent->getEdgeLaneParamKeys(false)) {
1390  if (attr != mySettings->laneParam) {
1391  myParamKey->appendItem(attr.c_str());
1392  }
1393  }
1394  myParamKey->enable();
1395  } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1396  myParamKey->appendItem(mySettings->edgeData.c_str());
1397  for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1398  if (attr != mySettings->edgeData) {
1399  myParamKey->appendItem(attr.c_str());
1400  }
1401  }
1402  myParamKey->enable();
1403  } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_LIVE) {
1404  if (mySettings->edgeDataID != "") {
1406  }
1407  for (const std::string& attr : myParent->getMeanDataIDs()) {
1408  if (attr != mySettings->edgeDataID) {
1409  myMeanDataID->appendIconItem(attr.c_str());
1410  }
1411  }
1412  if (myMeanDataID->getNumItems() > 0) {
1413  if (mySettings->edgeDataID == "") {
1415  }
1416  myMeanDataID->enable();
1417  myMeanDataID->show();
1418  myParamKey->appendItem(mySettings->edgeData.c_str());
1419  for (const std::string& attr : myParent->getMeanDataAttrs(mySettings->edgeDataID)) {
1420  if (attr != mySettings->edgeData) {
1421  myParamKey->appendItem(attr.c_str());
1422  }
1423  }
1424  myParamKey->enable();
1425  }
1426  } else {
1427  myParamKey->disable();
1428  }
1429 
1430  if (activeScaleSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1431  myScalingParamKey->appendItem(mySettings->edgeDataScaling.c_str());
1432  for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1433  if (attr != mySettings->edgeDataScaling) {
1434  myScalingParamKey->appendItem(attr.c_str());
1435  }
1436  }
1437  myScalingParamKey->enable();
1438  } else {
1439  myScalingParamKey->disable();
1440  }
1441 
1442  myParamKey->setNumVisible(myParamKey->getNumItems());
1443  myScalingParamKey->setNumVisible(myScalingParamKey->getNumItems());
1444  myLaneColorSettingFrame->getParent()->recalc();
1445 
1447  if (doCreate) {
1448  m->create();
1449  }
1450  myLaneScaleSettingFrame->getParent()->recalc();
1451 
1453  if (doCreate) {
1454  m->create();
1455  }
1456  activeSchemeName = myVehicleColorMode->getText().text();
1459  myVehicleParamKey->enable();
1460  } else {
1461  myVehicleParamKey->disable();
1462  }
1463  myVehicleColorSettingFrame->getParent()->recalc();
1464 
1466  if (doCreate) {
1467  m->create();
1468  }
1469  myVehicleScaleSettingFrame->getParent()->recalc();
1470  activeScaleSchemeName = myVehicleScaleMode->getText().text();
1471  if (activeScaleSchemeName == GUIVisualizationSettings::SCHEME_NAME_PARAM_NUMERICAL) {
1472  myVehicleScalingParamKey->enable();
1473  } else {
1474  myVehicleScalingParamKey->disable();
1475  }
1476 
1477 
1479  if (doCreate) {
1480  m->create();
1481  }
1482  myPersonColorSettingFrame->getParent()->recalc();
1484  if (doCreate) {
1485  m->create();
1486  }
1487  myContainerColorSettingFrame->getParent()->recalc();
1489  if (doCreate) {
1490  m->create();
1491  }
1492  myJunctionColorSettingFrame->getParent()->recalc();
1493  // POIs
1495  if (doCreate) {
1496  m->create();
1497  }
1498  myPOIColorSettingFrame->getParent()->recalc();
1499  // polygons
1501  if (doCreate) {
1502  m->create();
1503  }
1504  myPolyColorSettingFrame->getParent()->recalc();
1505 
1506  // data
1507  if (mySettings->netedit) {
1509  if (doCreate) {
1510  m->create();
1511  }
1512  activeSchemeName = myDataColorMode->getText().text();
1514  myDataParamKey->clearItems();
1515  myDataParamKey->appendItem(mySettings->relDataAttr.c_str());
1516  for (const std::string& attr : myParent->getRelDataAttrs()) {
1517  if (attr != mySettings->relDataAttr) {
1518  myDataParamKey->appendItem(attr.c_str());
1519  }
1520  }
1521  myDataParamKey->enable();
1522  } else {
1523  myDataParamKey->disable();
1524  }
1525  myDataColorSettingFrame->getParent()->recalc();
1526  }
1527 
1528  layout();
1529  update();
1530 }
1531 
1532 
1533 void
1535  myVehicleParamKey->clearItems();
1536  myVehicleTextParamKey->clearItems();
1537  myVehicleScalingParamKey->clearItems();
1538  myVehicleParamKey->appendItem(mySettings->vehicleParam.c_str());
1539  myVehicleTextParamKey->appendItem(mySettings->vehicleTextParam.c_str());
1541  for (const std::string& attr : myParent->getVehicleParamKeys(false)) {
1542  myVehicleParamKey->appendItem(attr.c_str());
1543  myVehicleTextParamKey->appendItem(attr.c_str());
1544  myVehicleScalingParamKey->appendItem(attr.c_str());
1545  }
1546  myVehicleParamKey->setNumVisible(myVehicleParamKey->getNumItems());
1547  myVehicleTextParamKey->setNumVisible(myVehicleTextParamKey->getNumItems());
1548  myVehicleScalingParamKey->setNumVisible(myVehicleScalingParamKey->getNumItems());
1549 }
1550 
1551 
1552 void
1554  myPOITextParamKey->clearItems();
1555  myPOITextParamKey->appendItem(mySettings->poiTextParam.c_str());
1556  for (const std::string& attr : myParent->getPOIParamKeys()) {
1557  myPOITextParamKey->appendItem(attr.c_str());
1558  }
1559  myPOITextParamKey->setNumVisible(myPOITextParamKey->getNumItems());
1560 }
1561 
1562 
1563 std::string
1566 }
1567 
1568 
1569 void
1571  if (name.c_str() == mySchemeName->getItemText(mySchemeName->getCurrentItem())) {
1572  return;
1573  }
1574  for (int i = 0; i < mySchemeName->getNumItems(); ++i) {
1575  if (name.c_str() == mySchemeName->getItemText(i)) {
1577  onCmdNameChange(nullptr, 0, (void*)name.c_str());
1578  return;
1579  }
1580  }
1581 }
1582 
1583 
1585  FXMatrix* parent,
1586  GUIDialog_ViewSettings* target,
1587  const std::string& title,
1588  const GUIVisualizationTextSettings& settings) {
1589  myCheck = new FXCheckButton(parent, title.c_str(), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1590  myCheck->setCheck(settings.showText);
1591  myMatrix0 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1592  mySelectedCheck = new FXCheckButton(myMatrix0, TL("Only for selected"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1593  mySelectedCheck->setCheck(settings.onlySelected);
1594  myConstSizeCheck = new FXCheckButton(myMatrix0, TL("constant text size"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1595  myConstSizeCheck->setCheck(settings.constSize);
1596  FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1597  new FXLabel(m1, TL("Size"), nullptr, GUIDesignViewSettingsLabel1);
1598  mySizeDial = new FXRealSpinner(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1599  mySizeDial->setRange(5, 1000);
1600  mySizeDial->setValue(settings.size);
1601  FXMatrix* m2 = new FXMatrix(parent, 4, GUIDesignViewSettingsMatrix5);
1602  new FXLabel(m2, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1604  new FXLabel(m2, TL("Background"), nullptr, GUIDesignViewSettingsLabel1);
1606 }
1607 
1608 
1611  return GUIVisualizationTextSettings(myCheck->getCheck() != FALSE,
1612  mySizeDial->getValue(),
1613  MFXUtils::getRGBColor(myColorWell->getRGBA()),
1614  MFXUtils::getRGBColor(myBGColorWell->getRGBA()),
1615  myConstSizeCheck->getCheck() != FALSE,
1616  mySelectedCheck->getCheck() != FALSE);
1617 }
1618 
1619 
1620 void
1622  myCheck->setCheck(settings.showText);
1623  mySizeDial->setValue(settings.size);
1624  myColorWell->setRGBA(MFXUtils::getFXColor(settings.color));
1625  myBGColorWell->setRGBA(MFXUtils::getFXColor(settings.bgColor));
1626  myConstSizeCheck->setCheck(settings.constSize);
1627  mySelectedCheck->setCheck(settings.onlySelected);
1628 }
1629 
1630 
1632  const GUIVisualizationSizeSettings& settings, GUIGlObjectType type):
1633  myDialogViewSettings(target),
1634  myType(type) {
1635  myCheck = new FXCheckButton(parent, TL("Draw with constant size when zoomed out"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1636  myCheck->setCheck(settings.constantSize);
1637  myCheckSelected = new FXCheckButton(parent, TL("Only for selected"), this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignCheckButtonViewSettings);
1638  myCheckSelected->setCheck(settings.constantSizeSelected);
1639  FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1640  new FXLabel(m1, TL("Minimum Size"), nullptr, GUIDesignViewSettingsLabel1);
1641  myMinSizeDial = new FXRealSpinner(m1, 10, this, MID_SIMPLE_VIEW_SIZECHANGE, GUIDesignViewSettingsSpinDial1);
1642  myMinSizeDial->setValue(settings.minSize);
1643  FXMatrix* m2 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1644  new FXLabel(m2, TL("Exaggerate by"), nullptr, GUIDesignViewSettingsLabel1);
1646  myExaggerateDial->setRange(0, 10000);
1647  myExaggerateDial->setValue(settings.exaggeration);
1648 }
1649 
1650 
1654  myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1655  myCheck->getCheck() != FALSE,
1656  myCheckSelected->getCheck() != FALSE);
1657 }
1658 
1659 
1660 void
1662  myCheck->setCheck(settings.constantSize);
1663  myCheckSelected->setCheck(settings.constantSizeSelected);
1664  myMinSizeDial->setValue(settings.minSize);
1665  myExaggerateDial->setValue(settings.exaggeration);
1666 }
1667 
1668 
1669 long
1670 GUIDialog_ViewSettings::SizePanel::onCmdSizeChange(FXObject* obj, FXSelector sel, void* ptr) {
1671  // mark boundaries for recomputing
1673  // continue as a normal change
1674  return myDialogViewSettings->onCmdColorChange(obj, sel, ptr);
1675 }
1676 
1677 
1679  FXComposite* parent,
1680  GUIDialog_ViewSettings* target,
1681  const GUIVisualizationRainbowSettings& settings) {
1682  FXMatrix* matrixRainbow = new FXMatrix(parent, 9, GUIDesignViewSettingsMatrix3);
1683  myColorRainbow = GUIDesigns::buildFXButton(matrixRainbow, TL("Recalibrate Rainbow"), "", "", nullptr, target, MID_SIMPLE_VIEW_COLORCHANGE,
1684  (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
1685  myRainbowStyle = new MFXComboBoxIcon(matrixRainbow, 5, false, 10, target, MID_SIMPLE_VIEW_RAINBOW_CHANGE, GUIDesignViewSettingsComboBox1);
1686  for (auto item : GUIVisualizationSettings::RAINBOW_SCHEMES) {
1687  myRainbowStyle->appendIconItem(item.first.c_str());
1688  }
1689  myHideMinCheck = new FXCheckButton(matrixRainbow, TL("min"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1690  myHideMinCheck->setCheck(settings.hideMin);
1691  myMinThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1692  myMinThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1693  myMinThreshold->setValue(settings.minThreshold);
1694  myHideMaxCheck = new FXCheckButton(matrixRainbow, TL("max"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1695  myHideMaxCheck->setCheck(settings.hideMax);
1696  myMaxThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1697  myMaxThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1698  myMaxThreshold->setValue(settings.maxThreshold);
1699  mySetNeutral = new FXCheckButton(matrixRainbow, TL("center"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1700  mySetNeutral->setCheck(settings.setNeutral);
1701  myNeutralThreshold = new FXRealSpinner(matrixRainbow, 6, target, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
1702  myNeutralThreshold->setRange(-std::numeric_limits<double>::max(), std::numeric_limits<double>::max());
1703  myNeutralThreshold->setValue(settings.neutralThreshold);
1704  myFixRange = new FXCheckButton(matrixRainbow, TL("fix range"), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1705  myFixRange->setCheck(settings.fixRange);
1706 }
1707 
1708 
1711  GUIVisualizationRainbowSettings res(myHideMinCheck->getCheck() != FALSE,
1712  myMinThreshold->getValue(),
1713  myHideMaxCheck->getCheck() != FALSE,
1714  myMaxThreshold->getValue(),
1715  mySetNeutral->getCheck() != FALSE,
1716  myNeutralThreshold->getValue(),
1717  myFixRange->getCheck() != FALSE);
1718  std::string sName = myRainbowStyle->getItemText(myRainbowStyle->getCurrentItem());
1720  return res;
1721 }
1722 
1723 
1724 void
1726  myHideMinCheck->setCheck(settings.hideMin);
1727  myMinThreshold->setValue(settings.minThreshold);
1728  myHideMaxCheck->setCheck(settings.hideMax);
1729  myMaxThreshold->setValue(settings.maxThreshold);
1730  mySetNeutral->setCheck(settings.setNeutral);
1731  myNeutralThreshold->setValue(settings.neutralThreshold);
1732  myFixRange->setCheck(settings.fixRange);
1733 }
1734 
1735 void
1736 GUIDialog_ViewSettings::buildHeader(FXVerticalFrame* contentFrame) {
1737  FXHorizontalFrame* horizontalFrame = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame1);
1738  mySchemeName = new MFXComboBoxIcon(horizontalFrame, 20, true, GUIDesignComboBoxVisibleItemsMedium,
1740  for (const auto& name : gSchemeStorage.getNames()) {
1741  const int index = mySchemeName->appendIconItem(name.c_str());
1742  if (name == mySettings->name) {
1743  mySchemeName->setCurrentItem((FXint)index);
1744  }
1745  }
1746 
1747  GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Save the setting to registry"), GUIIconSubSys::getIcon(GUIIcon::SAVE_DATABASE), this, MID_SIMPLE_VIEW_SAVE, GUIDesignButtonToolbar);
1748  GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Remove the setting from registry"), GUIIconSubSys::getIcon(GUIIcon::REMOVEDB), this, MID_SIMPLE_VIEW_DELETE, GUIDesignButtonToolbar);
1749  GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Export setting to file"), GUIIconSubSys::getIcon(GUIIcon::SAVE), this, MID_SIMPLE_VIEW_EXPORT, GUIDesignButtonToolbar);
1750  GUIDesigns::buildFXButton(horizontalFrame, "", "", TL("Load setting from file"), GUIIconSubSys::getIcon(GUIIcon::OPEN), this, MID_SIMPLE_VIEW_IMPORT, GUIDesignButtonToolbar);
1751 
1752  new FXVerticalSeparator(horizontalFrame);
1753  new FXLabel(horizontalFrame, TL("Export includes:"), nullptr, GUIDesignViewSettingsLabel1);
1754  mySaveViewPort = new FXCheckButton(horizontalFrame, TL("Viewport"));
1755  mySaveDelay = new FXCheckButton(horizontalFrame, TL("Delay"));
1756  mySaveDecals = new FXCheckButton(horizontalFrame, TL("Decals"));
1757  mySaveBreakpoints = new FXCheckButton(horizontalFrame, TL("Breakpoints"));
1758  if (mySettings->netedit) {
1759  mySaveBreakpoints->disable();
1760  }
1761 }
1762 
1763 
1764 void
1766  // tab for the background
1767  new FXTabItem(tabbook, TL("Background"), nullptr, GUIDesignViewSettingsTabItemBook1);
1768  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1769  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1770 
1771  FXMatrix* matrixColor = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
1772  new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1774 
1775  FXVerticalFrame* verticalFrameDecals = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame3);
1776  new FXLabel(verticalFrameDecals, TL("Decals:"));
1777  myDecalsTable = new MFXDecalsTable(this, verticalFrameDecals);
1778  FXHorizontalFrame* horizontalFrameButtonsDecals = new FXHorizontalFrame(verticalFrameDecals, GUIDesignViewSettingsHorizontalFrame2);
1779  GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Load XML Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_LOAD_DECALS_XML, GUIDesignViewSettingsButton1);
1780  GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Save XML Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_SAVE_DECALS_XML, GUIDesignViewSettingsButton1);
1781  GUIDesigns::buildFXButton(horizontalFrameButtonsDecals, TL("&Clear Decals"), "", "", nullptr, this, MID_SIMPLE_VIEW_CLEAR_DECALS, GUIDesignViewSettingsButton1);
1782 
1783  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1784 
1785  FXMatrix* matrixGrid = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1786  myShowGrid = new FXCheckButton(matrixGrid, TL("Toggle grid"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1787  myShowGrid->setCheck(mySettings->showGrid);
1788  new FXLabel(matrixGrid, "");
1789  FXMatrix* matrixGridX = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1790  new FXLabel(matrixGridX, TL("x-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1791  myGridXSizeDialer = new FXRealSpinner(matrixGridX, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1792  myGridXSizeDialer->setRange(1, 10000);
1794  FXMatrix* matrixGridY = new FXMatrix(matrixGrid, 2, GUIDesignViewSettingsMatrix2);
1795  new FXLabel(matrixGridY, TL("y-spacing"), nullptr, GUIDesignViewSettingsLabel1);
1796  myGridYSizeDialer = new FXRealSpinner(matrixGridY, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1797  myGridYSizeDialer->setRange(1, 10000);
1799 }
1800 
1801 
1802 void
1804  new FXTabItem(tabbook, TL("Streets"), nullptr, GUIDesignViewSettingsTabItemBook1);
1805  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1806  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1807  // ... color settings
1808  FXVerticalFrame* verticalFrameColor = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1809  FXMatrix* matrixColor = new FXMatrix(verticalFrameColor, 5, GUIDesignViewSettingsMatrix3);
1810  new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1813  myLaneColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1814  myLaneColorSettingFrame = new FXVerticalFrame(verticalFrameColor, GUIDesignViewSettingsVerticalFrame4);
1817  myMeanDataID->disable();
1818  myMeanDataID->hide();
1819  myParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1820  myParamKey->setEditable(true);
1821  myParamKey->disable();
1822 
1823  // rainbow settings
1824  myEdgeRainbowPanel = new RainbowPanel(verticalFrameColor, this, mySettings->edgeValueRainBow);
1825 
1826  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1827  // ... scale settings
1828  FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
1829  FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 5, GUIDesignViewSettingsMatrix3);
1830  new FXLabel(matrixScale, TL("Scale width"), nullptr, GUIDesignViewSettingsLabel1);
1833  myLaneScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1834  myLaneScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
1835  myScalingParamKey = new FXComboBox(matrixScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1836  myScalingParamKey->setEditable(true);
1837  myScalingParamKey->disable();
1838 
1842  } else {
1845  }
1846 
1847  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
1848  FXMatrix* matrixLanes = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
1849 
1850  myShowBikeMarkings = new FXCheckButton(matrixLanes, TL("Show bike markings"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1852  myShowLaneDecals = new FXCheckButton(matrixLanes, TL("Show turning arrows"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1854 
1855  myShowLinkRules = new FXCheckButton(matrixLanes, TL("Show right-of-way rules"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1857  myRealisticLinkRules = new FXCheckButton(matrixLanes, TL("Realistic stop line colors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1859 
1860  myShowLaneBorders = new FXCheckButton(matrixLanes, TL("Show lane borders"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1862  myShowLaneDirection = new FXCheckButton(matrixLanes, TL("Show lane direction"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1864 
1865  myHideMacroConnectors = new FXCheckButton(matrixLanes, TL("Hide macro connectors"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1867  myShowSublanes = new FXCheckButton(matrixLanes, TL("Show sublanes"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1869 
1870  myShowRails = new FXCheckButton(matrixLanes, TL("Show rails"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1871  myShowRails->setCheck(mySettings->showRails);
1872 
1873  mySpreadSuperposed = new FXCheckButton(matrixLanes, TL("Spread bidirectional railways/roads"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1874  mySpreadSuperposed->setHelpText(TL("Make both directional edges for a bidirectional railways or roads visible"));
1876 
1877  mySecondaryShape = new FXCheckButton(matrixLanes, TL("Secondary shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1879  new FXLabel(matrixLanes, " ", nullptr, GUIDesignViewSettingsLabel1);
1880 
1881  FXMatrix* tmp0 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1882  new FXLabel(tmp0, TL("Exaggerate width by"), nullptr, GUIDesignViewSettingsLabel1);
1884  myLaneWidthUpscaleDialer->setRange(0, 1000000);
1886 
1887  FXMatrix* tmp1 = new FXMatrix(matrixLanes, 2, GUIDesignViewSettingsMatrix5);
1888  new FXLabel(tmp1, TL("Minimum size"), nullptr, GUIDesignViewSettingsLabel1);
1890  myLaneMinWidthDialer->setRange(0, 1000000);
1892 
1893  // edge name
1894  myEdgeNamePanel = new NamePanel(matrixLanes, this, TL("Show edge id"), mySettings->edgeName);
1895  myStreetNamePanel = new NamePanel(matrixLanes, this, TL("Show street name"), mySettings->streetName);
1896  myEdgeValuePanel = new NamePanel(matrixLanes, this, TL("Show edge color value"), mySettings->edgeValue);
1897  myEdgeScaleValuePanel = new NamePanel(matrixLanes, this, TL("Show edge scale value"), mySettings->edgeScaleValue);
1898 }
1899 
1900 
1901 void
1903  new FXTabItem(tabbook, TL("Vehicles"), nullptr, GUIDesignViewSettingsTabItemBook1);
1904  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1905  FXVerticalFrame* verticalframe = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1906 
1907  FXMatrix* matrixShowAs = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix3);
1908  new FXLabel(matrixShowAs, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
1911  myVehicleShapeDetail->appendIconItem(TL("'triangles'"));
1912  myVehicleShapeDetail->appendIconItem(TL("'boxes'"));
1913  myVehicleShapeDetail->appendIconItem(TL("'simple shapes'"));
1914  myVehicleShapeDetail->appendIconItem(TL("'raster images'"));
1915  myVehicleShapeDetail->appendIconItem(TL("'circles'"));
1917 
1918  new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1919 
1920  FXMatrix* matrixColor = new FXMatrix(verticalframe, 4, GUIDesignViewSettingsMatrix3);
1921  new FXLabel(matrixColor, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
1925  myVehicleColorInterpolation = new FXCheckButton(matrixColor, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1926  myVehicleParamKey = new FXComboBox(matrixColor, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1927  myVehicleParamKey->setEditable(true);
1928  myVehicleParamKey->disable();
1929 
1930  myVehicleColorSettingFrame = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame4);
1931  new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1932 
1933  // vehicle scale settings
1934  FXVerticalFrame* verticalFrameScale = new FXVerticalFrame(verticalframe, GUIDesignViewSettingsVerticalFrame6);
1935  FXMatrix* matrixScale = new FXMatrix(verticalFrameScale, 4, GUIDesignViewSettingsMatrix3);
1936  new FXLabel(matrixScale, TL("Scale size"), nullptr, GUIDesignViewSettingsLabel1);
1939  myVehicleScaleInterpolation = new FXCheckButton(matrixScale, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1940  myVehicleScalingParamKey = new FXComboBox(matrixScale, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
1941  myVehicleScalingParamKey->setEditable(true);
1942  myVehicleScalingParamKey->disable();
1943  myVehicleScaleSettingFrame = new FXVerticalFrame(verticalFrameScale, GUIDesignViewSettingsVerticalFrame4);
1945  new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1946 
1947  FXMatrix* matrixVehicle = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
1948  myVehicleNamePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle id"), mySettings->vehicleName);
1949  myVehicleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle color value"), mySettings->vehicleValue);
1950  myVehicleScaleValuePanel = new NamePanel(matrixVehicle, this, TL("Show vehicle scale value"), mySettings->vehicleScaleValue);
1951  myVehicleTextPanel = new NamePanel(matrixVehicle, this, TL("Show vehicle text param"), mySettings->vehicleText);
1953  myVehicleTextParamKey->setEditable(true);
1954  //new FXHorizontalSeparator(verticalframe, GUIDesignHorizontalSeparator);
1955 
1956  FXMatrix* matrixShow = new FXMatrix(verticalframe, 2, GUIDesignMatrixViewSettings);
1957  myShowBlinker = new FXCheckButton(matrixShow, TL("Show blinker / brake lights"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1958  myShowBlinker->setCheck(mySettings->showBlinker);
1959  myShowMinGap = new FXCheckButton(matrixShow, TL("Show minimum gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1960  myShowMinGap->setCheck(mySettings->drawMinGap);
1961  myShowBrakeGap = new FXCheckButton(matrixShow, TL("Show brake gap"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1963  myShowBTRange = new FXCheckButton(matrixShow, TL("Show Bluetooth range"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1964  myShowBTRange->setCheck(mySettings->showBTRange);
1965  myShowRouteIndex = new FXCheckButton(matrixShow, TL("Show route index"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1967  myScaleLength = new FXCheckButton(matrixShow, TL("Scale length with geometry"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1968  myScaleLength->setCheck(mySettings->scaleLength);
1969  myShowParkingInfo = new FXCheckButton(matrixShow, TL("Show parking info"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1971  myShowChargingInfo = new FXCheckButton(matrixShow, TL("Show charging info"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1973  myDrawReversed = new FXCheckButton(matrixShow, TL("Draw reversed vehicles in reverse"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1975  //new FXLabel(matrixShow, " ", nullptr, GUIDesignViewSettingsLabel1);
1976  //myShowLaneChangePreference = new FXCheckButton(matrixShow, TL("Show lane change preference"), this, MID_SIMPLE_VIEW_COLORCHANGE);
1977  //myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
1978  //tmpc = new FXCheckButton(matrixShow, TL("Show needed headway"), 0 ,0);
1979  //tmpc->disable();
1980 
1981  //new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
1982 
1983  FXMatrix* matrixSize = new FXMatrix(verticalframe, 2, GUIDesignViewSettingsMatrix1);
1984  myVehicleSizePanel = new SizePanel(matrixSize, this, mySettings->vehicleSize, GLO_VEHICLE);
1985 }
1986 
1987 
1988 void
1990  new FXTabItem(tabbook, TL("Persons"), nullptr, GUIDesignViewSettingsTabItemBook1);
1991  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
1992  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
1993 
1994  FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
1995  new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
1998  myPersonShapeDetail->appendIconItem(TL("'triangles'"));
1999  myPersonShapeDetail->appendIconItem(TL("'circles'"));
2000  myPersonShapeDetail->appendIconItem(TL("'simple shapes'"));
2001  myPersonShapeDetail->appendIconItem(TL("'raster images'"));
2003 
2004  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2005 
2006  FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2007  new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2011  myPersonColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2012 
2013  myPersonColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2014 
2015  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2016 
2017  FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2018  myPersonNamePanel = new NamePanel(m103, this, TL("Show person id"), mySettings->personName);
2019  myPersonValuePanel = new NamePanel(m103, this, TL("Show person color value"), mySettings->personValue);
2020 
2021  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2022 
2023  FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2025 
2026  FXMatrix* m105 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
2027  myShowPedestrianNetwork = new FXCheckButton(m105, TL("Show JuPedSim pedestrian network"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2030 #ifdef JPS_VERSION
2031  if (mySettings->netedit) {
2032 #endif
2033  myShowPedestrianNetwork->disable();
2034  myPedestrianNetworkColor->disable();
2035 #ifdef JPS_VERSION
2036  }
2037 #endif
2038 }
2039 
2040 
2041 void
2043  new FXTabItem(tabbook, TL("Containers"), nullptr, GUIDesignViewSettingsTabItemBook1);
2044  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2045  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2046 
2047  FXMatrix* m101 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix3);
2048  new FXLabel(m101, TL("Show As"), nullptr, GUIDesignViewSettingsLabel1);
2051  myContainerShapeDetail->appendIconItem(TL("'triangles'"));
2053  myContainerShapeDetail->appendIconItem(TL("'simple shapes'"));
2054  myContainerShapeDetail->appendIconItem(TL("'raster images'"));
2056 
2057  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2058 
2059  FXMatrix* m102 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2060  new FXLabel(m102, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2064  myContainerColorInterpolation = new FXCheckButton(m102, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2065 
2066  myContainerColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2067 
2068  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2069 
2070  FXMatrix* m103 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2071  myContainerNamePanel = new NamePanel(m103, this, TL("Show container id"), mySettings->containerName);
2072 
2073  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2074 
2075  FXMatrix* m104 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2077 }
2078 
2079 
2080 void
2082  new FXTabItem(tabbook, TL("Junctions"), nullptr, GUIDesignViewSettingsTabItemBook1);
2083  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2084  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2085  FXMatrix* m41 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2086  new FXLabel(m41, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2090  myJunctionColorInterpolation = new FXCheckButton(m41, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2091 
2092  myJunctionColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2094 
2095  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2096  FXMatrix* m42 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2098  myDrawJunctionShape = new FXCheckButton(m42, TL("Draw junction shape"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2100  myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, TL("Draw crossings/walkingareas"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2102  myShowLane2Lane = new FXCheckButton(m42, TL("Show lane to lane connections"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2104  new FXLabel(m42, " ", nullptr, GUIDesignViewSettingsLabel1);
2105 
2106  myTLIndexPanel = new NamePanel(m42, this, TL("Show link tls index"), mySettings->drawLinkTLIndex);
2107  myJunctionIndexPanel = new NamePanel(m42, this, TL("Show link junction index"), mySettings->drawLinkJunctionIndex);
2108  myJunctionIDPanel = new NamePanel(m42, this, TL("Show junction id"), mySettings->junctionID);
2109  myInternalJunctionNamePanel = new NamePanel(m42, this, TL("Show internal junction id"), mySettings->internalJunctionName);
2110  myInternalEdgeNamePanel = new NamePanel(m42, this, TL("Show internal edge id"), mySettings->internalEdgeName);
2111  myCwaEdgeNamePanel = new NamePanel(m42, this, TL("Show crossing and walkingarea id"), mySettings->cwaEdgeName);
2112  myTLSPhaseIndexPanel = new NamePanel(m42, this, TL("Show traffic light phase index"), mySettings->tlsPhaseIndex);
2113  myTLSPhaseNamePanel = new NamePanel(m42, this, TL("Show traffic light phase name"), mySettings->tlsPhaseName);
2114  myJunctionNamePanel = new NamePanel(m42, this, TL("Show junction name"), mySettings->junctionName);
2115 }
2116 
2117 
2118 void
2120  new FXTabItem(tabbook, TL("Additional"), nullptr, GUIDesignViewSettingsTabItemBook1);
2121  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2122  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2123  // IDs
2124  FXMatrix* matrixIDs = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2125  myAddNamePanel = new NamePanel(matrixIDs, this, TL("Show object id"), mySettings->addName);
2126  myAddFullNamePanel = new NamePanel(matrixIDs, this, TL("Show full name"), mySettings->addFullName);
2127  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2128  //Sizes
2129  FXMatrix* matrixSizes = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2130  myAddSizePanel = new SizePanel(matrixSizes, this, mySettings->addSize, GLO_ADDITIONALELEMENT);
2131  // color
2132  FXMatrix* matrixColor = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2133  new FXLabel(matrixColor, TL("StoppingPlace"), nullptr, GUIDesignViewSettingsLabel1);
2134  new FXLabel(matrixColor, TL("body"), nullptr, GUIDesignViewSettingsLabel1);
2135  new FXLabel(matrixColor, TL("sign"), nullptr, GUIDesignViewSettingsLabel1);
2136  new FXLabel(matrixColor, "busStops", nullptr, GUIDesignViewSettingsLabel1);
2139  new FXLabel(matrixColor, "trainStops", nullptr, GUIDesignViewSettingsLabel1);
2142  new FXLabel(matrixColor, "containerStops", nullptr, GUIDesignViewSettingsLabel1);
2145  new FXLabel(matrixColor, "chargingStations", nullptr, GUIDesignViewSettingsLabel1);
2148 }
2149 
2150 
2151 void
2153  new FXTabItem(tabbook, TL("Demand"), nullptr, GUIDesignViewSettingsTabItemBook1);
2154  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2155  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2156  // elements
2157  FXMatrix* demandMatrix = new FXMatrix(verticalFrame, 3, GUIDesignMatrixViewSettings);
2158  new FXLabel(demandMatrix, TL("element"), nullptr, GUIDesignViewSettingsLabel1);
2159  new FXLabel(demandMatrix, TL("color"), nullptr, GUIDesignViewSettingsLabel1);
2160  new FXLabel(demandMatrix, TL("width"), nullptr, GUIDesignViewSettingsLabel1);
2161  new FXLabel(demandMatrix, "trips", nullptr, GUIDesignViewSettingsLabel1);
2163  myTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2165  new FXLabel(demandMatrix, "personTrips", nullptr, GUIDesignViewSettingsLabel1);
2167  myPersonTripWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2169  new FXLabel(demandMatrix, "walks", nullptr, GUIDesignViewSettingsLabel1);
2171  myWalkWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2173  new FXLabel(demandMatrix, "rides", nullptr, GUIDesignViewSettingsLabel1);
2175  myRideWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2177  new FXLabel(demandMatrix, "transport", nullptr, GUIDesignViewSettingsLabel1);
2179  myTransportWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2181  new FXLabel(demandMatrix, "tranship", nullptr, GUIDesignViewSettingsLabel1);
2183  myTranshipWidth = new FXRealSpinner(demandMatrix, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2185  // stops
2186  FXMatrix* stopMatrix = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2187  new FXLabel(stopMatrix, "stop", nullptr, GUIDesignViewSettingsLabel1);
2189  new FXLabel(stopMatrix, "waypoint", nullptr, GUIDesignViewSettingsLabel1);
2191  new FXLabel(stopMatrix, "stop (persons)", nullptr, GUIDesignViewSettingsLabel1);
2193  new FXLabel(stopMatrix, "stop (containers)", nullptr, GUIDesignViewSettingsLabel1);
2195 }
2196 
2197 
2198 void
2200  new FXTabItem(tabbook, TL("POIs"), nullptr, GUIDesignViewSettingsTabItemBook1);
2201  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2202  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2203 
2204  FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2205  new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2209  myPOIColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2210  myPOIColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2211 
2212  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2213 
2214  FXMatrix* m61 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2215 
2216  new FXLabel(m61, TL("POI detail"), nullptr, GUIDesignViewSettingsLabel1);
2218  myPoiDetail->setRange(3, 100);
2219  myPoiDetail->setValue(mySettings->poiDetail);
2220 
2221  myPOINamePanel = new NamePanel(m61, this, TL("Show poi id"), mySettings->poiName);
2222  myPOITypePanel = new NamePanel(m61, this, TL("Show poi type"), mySettings->poiType);
2223  myPOITextPanel = new NamePanel(m61, this, TL("Show poi text param"), mySettings->poiText);
2225  myPOITextParamKey->setEditable(true);
2226  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2227 
2228  FXMatrix* m62 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2229  myPOISizePanel = new SizePanel(m62, this, mySettings->poiSize, GLO_POI);
2230 }
2231 
2232 
2233 void
2235  new FXTabItem(tabbook, TL("Polygons"), nullptr, GUIDesignViewSettingsTabItemBook1);
2236  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2237  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2238 
2239  FXMatrix* m63 = new FXMatrix(verticalFrame, 3, GUIDesignViewSettingsMatrix3);
2240  new FXLabel(m63, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2244  myPolyColorInterpolation = new FXCheckButton(m63, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2245  myPolyColorSettingFrame = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame4);
2246 
2247  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2248 
2249  FXMatrix* m91 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2250  myPolyNamePanel = new NamePanel(m91, this, TL("Show polygon id"), mySettings->polyName);
2251  myPolyTypePanel = new NamePanel(m91, this, TL("Show polygon types"), mySettings->polyType);
2252  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2253 
2255 }
2256 
2257 
2258 void
2260  new FXTabItem(tabbook, TL("Selection"), nullptr, GUIDesignViewSettingsTabItemBook1);
2261  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2262  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2263 
2264  FXMatrix* m102 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2265  new FXLabel(m102, TL("Default Selection Color"), nullptr, GUIDesignViewSettingsLabel1);
2266  new FXLabel(m102, "", nullptr, GUIDesignViewSettingsLabel1);
2267 
2268  new FXLabel(m102, TL("Miscellaneous"), nullptr, GUIDesignViewSettingsLabel1);
2270  new FXLabel(m102, "Edge", nullptr, GUIDesignViewSettingsLabel1);
2272  new FXLabel(m102, "Lane Edge", nullptr, GUIDesignViewSettingsLabel1);
2274  new FXLabel(m102, "Connection", nullptr, GUIDesignViewSettingsLabel1);
2276  new FXLabel(m102, "Prohibition", nullptr, GUIDesignViewSettingsLabel1);
2278  new FXLabel(m102, "Crossing", nullptr, GUIDesignViewSettingsLabel1);
2280  new FXLabel(m102, "Additional", nullptr, GUIDesignViewSettingsLabel1);
2282  new FXLabel(m102, "Route", nullptr, GUIDesignViewSettingsLabel1);
2284  new FXLabel(m102, "Vehicle", nullptr, GUIDesignViewSettingsLabel1);
2286  new FXLabel(m102, "Person", nullptr, GUIDesignViewSettingsLabel1);
2288  new FXLabel(m102, "PersonPlan", nullptr, GUIDesignViewSettingsLabel1);
2290  new FXLabel(m102, "edgeData", nullptr, GUIDesignViewSettingsLabel1);
2292 }
2293 
2294 
2295 void
2297  new FXTabItem(tabbook, TL("Data"), nullptr, GUIDesignViewSettingsTabItemBook1);
2298  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2299  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2300  // ... color settings
2301  FXVerticalFrame* verticalFrame2 = new FXVerticalFrame(verticalFrame, GUIDesignViewSettingsVerticalFrame6);
2302  FXMatrix* m111 = new FXMatrix(verticalFrame2, 4, GUIDesignViewSettingsMatrix3);
2303  new FXLabel(m111, TL("Color"), nullptr, GUIDesignViewSettingsLabel1);
2306  myDataColorInterpolation = new FXCheckButton(m111, TL("Interpolate"), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
2307  myDataColorSettingFrame = new FXVerticalFrame(verticalFrame2, GUIDesignViewSettingsVerticalFrame4);
2308  myDataParamKey = new FXComboBox(m111, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxWidth100);
2309  myDataParamKey->setEditable(true);
2310  myDataParamKey->disable();
2312 
2313  // rainbow settings
2314  myDataRainbowPanel = new RainbowPanel(verticalFrame2, this, mySettings->dataValueRainBow);
2315 
2316  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2317  FXMatrix* m112 = new FXMatrix(verticalFrame, 2, GUIDesignViewSettingsMatrix1);
2318 
2319  new FXLabel(m112, TL("Exaggerate edgeRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2321  myEdgeRelationUpscaleDialer->setRange(0, 1000000);
2323 
2324  new FXLabel(m112, TL("Exaggerate tazRelation width by"), nullptr, GUIDesignViewSettingsLabel1);
2326  myTazRelationUpscaleDialer->setRange(0, 1000000);
2328 
2329  // text decoration
2330  myDataValuePanel = new NamePanel(m112, this, TL("Show data color value"), mySettings->dataValue);
2331 }
2332 
2333 
2334 void
2336  new FXTabItem(tabbook, TL("Legend"), nullptr, GUIDesignViewSettingsTabItemBook1);
2337  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2338  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2339 
2340  FXMatrix* m72 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2341  myShowSizeLegend = new FXCheckButton(m72, TL("Show Size Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2343  new FXLabel(m72, "");
2344  myShowColorLegend = new FXCheckButton(m72, TL("Show Edge Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2346  new FXLabel(m72, "");
2347  myShowVehicleColorLegend = new FXCheckButton(m72, TL("Show Vehicle Color Legend"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2349  new FXLabel(m72, "");
2350 }
2351 
2352 
2353 void
2355  new FXTabItem(tabbook, "openGL", nullptr, GUIDesignViewSettingsTabItemBook1);
2356  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2357  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2358 
2359  FXMatrix* m80 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2360  myTrueZ = new FXCheckButton(m80, "Draw all objects at their true Z-level", this, MID_SIMPLE_VIEW_COLORCHANGE);
2361  myTrueZ->setCheck(mySettings->trueZ);
2362  FXMatrix* m81 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2363  new FXLabel(m81, TL("Combobox max rows"), nullptr, GUIDesignViewSettingsLabel1);
2364  myComboRows = new FXRealSpinner(m81, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
2366  FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2367  myDisableHideByZoom = new FXCheckButton(m82, TL("Disable hide by zoom"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2368  myDisableHideByZoom->setHelpText(TL("Disable hiding edges with high zoom out"));
2370  FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2371  myDither = new FXCheckButton(m83, TL("Dither"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2372  myDither->setCheck(mySettings->dither);
2373  FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2374  myFPS = new FXCheckButton(m84, "FPS", this, MID_SIMPLE_VIEW_COLORCHANGE);
2375  myFPS->setCheck(mySettings->fps);
2376  FXMatrix* m85 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2377  myDrawBoundaries = new FXCheckButton(m85, TL("Draw boundaries"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2379  FXMatrix* m86 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2380  myForceDrawForRectangleSelection = new FXCheckButton(m86, TL("Force draw for rectangle selection"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2382  FXMatrix* m87 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2383  myDisableDottedContours = new FXCheckButton(m87, TL("Disable dotted contours during selection/deletion"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2385  FXMatrix* m88 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2386  myRecalculateBoundaries = GUIDesigns::buildFXButton(m88, TL("Recalculate boundaries"), "", "", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
2387  (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
2388  FXMatrix* m89 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2389  myGeometryIndicesPanel = new NamePanel(m89, this, TL("Show geometry point indices"), mySettings->geometryIndices);
2390 }
2391 
2392 
2393 void
2395  myFrame3D = new FXTabItem(tabbook, TL("3D view"), nullptr, GUIDesignViewSettingsTabItemBook1);
2396  FXScrollWindow* scrollWindow = new FXScrollWindow(tabbook);
2397  FXVerticalFrame* verticalFrame = new FXVerticalFrame(scrollWindow, GUIDesignViewSettingsVerticalFrame2);
2398 
2399  FXMatrix* m82 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2400  myShow3DTLSLinkMarkers = new FXCheckButton(m82, TL("Show TLS link markers"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2402  //FXMatrix* m83 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2403  myShow3DTLSDomes = new FXCheckButton(m82, TL("Show domes around TLS models from decals"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2405  //FXMatrix* m84 = new FXMatrix(verticalFrame, 1, GUIDesignMatrixViewSettings);
2406  myGenerate3DTLSModels = new FXCheckButton(m82, TL("Show auto-generated TLS models"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2408  myShow3DHeadUpDisplay = new FXCheckButton(m82, TL("Show head-up display"), this, MID_SIMPLE_VIEW_COLORCHANGE);
2410 
2411  new FXHorizontalSeparator(verticalFrame, GUIDesignHorizontalSeparator);
2412 
2413  FXMatrix* m2 = new FXMatrix(verticalFrame, 2, GUIDesignMatrixViewSettings);
2414  new FXLabel(m2, TL("Sun brightness"), nullptr, GUIDesignViewSettingsLabel1);
2416  myLight3DFactor->setRange(0, 255);
2418  /*
2419  new FXLabel(m2, "Ambient", nullptr, GUIDesignViewSettingsLabel1);
2420  myAmbient3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->ambient3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2421  myAmbient3DLight->setOpaqueOnly(true);
2422  new FXLabel(m2, "Diffuse", nullptr, GUIDesignViewSettingsLabel1);
2423  myDiffuse3DLight = new FXColorWell(m2, MFXUtils::getFXColor(mySettings->diffuse3DLight), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
2424  myDiffuse3DLight->setOpaqueOnly(true);
2425  */
2426  new FXLabel(m2, TL("Sky color"), nullptr, GUIDesignViewSettingsLabel1);
2428  mySkyColor->setOpaqueOnly(true);
2429 
2430 #ifdef HAVE_OSG
2432 #else
2433  myFrame3D->disable();
2434 #endif
2435 }
2436 
2437 
2438 void
2439 GUIDialog_ViewSettings::buildButtons(FXVerticalFrame* contentFrame) {
2440  FXHorizontalFrame* horizontalFrameButtons = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame2);
2441  FXButton* OK = GUIDesigns::buildFXButton(horizontalFrameButtons, TL("&OK"), "", "", nullptr, this, MID_SETTINGS_OK, GUIDesignViewSettingsButton2);
2442  GUIDesigns::buildFXButton(horizontalFrameButtons, TL("&Cancel"), "", "", nullptr, this, MID_SETTINGS_CANCEL, GUIDesignViewSettingsButton3);
2443  OK->setFocus();
2444 }
2445 
2446 /****************************************************************************/
long long int SUMOTime
Definition: GUI.h:35
@ MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
Definition: GUIAppEnum.h:631
@ MID_SIMPLE_VIEW_CLEAR_DECALS
For the clear-decals - button.
Definition: GUIAppEnum.h:647
@ MID_SIMPLE_VIEW_RAINBOW_CHANGE
For changing rainbow style.
Definition: GUIAppEnum.h:649
@ MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
Definition: GUIAppEnum.h:633
@ MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
Definition: GUIAppEnum.h:639
@ MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
Definition: GUIAppEnum.h:637
@ MID_SIMPLE_VIEW_DELETE
For the delete - button.
Definition: GUIAppEnum.h:635
@ MID_SIMPLE_VIEW_LOAD_DECALS_XML
For the load-decals - button.
Definition: GUIAppEnum.h:643
@ MID_SIMPLE_VIEW_LOAD_DECAL
For the load-decals - button.
Definition: GUIAppEnum.h:641
@ MID_SETTINGS_OK
Ok-button was pushed.
Definition: GUIAppEnum.h:551
@ MID_SETTINGS_CANCEL
Cancel-button was pushed.
Definition: GUIAppEnum.h:553
@ MID_SIMPLE_VIEW_SIZECHANGE
Informs the dialog about a size value's change.
Definition: GUIAppEnum.h:629
@ MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
Definition: GUIAppEnum.h:627
@ MID_SIMPLE_VIEW_SAVE_DECALS_XML
For the save-decals - button.
Definition: GUIAppEnum.h:645
GUICompleteSchemeStorage gSchemeStorage
#define GUIDesignViewSettingsColorWell2
Definition: GUIDesigns.h:588
#define GUIDesignViewSettingsMatrix3
Definition: GUIDesigns.h:545
#define GUIDesignViewSettingsMainDialog
Definition: GUIDesigns.h:516
#define GUIDesignViewSettingsMatrix5
Definition: GUIDesigns.h:549
#define GUIDesignComboBoxStatic
Combo box static (not editable)
Definition: GUIDesigns.h:302
#define GUIDesignViewSettingsComboBox1
Combo boxes.
Definition: GUIDesigns.h:552
#define GUIDesignComboBoxWidth100
comboBox with thick frame, width 100
Definition: GUIDesigns.h:314
#define GUIDesignViewSettingsHorizontalFrame3
Definition: GUIDesigns.h:538
#define GUIDesignViewSettingsVerticalFrame6
Definition: GUIDesigns.h:531
#define GUIDesignViewSettingsHorizontalFrame2
Definition: GUIDesigns.h:536
#define GUIDesignViewSettingsButton2
Definition: GUIDesigns.h:577
#define GUIDesignComboBoxVisibleItemsLarge
combo box large small
Definition: GUIDesigns.h:56
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition: GUIDesigns.h:129
#define GUIDesignViewSettingsMatrix1
Matrix.
Definition: GUIDesigns.h:541
#define GUIDesignViewSettingsColorWell1
Color wells.
Definition: GUIDesigns.h:586
#define GUIDesignComboBoxVisibleItemsMedium
combo box medium small
Definition: GUIDesigns.h:53
#define GUIDesignViewSettingsButton4
Definition: GUIDesigns.h:581
#define GUIDesignViewSettingsDialog
Definition: GUIDesigns.h:518
#define GUIDesignViewSettingsMatrix4
Definition: GUIDesigns.h:547
#define GUIDesignViewSettingsSpinDial2
Definition: GUIDesigns.h:559
#define GUIDesignViewSettingsButton5
Definition: GUIDesigns.h:583
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
Definition: GUIDesigns.h:534
#define GUIDesignViewSettingsSpinDial1
Definition: GUIDesigns.h:557
#define GUIDesignViewSettingsVerticalFrame5
Definition: GUIDesigns.h:529
#define GUIDesignViewSettingsMatrix2
Definition: GUIDesigns.h:543
#define GUIDesignViewSettingsLabel1
Label.
Definition: GUIDesigns.h:567
#define GUIDesignViewSettingsTabBook1
Tab books.
Definition: GUIDesigns.h:562
#define GUIDesignViewSettingsButton3
Definition: GUIDesigns.h:579
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
Definition: GUIDesigns.h:361
#define GUIDesignViewSettingsVerticalFrame2
Definition: GUIDesigns.h:523
#define GUIDesignViewSettingsVerticalFrame3
Definition: GUIDesigns.h:525
#define GUIDesignViewSettingsColorWell
ColorWell.
Definition: GUIDesigns.h:555
#define GUIDesignHorizontalSeparator
Definition: GUIDesigns.h:466
#define GUIDesignViewSettingsVerticalFrame4
Definition: GUIDesigns.h:527
#define GUIDesignViewSettingsTabItemBook1
Definition: GUIDesigns.h:564
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
Definition: GUIDesigns.h:521
#define GUIDesignViewSettingsLabel2
Definition: GUIDesigns.h:569
#define GUIDesignViewSettingsTextField1
textFields
Definition: GUIDesigns.h:572
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
Definition: GUIDesigns.h:213
#define GUIDesignViewSettingsButton1
Buttons.
Definition: GUIDesigns.h:575
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.
@ OPEN
open icons
@ SAVE_DATABASE
@ SAVE
save icons
#define TL(string)
Definition: MsgHandler.h:315
std::string time2string(SUMOTime t, bool humanReadable)
convert SUMOTime to string (independently of global format setting)
Definition: SUMOTime.cpp:69
@ 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
#define UNUSED_PARAMETER(x)
Definition: StdDefs.h:30
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
Definition: GUIDesigns.cpp:128
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
FXCheckButton * myCheck
check 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
FXTabItem * myFrame3D
Frame3D.
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
FXCheckButton * myRealisticLinkRules
void show()
show view settings dialog
std::vector< FXButton * > myJunctionButtons
FXColorWell * mySelectedProhibitionColor
FXCheckButton * myGenerate3DTLSModels
FXCheckButton * myShowVehicleColorLegend
void buildStreetsFrame(FXTabBook *tabbook)
FXRealSpinner * myTripWidth
demand widths
FXCheckButton * mySaveViewPort
load/save-menu
void buildVehiclesFrame(FXTabBook *tabbook)
std::vector< FXColorWell * > myJunctionColors
FXRealSpinner * myLaneMinWidthDialer
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
FXCheckButton * myHideMacroConnectors
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.
FXCheckButton * myShow3DHeadUpDisplay
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.
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
FXCheckButton * myForceDrawForRectangleSelection
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)
FXCheckButton * myShow3DTLSLinkMarkers
3D
MFXComboBoxIcon * myPOIColorMode
POIs.
void updatePOIParams()
reload known POI parameters
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)
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.
std::vector< FXButton * > myPOIButtons
FXColorWell * myChargingStationColorSign
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::string & getName() const
const std::vector< double > & getThresholds() const
void setColor(const int pos, const T &color)
void setThreshold(const int pos, const double threshold)
void removeColor(const int pos)
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
const std::vector< std::string > & getNames() 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 std::vector< std::string > getMeanDataAttrs(const std::string &meanDataID) const
return list of available attributes for the given meanData id
virtual std::vector< std::string > getPOIParamKeys() const
return list of available vehicle parameters
virtual std::vector< std::string > getMeanDataIDs() const
return list of loaded edgeData ids (being computed in the current simulation)
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, const GUIVisualizationRainbowSettings &)
recalibrate color scheme according to the current value range
void setDelay(double delay)
Sets the delay of the parent application.
virtual std::vector< std::string > getRelDataAttrs() const
return list of loaded edgeRelation and tazRelation attributes
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
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 > getEdgeDataAttrs() const
return list of loaded edgeData attributes
virtual void drawPedestrianNetwork(const GUIVisualizationSettings &) const
Draw (or not) the JuPedSim pedestrian network.
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
virtual void recalculateBoundaries()
recalculate boundaries
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
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 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
void remove(GUIDialog_EditViewport *)
remove viewport
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.
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
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
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
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
static const std::string SCHEME_NAME_EDGEDATA_LIVE
GUIVisualizationTextSettings personValue
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
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.
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
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 schme.
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 schme.
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
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 crosings 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
ComboBox with icon.
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.
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 void deleteChildren(FXWindow *w)
Deletes all children of the given window.
Definition: MFXUtils.cpp:30
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString &currentFolder)
Returns the file name to write.
Definition: MFXUtils.cpp:82
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:112
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:106
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:61
void close()
Closes the device and removes it from the dictionary.
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:254
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 bool startsWith(const std::string &str, const std::string prefix)
Checks whether a given string starts with the prefix.
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;
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
@brif flag to avoid size changes
double personTripWidth
width for person trips