LCOV - code coverage report
Current view: top level - src/utils/gui/windows - GUIDialog_ViewSettings.cpp (source / functions) Coverage Total Hit
Test: lcov.info Lines: 0.0 % 1630 0
Test Date: 2024-12-21 15:45:41 Functions: 0.0 % 65 0

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

Generated by: LCOV version 2.0-1