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

Generated by: LCOV version 1.14