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