Eclipse SUMO - Simulation of Urban MObility
GUIDialog_ViewSettings.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // The dialog to change the view (gui) settings.
18 /****************************************************************************/
19 
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #include <config.h>
25 
26 #include <fstream>
32 #include <utils/common/RGBColor.h>
33 #include <utils/common/ToString.h>
43 #include "GUIDialog_EditViewport.h"
44 #include "GUIDialog_ViewSettings.h"
45 
46 
47 // ===========================================================================
48 // FOX callback mapping
49 // ===========================================================================
50 FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[] = {
54  FXMAPFUNC(SEL_COMMAND, MID_SETTINGS_OK, GUIDialog_ViewSettings::onCmdOk),
57 
66 
69 
70 };
71 
72 
73 FXIMPLEMENT(GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
74 
75 
76 // ===========================================================================
77 // method definitions
78 // ===========================================================================
79 GUIDialog_ViewSettings::GUIDialog_ViewSettings(GUISUMOAbstractView* parent, GUIVisualizationSettings* settings, std::vector<GUISUMOAbstractView::Decal>* decals, FXMutex* decalsLock) :
80  FXDialogBox(parent, "View Settings", GUIDesignViewSettingsMainDialog),
81  myParent(parent), mySettings(settings),
82  myDecals(decals), myDecalsLock(decalsLock),
83  myDecalsTable(nullptr) {
84  myBackup = (*mySettings);
85 
86  FXVerticalFrame* contentFrame = new FXVerticalFrame(this, GUIDesignViewSettingsVerticalFrame1);
87  //
88  {
89  FXHorizontalFrame* frame0 = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame1);
90  mySchemeName = new FXComboBox(frame0, 20, this, MID_SIMPLE_VIEW_NAMECHANGE, GUIDesignViewSettingsComboBox1);
91  const std::vector<std::string>& names = gSchemeStorage.getNames();
92  for (std::vector<std::string>::const_iterator i = names.begin(); i != names.end(); ++i) {
93  int index = mySchemeName->appendItem((*i).c_str());
94  if ((*i) == mySettings->name) {
95  mySchemeName->setCurrentItem((FXint) index);
96  }
97  }
98  mySchemeName->setNumVisible(5);
99 
100  new FXButton(frame0, "\t\tSave the setting to registry", GUIIconSubSys::getIcon(ICON_SAVEDB), this, MID_SIMPLE_VIEW_SAVE, GUIDesignButtonToolbar);
101  new FXButton(frame0, "\t\tRemove the setting from registry", GUIIconSubSys::getIcon(ICON_REMOVEDB), this, MID_SIMPLE_VIEW_DELETE, GUIDesignButtonToolbar);
102  new FXButton(frame0, "\t\tExport setting to file", GUIIconSubSys::getIcon(ICON_SAVE), this, MID_SIMPLE_VIEW_EXPORT, GUIDesignButtonToolbar);
103  new FXButton(frame0, "\t\tLoad setting from file", GUIIconSubSys::getIcon(ICON_OPEN_CONFIG), this, MID_SIMPLE_VIEW_IMPORT, GUIDesignButtonToolbar);
104 
105  new FXVerticalSeparator(frame0);
106  new FXLabel(frame0, "Export includes:", nullptr, GUIDesignViewSettingsLabel1);
107  mySaveViewPort = new FXCheckButton(frame0, "Viewport");
108  mySaveDelay = new FXCheckButton(frame0, "Delay");
109  mySaveDecals = new FXCheckButton(frame0, "Decals");
110  mySaveBreakpoints = new FXCheckButton(frame0, "Breakpoints");
111  if (settings->netedit) {
112  mySaveBreakpoints->disable();
113  }
114  }
115  //
116  FXTabBook* tabbook = new FXTabBook(contentFrame, nullptr, 0, GUIDesignViewSettingsTabBook1);
117  {
118  // tab for the background
119  new FXTabItem(tabbook, "Background", nullptr, GUIDesignViewSettingsTabItemBook1);
120  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
121  FXVerticalFrame* frame1 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
122 
123  FXMatrix* m11 = new FXMatrix(frame1, 2, GUIDesignMatrixViewSettings);
124  new FXLabel(m11, "Color", nullptr, GUIDesignViewSettingsLabel1);
125  myBackgroundColor = new FXColorWell(m11, MFXUtils::getFXColor(settings->backgroundColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
126 
127  new FXHorizontalSeparator(frame1, GUIDesignHorizontalSeparator);
128 
129  FXVerticalFrame* frame11 = new FXVerticalFrame(frame1, GUIDesignViewSettingsVerticalFrame3);
130  new FXLabel(frame11, "Decals:");
131  myDecalsFrame = new FXVerticalFrame(frame11);
132  FXHorizontalFrame* frame111 = new FXHorizontalFrame(frame11, GUIDesignViewSettingsHorizontalFrame2);
133  new FXButton(frame111, "&Load Decals", nullptr, this, MID_SIMPLE_VIEW_LOAD_DECALS, GUIDesignViewSettingsButton1);
134  new FXButton(frame111, "&Save Decals", nullptr, this, MID_SIMPLE_VIEW_SAVE_DECALS, GUIDesignViewSettingsButton1);
135 
136  new FXHorizontalSeparator(frame1, GUIDesignHorizontalSeparator);
137 
138  FXMatrix* m12 = new FXMatrix(frame1, 2, GUIDesignViewSettingsMatrix1);
139  myShowGrid = new FXCheckButton(m12, "Show grid", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
140  myShowGrid->setCheck(mySettings->showGrid);
141  new FXLabel(m12, "");
142  FXMatrix* m121 = new FXMatrix(m12, 2, GUIDesignViewSettingsMatrix2);
143  new FXLabel(m121, "x-spacing", nullptr, GUIDesignViewSettingsLabel1);
144  myGridXSizeDialer = new FXRealSpinner(m121, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
145  myGridXSizeDialer->setRange(1, 10000);
146  myGridXSizeDialer->setValue(mySettings->gridXSize);
147  FXMatrix* m122 = new FXMatrix(m12, 2, GUIDesignViewSettingsMatrix2);
148  new FXLabel(m122, "y-spacing", nullptr, GUIDesignViewSettingsLabel1);
149  myGridYSizeDialer = new FXRealSpinner(m122, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
150  myGridYSizeDialer->setRange(1, 10000);
151  myGridYSizeDialer->setValue(mySettings->gridXSize);
152  }
153  {
154  // tab for the streets
155  new FXTabItem(tabbook, "Streets", nullptr, GUIDesignViewSettingsTabItemBook1);
156  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
157  FXVerticalFrame* frame2 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
158  // ... color settings
159  FXVerticalFrame* frame22 = new FXVerticalFrame(frame2, GUIDesignViewSettingsVerticalFrame6);
160  FXMatrix* m21 = new FXMatrix(frame22, 4, GUIDesignViewSettingsMatrix3);
161  new FXLabel(m21, "Color", nullptr, GUIDesignViewSettingsLabel1);
162  myLaneEdgeColorMode = new MFXIconComboBox(m21, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
163  myLaneColorInterpolation = new FXCheckButton(m21, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
164  myLaneColorSettingFrame = new FXVerticalFrame(frame22, GUIDesignViewSettingsVerticalFrame4);
165  myParamKey = new FXComboBox(m21, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
166  myParamKey->disable();
167  myParamKey->setEditable(true);
168 
169  // rainbow settings
170  FXMatrix* m24 = new FXMatrix(frame22, 3, GUIDesignViewSettingsMatrix3);
171  myLaneColorRainbow = new FXButton(m24, "Recalibrate Rainbow", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
172  (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
173  myLaneColorRainbowCheck = new FXCheckButton(m24, "hide below threshold", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
174  myLaneColorRainbowThreshold = new FXRealSpinner(m24, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, REALSPIN_NOMIN | GUIDesignViewSettingsSpinDial2);
175 
176  new FXHorizontalSeparator(frame2, GUIDesignHorizontalSeparator);
177  // ... scale settings
178  FXVerticalFrame* frame23 = new FXVerticalFrame(frame2, GUIDesignViewSettingsVerticalFrame6);
179  FXMatrix* m23 = new FXMatrix(frame23, 3, GUIDesignViewSettingsMatrix3);
180  new FXLabel(m23, "Scale width", nullptr, GUIDesignViewSettingsLabel1);
181  myLaneEdgeScaleMode = new MFXIconComboBox(m23, 30, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
182  myLaneScaleInterpolation = new FXCheckButton(m23, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
183  myLaneScaleSettingFrame = new FXVerticalFrame(frame23, GUIDesignViewSettingsVerticalFrame4);
184 
186  mySettings->edgeColorer.fill(*myLaneEdgeColorMode);
187  mySettings->edgeScaler.fill(*myLaneEdgeScaleMode);
188  myLaneEdgeColorMode->setNumVisible((int)mySettings->edgeColorer.size());
189  myLaneEdgeScaleMode->setNumVisible((int)mySettings->edgeScaler.size());
190  } else {
191  mySettings->laneColorer.fill(*myLaneEdgeColorMode);
192  mySettings->laneScaler.fill(*myLaneEdgeScaleMode);
193  myLaneEdgeColorMode->setNumVisible((int)mySettings->laneColorer.size());
194  myLaneEdgeScaleMode->setNumVisible((int)mySettings->laneScaler.size());
195  }
196 
197  new FXHorizontalSeparator(frame2, GUIDesignHorizontalSeparator);
198  FXMatrix* m22 = new FXMatrix(frame2, 2, GUIDesignViewSettingsMatrix1);
199  myShowLaneBorders = new FXCheckButton(m22, "Show lane borders", this, MID_SIMPLE_VIEW_COLORCHANGE);
200  myShowLaneBorders->setCheck(mySettings->laneShowBorders);
201  myShowBikeMarkings = new FXCheckButton(m22, "Show bike markings", this, MID_SIMPLE_VIEW_COLORCHANGE);
202  myShowBikeMarkings->setCheck(mySettings->showBikeMarkings);
203  myShowLaneDecals = new FXCheckButton(m22, "Show turning arrows", this, MID_SIMPLE_VIEW_COLORCHANGE);
204  myShowLaneDecals->setCheck(mySettings->showLinkDecals);
205  new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1);
206  myShowLinkRules = new FXCheckButton(m22, "Show right-of-way rules", this, MID_SIMPLE_VIEW_COLORCHANGE);
207  myShowLinkRules->setCheck(mySettings->showLinkRules);
208  new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1);
209  myShowRails = new FXCheckButton(m22, "Show rails", this, MID_SIMPLE_VIEW_COLORCHANGE);
210  myShowRails->setCheck(mySettings->showRails);
211  new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1);
212  myHideMacroConnectors = new FXCheckButton(m22, "Hide macro connectors", this, MID_SIMPLE_VIEW_COLORCHANGE);
213  myHideMacroConnectors->setCheck(mySettings->hideConnectors);
214  new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1);
215  myShowLaneDirection = new FXCheckButton(m22, "Show lane direction", this, MID_SIMPLE_VIEW_COLORCHANGE);
216  myShowLaneDirection->setCheck(mySettings->showLaneDirection);
217  new FXLabel(m22, " ", nullptr, GUIDesignViewSettingsLabel1);
218  myShowSublanes = new FXCheckButton(m22, "Show sublanes", this, MID_SIMPLE_VIEW_COLORCHANGE);
219  myShowSublanes->setCheck(mySettings->showSublanes);
220  mySpreadSuperposed = new FXCheckButton(m22, "Spread bidirectional railway\t\tMake both directional edges for a bidirectional railway visible", this, MID_SIMPLE_VIEW_COLORCHANGE);
221  mySpreadSuperposed->setCheck(mySettings->spreadSuperposed);
222  new FXLabel(m22, "Exaggerate width by", nullptr, GUIDesignViewSettingsLabel1);
223  myLaneWidthUpscaleDialer = new FXRealSpinner(m22, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial2);
224  myLaneWidthUpscaleDialer->setRange(0, 10000);
225  myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration);
226 
227  new FXLabel(m22, "Minimum size", nullptr, GUIDesignViewSettingsLabel1);
228  myLaneMinWidthDialer = new FXRealSpinner(m22, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial2);
229  myLaneMinWidthDialer->setRange(0, 10000);
230  myLaneMinWidthDialer->setValue(mySettings->laneMinSize);
231 
232  // edge name
233  myEdgeNamePanel = new NamePanel(m22, this, "Show edge name", mySettings->edgeName);
234  myStreetNamePanel = new NamePanel(m22, this, "Show street name", mySettings->streetName);
235  myEdgeValuePanel = new NamePanel(m22, this, "Show edge color value", mySettings->edgeValue);
236  }
237  {
238  // vehicles
239  new FXTabItem(tabbook, "Vehicles", nullptr, GUIDesignViewSettingsTabItemBook1);
240  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
241  FXVerticalFrame* frame3 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
242 
243  FXMatrix* m31 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3);
244  new FXLabel(m31, "Show As", nullptr, GUIDesignViewSettingsLabel1);
245  myVehicleShapeDetail = new MFXIconComboBox(m31, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
246  myVehicleShapeDetail->appendItem("'triangles'");
247  myVehicleShapeDetail->appendItem("'boxes'");
248  myVehicleShapeDetail->appendItem("'simple shapes'");
249  myVehicleShapeDetail->appendItem("'raster images'");
250  myVehicleShapeDetail->setNumVisible(4);
251  myVehicleShapeDetail->setCurrentItem(settings->vehicleQuality);
252 
253  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
254 
255  FXMatrix* m32 = new FXMatrix(frame3, 4, GUIDesignViewSettingsMatrix3);
256  new FXLabel(m32, "Color", nullptr, GUIDesignViewSettingsLabel1);
257  myVehicleColorMode = new MFXIconComboBox(m32, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
258  mySettings->vehicleColorer.fill(*myVehicleColorMode);
259  myVehicleColorMode->setNumVisible((int)mySettings->vehicleColorer.size());
260  myVehicleColorInterpolation = new FXCheckButton(m32, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
261  myVehicleParamKey = new FXComboBox(m32, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
262  myVehicleParamKey->setEditable(true);
263  myVehicleParamKey->disable();
264 
265  myVehicleColorSettingFrame = new FXVerticalFrame(frame3, GUIDesignViewSettingsVerticalFrame4);
266 
267  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
268 
269  FXMatrix* m35 = new FXMatrix(frame3, 2, GUIDesignMatrixViewSettings);
270  myVehicleNamePanel = new NamePanel(m35, this, "Show vehicle name", mySettings->vehicleName);
271  myVehicleValuePanel = new NamePanel(m35, this, "Show vehicle color value", mySettings->vehicleValue);
272  myVehicleTextPanel = new NamePanel(m35, this, "Show vehicle text param", mySettings->vehicleText);
273  myVehicleTextParamKey = new FXComboBox(myVehicleTextPanel->myMatrix0, 1, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
274  myVehicleTextParamKey->setEditable(true);
275 
276  //new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
277 
278  FXMatrix* m33 = new FXMatrix(frame3, 2, GUIDesignMatrixViewSettings);
279  myShowBlinker = new FXCheckButton(m33, "Show blinker / brake lights", this, MID_SIMPLE_VIEW_COLORCHANGE);
280  myShowBlinker->setCheck(mySettings->showBlinker);
281  myShowMinGap = new FXCheckButton(m33, "Show minimum gap", this, MID_SIMPLE_VIEW_COLORCHANGE);
282  myShowMinGap->setCheck(mySettings->drawMinGap);
283  myShowBrakeGap = new FXCheckButton(m33, "Show brake gap", this, MID_SIMPLE_VIEW_COLORCHANGE);
284  myShowBrakeGap->setCheck(mySettings->drawBrakeGap);
285  myShowBTRange = new FXCheckButton(m33, "Show Bluetooth range", this, MID_SIMPLE_VIEW_COLORCHANGE);
286  myShowBTRange->setCheck(mySettings->showBTRange);
287  myShowRouteIndex = new FXCheckButton(m33, "Show route index", this, MID_SIMPLE_VIEW_COLORCHANGE);
288  myShowRouteIndex->setCheck(mySettings->showRouteIndex);
289  new FXLabel(m33, " ", nullptr, GUIDesignViewSettingsLabel1);
290  //myShowLaneChangePreference = new FXCheckButton(m33, "Show lane change preference", this, MID_SIMPLE_VIEW_COLORCHANGE);
291  //myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
292  //tmpc = new FXCheckButton(m33, "Show needed headway", 0 ,0);
293  //tmpc->disable();
294 
295  //new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
296 
297  FXMatrix* m34 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix1);
298  myVehicleSizePanel = new SizePanel(m34, this, mySettings->vehicleSize);
299 
300  }
301  {
302  // persons
303  new FXTabItem(tabbook, "Persons", nullptr, GUIDesignViewSettingsTabItemBook1);
304  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
305  FXVerticalFrame* frame3 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
306 
307  FXMatrix* m101 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3);
308  new FXLabel(m101, "Show As", nullptr, GUIDesignViewSettingsLabel1);
309  myPersonShapeDetail = new MFXIconComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
310  myPersonShapeDetail->appendItem("'triangles'");
311  myPersonShapeDetail->appendItem("'circles'");
312  myPersonShapeDetail->appendItem("'simple shapes'");
313  myPersonShapeDetail->appendItem("'raster images'");
314  myPersonShapeDetail->setNumVisible(4);
315  myPersonShapeDetail->setCurrentItem(settings->personQuality);
316 
317  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
318 
319  FXMatrix* m102 = new FXMatrix(frame3, 3, GUIDesignViewSettingsMatrix3);
320  new FXLabel(m102, "Color", nullptr, GUIDesignViewSettingsLabel1);
321  myPersonColorMode = new MFXIconComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
322  mySettings->personColorer.fill(*myPersonColorMode);
323  myPersonColorMode->setNumVisible(10);
324  myPersonColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
325 
326  myPersonColorSettingFrame = new FXVerticalFrame(frame3, GUIDesignViewSettingsVerticalFrame4);
327 
328  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
329 
330  FXMatrix* m103 = new FXMatrix(frame3, 2, GUIDesignMatrixViewSettings);
331  myPersonNamePanel = new NamePanel(m103, this, "Show person name", mySettings->personName);
332  myPersonValuePanel = new NamePanel(m103, this, "Show person color value", mySettings->personValue);
333 
334  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
335 
336  FXMatrix* m104 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix1);
337  myPersonSizePanel = new SizePanel(m104, this, mySettings->personSize);
338  }
339  {
340  // containers
341  new FXTabItem(tabbook, "Containers", nullptr, GUIDesignViewSettingsTabItemBook1);
342  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
343  FXVerticalFrame* frame3 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
344 
345  FXMatrix* m101 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix3);
346  new FXLabel(m101, "Show As", nullptr, GUIDesignViewSettingsLabel1);
347  myContainerShapeDetail = new MFXIconComboBox(m101, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
348  myContainerShapeDetail->appendItem("'triangles'");
349  myContainerShapeDetail->appendItem("'boxes'");
350  myContainerShapeDetail->appendItem("'simple shapes'");
351  myContainerShapeDetail->appendItem("'raster images'");
352  myContainerShapeDetail->setNumVisible(4);
353  myContainerShapeDetail->setCurrentItem(settings->containerQuality);
354 
355  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
356 
357  FXMatrix* m102 = new FXMatrix(frame3, 3, GUIDesignViewSettingsMatrix3);
358  new FXLabel(m102, "Color", nullptr, GUIDesignViewSettingsLabel1);
359  myContainerColorMode = new MFXIconComboBox(m102, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
360  mySettings->containerColorer.fill(*myContainerColorMode);
361  myContainerColorMode->setNumVisible(9);
362  myContainerColorInterpolation = new FXCheckButton(m102, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
363 
364  myContainerColorSettingFrame = new FXVerticalFrame(frame3, GUIDesignViewSettingsVerticalFrame4);
365 
366  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
367 
368  FXMatrix* m103 = new FXMatrix(frame3, 2, GUIDesignMatrixViewSettings);
369  myContainerNamePanel = new NamePanel(m103, this, "Show container name", mySettings->containerName);
370 
371  new FXHorizontalSeparator(frame3, GUIDesignHorizontalSeparator);
372 
373  FXMatrix* m104 = new FXMatrix(frame3, 2, GUIDesignViewSettingsMatrix1);
374  myContainerSizePanel = new SizePanel(m104, this, mySettings->containerSize);
375  }
376  {
377  // nodes
378  new FXTabItem(tabbook, "Junctions", nullptr, GUIDesignViewSettingsTabItemBook1);
379  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
380  FXVerticalFrame* frame4 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
381  FXMatrix* m41 = new FXMatrix(frame4, 3, GUIDesignViewSettingsMatrix3);
382  new FXLabel(m41, "Color", nullptr, GUIDesignViewSettingsLabel1);
383  myJunctionColorMode = new MFXIconComboBox(m41, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
384  mySettings->junctionColorer.fill(*myJunctionColorMode);
385  myJunctionColorMode->setNumVisible(4);
386  myJunctionColorInterpolation = new FXCheckButton(m41, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
387 
388  myJunctionColorSettingFrame = new FXVerticalFrame(frame4, GUIDesignViewSettingsVerticalFrame4);
389  myJunctionColorRainbow = new FXButton(frame4, "Recalibrate Rainbow", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE,
390  (BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT), 0, 0, 0, 0, 20, 20, 4, 4);
391 
392  new FXHorizontalSeparator(frame4, GUIDesignHorizontalSeparator);
393  FXMatrix* m42 = new FXMatrix(frame4, 2, GUIDesignMatrixViewSettings);
394  myJunctionSizePanel = new SizePanel(m42, this, mySettings->junctionSize);
395  myDrawJunctionShape = new FXCheckButton(m42, "Draw junction shape", this, MID_SIMPLE_VIEW_COLORCHANGE);
396  myDrawJunctionShape->setCheck(mySettings->drawJunctionShape);
397  myDrawCrossingsAndWalkingAreas = new FXCheckButton(m42, "Draw crossings/walkingareas", this, MID_SIMPLE_VIEW_COLORCHANGE);
398  myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas);
399  myShowLane2Lane = new FXCheckButton(m42, "Show lane to lane connections", this, MID_SIMPLE_VIEW_COLORCHANGE);
400  myShowLane2Lane->setCheck(mySettings->showLane2Lane);
401  new FXLabel(m42, " ", nullptr, GUIDesignViewSettingsLabel1);
402 
403  myTLIndexPanel = new NamePanel(m42, this, "Show link tls index", mySettings->drawLinkTLIndex);
404  myJunctionIndexPanel = new NamePanel(m42, this, "Show link junction index", mySettings->drawLinkJunctionIndex);
405  myJunctionNamePanel = new NamePanel(m42, this, "Show junction name", mySettings->junctionName);
406  myInternalJunctionNamePanel = new NamePanel(m42, this, "Show internal junction name", mySettings->internalJunctionName);
407  myInternalEdgeNamePanel = new NamePanel(m42, this, "Show internal edge name", mySettings->internalEdgeName);
408  myCwaEdgeNamePanel = new NamePanel(m42, this, "Show crossing and walkingarea name", mySettings->cwaEdgeName);
409  myTLSPhaseIndexPanel = new NamePanel(m42, this, "Show traffic light phase", mySettings->tlsPhaseIndex);
410  }
411  {
412  // detectors / triggers
413  new FXTabItem(tabbook, "Additional", nullptr, GUIDesignViewSettingsTabItemBook1);
414  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
415  FXVerticalFrame* frame5 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
416 
417  FXMatrix* m51 = new FXMatrix(frame5, 2, GUIDesignMatrixViewSettings);
418  myAddNamePanel = new NamePanel(m51, this, "Show object name", mySettings->addName);
419  myAddFullNamePanel = new NamePanel(m51, this, "Show full name", mySettings->addFullName);
420  new FXHorizontalSeparator(frame5, GUIDesignHorizontalSeparator);
421 
422  FXMatrix* m52 = new FXMatrix(frame5, 2, GUIDesignMatrixViewSettings);
423  myAddSizePanel = new SizePanel(m52, this, mySettings->addSize);
424 
425  /*
426  new FXLabel(m522, "Color", 0, GUIDesignViewSettingsLabel1);
427  myDetectorNameColor = new FXColorWell(m522, MFXUtils::getFXColor(settings->addNameColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell3);
428  */
429  }
430  {
431  // POIs
432  new FXTabItem(tabbook, "POIs", nullptr, GUIDesignViewSettingsTabItemBook1);
433  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
434  FXVerticalFrame* frame6 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
435 
436  FXMatrix* m63 = new FXMatrix(frame6, 3, GUIDesignViewSettingsMatrix3);
437  new FXLabel(m63, "Color", nullptr, GUIDesignViewSettingsLabel1);
438  myPOIColorMode = new MFXIconComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
439  mySettings->poiColorer.fill(*myPOIColorMode);
440  myPOIColorMode->setNumVisible(3);
441  myPOIColorInterpolation = new FXCheckButton(m63, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
442  myPOIColorSettingFrame = new FXVerticalFrame(frame6, GUIDesignViewSettingsVerticalFrame4);
443 
444  new FXHorizontalSeparator(frame6, GUIDesignHorizontalSeparator);
445 
446  FXMatrix* m61 = new FXMatrix(frame6, 2, GUIDesignMatrixViewSettings);
447  myPOINamePanel = new NamePanel(m61, this, "Show poi names", mySettings->poiName);
448  myPOITypePanel = new NamePanel(m61, this, "Show poi types", mySettings->poiType);
449  new FXHorizontalSeparator(frame6, GUIDesignHorizontalSeparator);
450 
451  FXMatrix* m62 = new FXMatrix(frame6, 2, GUIDesignMatrixViewSettings);
452  myPOISizePanel = new SizePanel(m62, this, mySettings->poiSize);
453 
454  }
455  {
456  // Polygons
457  new FXTabItem(tabbook, "Polygons", nullptr, GUIDesignViewSettingsTabItemBook1);
458  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
459  FXVerticalFrame* frame9 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
460 
461  FXMatrix* m63 = new FXMatrix(frame9, 3, GUIDesignViewSettingsMatrix3);
462  new FXLabel(m63, "Color", nullptr, GUIDesignViewSettingsLabel1);
463  myPolyColorMode = new MFXIconComboBox(m63, 20, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignComboBoxStatic);
464  mySettings->polyColorer.fill(*myPolyColorMode);
465  myPolyColorMode->setNumVisible(3);
466  myPolyColorInterpolation = new FXCheckButton(m63, "Interpolate", this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
467  myPolyColorSettingFrame = new FXVerticalFrame(frame9, GUIDesignViewSettingsVerticalFrame4);
468 
469  new FXHorizontalSeparator(frame9, GUIDesignHorizontalSeparator);
470 
471  FXMatrix* m91 = new FXMatrix(frame9, 2, GUIDesignMatrixViewSettings);
472  myPolyNamePanel = new NamePanel(m91, this, "Show polygon name", mySettings->polyName);
473  myPolyTypePanel = new NamePanel(m91, this, "Show polygon types", mySettings->polyType);
474  new FXHorizontalSeparator(frame9, GUIDesignHorizontalSeparator);
475 
476  myPolySizePanel = new SizePanel(m91, this, mySettings->polySize);
477  }
478  if (settings->netedit) {
479  // Selection
480  new FXTabItem(tabbook, "Selection", nullptr, GUIDesignViewSettingsTabItemBook1);
481  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
482  FXVerticalFrame* frame10 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
483 
484  FXMatrix* m102 = new FXMatrix(frame10, 2, GUIDesignMatrixViewSettings);
485  new FXLabel(m102, "Default Selection Color", nullptr, GUIDesignViewSettingsLabel1);
486  new FXLabel(m102, "", nullptr, GUIDesignViewSettingsLabel1);
487 
488  new FXLabel(m102, "Miscellaneous", nullptr, GUIDesignViewSettingsLabel1);
489  mySelectionColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectionColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
490  new FXLabel(m102, "Edge", nullptr, GUIDesignViewSettingsLabel1);
491  mySelectedEdgeColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedEdgeColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
492  new FXLabel(m102, "Lane Edge", nullptr, GUIDesignViewSettingsLabel1);
493  mySelectedLaneColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedLaneColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
494  new FXLabel(m102, "Connection", nullptr, GUIDesignViewSettingsLabel1);
495  mySelectedConnectionColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedConnectionColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
496  new FXLabel(m102, "Prohibition", nullptr, GUIDesignViewSettingsLabel1);
497  mySelectedProhibitionColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedProhibitionColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
498  new FXLabel(m102, "Crossing", nullptr, GUIDesignViewSettingsLabel1);
499  mySelectedCrossingColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedCrossingColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
500  new FXLabel(m102, "Additional", nullptr, GUIDesignViewSettingsLabel1);
501  mySelectedAdditionalColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedAdditionalColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
502  new FXLabel(m102, "Route", nullptr, GUIDesignViewSettingsLabel1);
503  mySelectedRouteColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedRouteColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
504  new FXLabel(m102, "Vehicle", nullptr, GUIDesignViewSettingsLabel1);
505  mySelectedVehicleColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedVehicleColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
506  new FXLabel(m102, "Person", nullptr, GUIDesignViewSettingsLabel1);
507  mySelectedPersonColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedPersonColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
508  new FXLabel(m102, "PersonPlan", nullptr, GUIDesignViewSettingsLabel1);
509  mySelectedPersonPlanColor = new FXColorWell(m102, MFXUtils::getFXColor(settings->colorSettings.selectedPersonPlanColor), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell);
510  }
511  {
512  // Legend
513  new FXTabItem(tabbook, "Legend", nullptr, GUIDesignViewSettingsTabItemBook1);
514  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
515  FXVerticalFrame* frame7 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
516 
517  FXMatrix* m72 = new FXMatrix(frame7, 2, GUIDesignMatrixViewSettings);
518  myShowSizeLegend = new FXCheckButton(m72, "Show Size Legend", this, MID_SIMPLE_VIEW_COLORCHANGE);
519  myShowSizeLegend->setCheck(mySettings->showSizeLegend);
520  new FXLabel(m72, "");
521  myShowColorLegend = new FXCheckButton(m72, "Show Color Legend", this, MID_SIMPLE_VIEW_COLORCHANGE);
522  myShowColorLegend->setCheck(mySettings->showColorLegend);
523  new FXLabel(m72, "");
524  }
525  {
526  // openGL
527  new FXTabItem(tabbook, "openGL", nullptr, GUIDesignViewSettingsTabItemBook1);
528  FXScrollWindow* genScroll = new FXScrollWindow(tabbook);
529  FXVerticalFrame* frame8 = new FXVerticalFrame(genScroll, GUIDesignViewSettingsVerticalFrame2);
530 
531  FXMatrix* m82 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings);
532  myDither = new FXCheckButton(m82, "Dither", this, MID_SIMPLE_VIEW_COLORCHANGE);
533  myDither->setCheck(mySettings->dither);
534  FXMatrix* m83 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings);
535  myFPS = new FXCheckButton(m83, "FPS", this, MID_SIMPLE_VIEW_COLORCHANGE);
536  myFPS->setCheck(mySettings->fps);
537  FXMatrix* m84 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings);
538  myDrawBoundaries = new FXCheckButton(m84, "Draw boundaries", this, MID_SIMPLE_VIEW_COLORCHANGE);
539  myDrawBoundaries->setCheck(mySettings->drawBoundaries);
540  FXMatrix* m85 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings);
541  myForceDrawForPositionSelection = new FXCheckButton(m85, "Force draw for position selection", this, MID_SIMPLE_VIEW_COLORCHANGE);
542  myForceDrawForPositionSelection->setCheck(mySettings->forceDrawForPositionSelection);
543  FXMatrix* m86 = new FXMatrix(frame8, 1, GUIDesignMatrixViewSettings);
544  myForceDrawForRectangleSelection = new FXCheckButton(m86, "Force draw for rectangle selection", this, MID_SIMPLE_VIEW_COLORCHANGE);
545  myForceDrawForRectangleSelection->setCheck(mySettings->forceDrawForRectangleSelection);
546  }
547  FXHorizontalFrame* f2 = new FXHorizontalFrame(contentFrame, GUIDesignViewSettingsHorizontalFrame2);
548  FXButton* initial = new FXButton(f2, "&OK", nullptr, this, MID_SETTINGS_OK, GUIDesignViewSettingsButton2);
549  new FXButton(f2, "&Cancel", nullptr, this, MID_SETTINGS_CANCEL, GUIDesignViewSettingsButton3);
550  initial->setFocus();
551 
552  rebuildColorMatrices(false);
554  loadWindowSize();
555 }
556 
557 
559  myParent->remove(this);
560  // delete name panels
563  delete myTLSPhaseIndexPanel;
564  delete myCwaEdgeNamePanel;
565  delete myStreetNamePanel;
566  delete myEdgeValuePanel;
567  delete myJunctionIndexPanel;
568  delete myTLIndexPanel;
569  delete myJunctionNamePanel;
570  delete myVehicleNamePanel;
571  delete myVehicleValuePanel;
572  delete myVehicleTextPanel;
573  delete myPersonNamePanel;
574  delete myPersonValuePanel;
575  delete myAddNamePanel;
576  delete myAddFullNamePanel;
577  delete myPOINamePanel;
578  delete myPOITypePanel;
579  delete myPolyNamePanel;
580  delete myPolyTypePanel;
581  delete myEdgeNamePanel;
582  // delete size panels
583  delete myVehicleSizePanel;
584  delete myPersonSizePanel;
585  delete myJunctionSizePanel;
586  delete myPOISizePanel;
587  delete myPolySizePanel;
588  delete myAddSizePanel;
589 }
590 
591 
592 void
594  // update buttons that can be changed externally
595  myShowGrid->setCheck(mySettings->showGrid);
596  FXDialogBox::show();
597 }
598 
599 
600 void
602  mySettings = settings;
603  myBackup = (*settings);
604  onCmdNameChange(nullptr, 0, nullptr);
605 }
606 
607 
608 long
609 GUIDialog_ViewSettings::onCmdOk(FXObject*, FXSelector, void*) {
610  saveWindowSize();
611  hide();
612  return 1;
613 }
614 
615 
616 long
617 GUIDialog_ViewSettings::onCmdCancel(FXObject*, FXSelector, void*) {
618  saveWindowSize();
619  hide();
620  (*mySettings) = myBackup;
621  return 1;
622 }
623 
624 
625 long
626 GUIDialog_ViewSettings::onCmdNameChange(FXObject*, FXSelector, void* data) {
627  if (data != nullptr) {
628  FXString dataS = (char*) data; // !!!unicode
629  // check whether this item has been added twice
630  if (dataS == mySchemeName->getItemText(mySchemeName->getNumItems() - 1)) {
631  for (int i = 0; i < mySchemeName->getNumItems() - 1; ++i) {
632  if (dataS == mySchemeName->getItemText(i)) {
633  mySchemeName->removeItem(i);
634  }
635  }
636  }
637  myBackup = gSchemeStorage.get(dataS.text());
638  mySettings = &gSchemeStorage.get(dataS.text());
639  }
640  rebuildColorMatrices(true);
641 
643  if (mySettings->netedit) {
655  }
656 
657  myLaneEdgeColorMode->setCurrentItem((FXint) mySettings->getLaneEdgeMode());
658  myLaneEdgeScaleMode->setCurrentItem((FXint) mySettings->getLaneEdgeScaleMode());
663  myShowRails->setCheck(mySettings->showRails);
675 
676  myVehicleColorMode->setCurrentItem((FXint) mySettings->vehicleColorer.getActive());
679  myShowMinGap->setCheck(mySettings->drawMinGap);
683  /*
684  myShowLaneChangePreference->setCheck(mySettings->drawLaneChangePreference);
685  */
690 
691  myPersonColorMode->setCurrentItem((FXint) mySettings->personColorer.getActive());
692  myPersonShapeDetail->setCurrentItem(mySettings->personQuality);
696 
697  myContainerColorMode->setCurrentItem((FXint) mySettings->containerColorer.getActive());
701 
702  myJunctionColorMode->setCurrentItem((FXint) mySettings->junctionColorer.getActive());
709 
713 
717 
721 
725  myDither->setCheck(mySettings->dither);
726  myFPS->setCheck(mySettings->fps);
732 
734  update();
735  myParent->update();
736  return 1;
737 }
738 
739 
740 bool
741 GUIDialog_ViewSettings::updateColorRanges(FXObject* sender, std::vector<FXColorWell*>::const_iterator colIt,
742  std::vector<FXColorWell*>::const_iterator colEnd,
743  std::vector<FXRealSpinner*>::const_iterator threshIt,
744  std::vector<FXRealSpinner*>::const_iterator threshEnd,
745  std::vector<FXButton*>::const_iterator buttonIt,
746  GUIColorScheme& scheme) {
747  int pos = 0;
748  while (colIt != colEnd) {
749  if (scheme.isFixed()) {
750  if (sender == *colIt) {
751  scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
752  }
753  } else {
754  if (sender == *threshIt) {
755  const double val = (*threshIt)->getValue();
756  double lo, hi;
757  if (pos != 0) {
758  threshIt--;
759  (*threshIt)->getRange(lo, hi);
760  (*threshIt)->setRange(lo, val);
761  threshIt++;
762  }
763  threshIt++;
764  if (threshIt != threshEnd) {
765  (*threshIt)->getRange(lo, hi);
766  (*threshIt)->setRange(val, hi);
767  }
768  scheme.setThreshold(pos, val);
769  return false;
770  }
771  if (sender == *colIt) {
772  scheme.setColor(pos, MFXUtils::getRGBColor((*colIt)->getRGBA()));
773  return false;
774  }
775  if (sender == *buttonIt) {
776  scheme.addColor(MFXUtils::getRGBColor((*colIt)->getRGBA()), (*threshIt)->getValue());
777  return true;
778  } else if (sender == *(buttonIt + 1)) {
779  scheme.removeColor(pos);
780  return true;
781  }
782  // 2 buttons per item (add / remove)
783  threshIt++;
784  buttonIt += 2;
785  }
786  ++colIt;
787  pos++;
788  }
789  return false;
790 }
791 
792 
793 bool
794 GUIDialog_ViewSettings::updateScaleRanges(FXObject* sender, std::vector<FXRealSpinner*>::const_iterator scaleIt,
795  std::vector<FXRealSpinner*>::const_iterator scaleEnd,
796  std::vector<FXRealSpinner*>::const_iterator threshIt,
797  std::vector<FXRealSpinner*>::const_iterator threshEnd,
798  std::vector<FXButton*>::const_iterator buttonIt,
799  GUIScaleScheme& scheme) {
800  int pos = 0;
801  while (scaleIt != scaleEnd) {
802  if (scheme.isFixed()) {
803  if (sender == *scaleIt) {
804  scheme.setColor(pos, (*scaleIt)->getValue());
805  }
806  } else {
807  if (sender == *threshIt) {
808  const double val = (*threshIt)->getValue();
809  double lo, hi;
810  if (pos != 0) {
811  threshIt--;
812  (*threshIt)->getRange(lo, hi);
813  (*threshIt)->setRange(lo, val);
814  threshIt++;
815  }
816  threshIt++;
817  if (threshIt != threshEnd) {
818  (*threshIt)->getRange(lo, hi);
819  (*threshIt)->setRange(val, hi);
820  }
821  scheme.setThreshold(pos, val);
822  return false;
823  }
824  if (sender == *scaleIt) {
825  scheme.setColor(pos, (*scaleIt)->getValue());
826  return false;
827  }
828  if (sender == *buttonIt) {
829  scheme.addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
830  return true;
831  } else if (sender == *(buttonIt + 1)) {
832  scheme.removeColor(pos);
833  return true;
834  }
835  threshIt++;
836  buttonIt += 2;
837  }
838  ++scaleIt;
839  pos++;
840  }
841  return false;
842 }
843 
844 
845 long
846 GUIDialog_ViewSettings::onCmdColorChange(FXObject* sender, FXSelector, void* /*val*/) {
847  GUIVisualizationSettings tmpSettings = *mySettings;
848  int prevLaneMode = mySettings->getLaneEdgeMode();
849  int prevLaneScaleMode = mySettings->getLaneEdgeScaleMode();
850  int prevVehicleMode = mySettings->vehicleColorer.getActive();
851  int prevPersonMode = mySettings->personColorer.getActive();
852  int prevContainerMode = mySettings->containerColorer.getActive();
853  int prevJunctionMode = mySettings->junctionColorer.getActive();
854  int prevPOIMode = mySettings->poiColorer.getActive();
855  int prevPolyMode = mySettings->polyColorer.getActive();
856  bool doRebuildColorMatrices = false;
857 
858  tmpSettings.name = mySettings->name;
859  tmpSettings.backgroundColor = MFXUtils::getRGBColor(myBackgroundColor->getRGBA());
860  if (mySettings->netedit) {
872 
873  }
874 
875  tmpSettings.showGrid = (myShowGrid->getCheck() != FALSE);
876  tmpSettings.gridXSize = (double) myGridXSizeDialer->getValue();
877  tmpSettings.gridYSize = (double) myGridYSizeDialer->getValue();
878 
880  tmpSettings.edgeColorer.setActive(myLaneEdgeColorMode->getCurrentItem());
881  tmpSettings.edgeScaler.setActive(myLaneEdgeScaleMode->getCurrentItem());
882  } else {
883  tmpSettings.laneColorer.setActive(myLaneEdgeColorMode->getCurrentItem());
884  tmpSettings.laneScaler.setActive(myLaneEdgeScaleMode->getCurrentItem());
885  }
886  tmpSettings.laneShowBorders = (myShowLaneBorders->getCheck() != FALSE);
887  tmpSettings.showBikeMarkings = (myShowBikeMarkings->getCheck() != FALSE);
888  tmpSettings.showLinkDecals = (myShowLaneDecals->getCheck() != FALSE);
889  tmpSettings.showLinkRules = (myShowLinkRules->getCheck() != FALSE);
890  tmpSettings.showRails = (myShowRails->getCheck() != FALSE);
891  tmpSettings.edgeName = myEdgeNamePanel->getSettings();
893  tmpSettings.cwaEdgeName = myCwaEdgeNamePanel->getSettings();
894  tmpSettings.streetName = myStreetNamePanel->getSettings();
895  tmpSettings.edgeValue = myEdgeValuePanel->getSettings();
896  tmpSettings.hideConnectors = (myHideMacroConnectors->getCheck() != FALSE);
897  tmpSettings.showLaneDirection = (myShowLaneDirection->getCheck() != FALSE);
898  tmpSettings.showSublanes = (myShowSublanes->getCheck() != FALSE);
899  tmpSettings.spreadSuperposed = (mySpreadSuperposed->getCheck() != FALSE);
900  if (sender == myParamKey) {
902  tmpSettings.edgeParam = myParamKey->getText().text();
904  tmpSettings.laneParam = myParamKey->getText().text();
906  tmpSettings.edgeData = myParamKey->getText().text();
907  }
908  } else if (sender == myVehicleParamKey) {
910  tmpSettings.vehicleParam = myVehicleParamKey->getText().text();
911  }
912  } else if (sender == myVehicleTextPanel->myCheck) {
914  } else if (sender == myVehicleTextParamKey) {
915  tmpSettings.vehicleTextParam = myVehicleTextParamKey->getText().text();
916  }
917  tmpSettings.laneWidthExaggeration = (double) myLaneWidthUpscaleDialer->getValue();
918  tmpSettings.laneMinSize = (double) myLaneMinWidthDialer->getValue();
919 
920  tmpSettings.vehicleColorer.setActive(myVehicleColorMode->getCurrentItem());
921  tmpSettings.vehicleQuality = myVehicleShapeDetail->getCurrentItem();
922  tmpSettings.showBlinker = (myShowBlinker->getCheck() != FALSE);
923  tmpSettings.drawMinGap = (myShowMinGap->getCheck() != FALSE);
924  tmpSettings.drawBrakeGap = (myShowBrakeGap->getCheck() != FALSE);
925  tmpSettings.showBTRange = (myShowBTRange->getCheck() != FALSE);
926  tmpSettings.showRouteIndex = (myShowRouteIndex->getCheck() != FALSE);
927  /*
928  tmpSettings.drawLaneChangePreference = (myShowLaneChangePreference->getCheck() != FALSE);
929  */
930  tmpSettings.vehicleName = myVehicleNamePanel->getSettings();
932  tmpSettings.vehicleText = myVehicleTextPanel->getSettings();
933  tmpSettings.vehicleSize = myVehicleSizePanel->getSettings();
934 
935  tmpSettings.personColorer.setActive(myPersonColorMode->getCurrentItem());
936  tmpSettings.personQuality = myPersonShapeDetail->getCurrentItem();
937  tmpSettings.personName = myPersonNamePanel->getSettings();
938  tmpSettings.personValue = myPersonValuePanel->getSettings();
939  tmpSettings.personSize = myPersonSizePanel->getSettings();
940 
941  tmpSettings.containerColorer.setActive(myContainerColorMode->getCurrentItem());
942  tmpSettings.containerQuality = myContainerShapeDetail->getCurrentItem();
945 
946  tmpSettings.junctionColorer.setActive(myJunctionColorMode->getCurrentItem());
947  tmpSettings.drawLinkTLIndex = myTLIndexPanel->getSettings();
953 
954  tmpSettings.addName = myAddNamePanel->getSettings();
955  tmpSettings.addFullName = myAddFullNamePanel->getSettings();
956  tmpSettings.addSize = myAddSizePanel->getSettings();
957 
958  tmpSettings.poiColorer.setActive(myPOIColorMode->getCurrentItem());
959  tmpSettings.poiName = myPOINamePanel->getSettings();
960  tmpSettings.poiType = myPOITypePanel->getSettings();
961  tmpSettings.poiSize = myPOISizePanel->getSettings();
962 
963  tmpSettings.polyColorer.setActive(myPolyColorMode->getCurrentItem());
964  tmpSettings.polyName = myPolyNamePanel->getSettings();
965  tmpSettings.polyType = myPolyTypePanel->getSettings();
966  tmpSettings.polySize = myPolySizePanel->getSettings();
967 
968  tmpSettings.showLane2Lane = (myShowLane2Lane->getCheck() != FALSE);
969  tmpSettings.drawJunctionShape = (myDrawJunctionShape->getCheck() != FALSE);
970  tmpSettings.drawCrossingsAndWalkingareas = (myDrawCrossingsAndWalkingAreas->getCheck() != FALSE);
971  tmpSettings.dither = (myDither->getCheck() != FALSE);
972  tmpSettings.fps = (myFPS->getCheck() != FALSE);
973  tmpSettings.drawBoundaries = (myDrawBoundaries->getCheck() != FALSE);
974  tmpSettings.forceDrawForPositionSelection = (myForceDrawForPositionSelection->getCheck() != FALSE);
975  tmpSettings.forceDrawForRectangleSelection = (myForceDrawForRectangleSelection->getCheck() != FALSE);
976  tmpSettings.showSizeLegend = (myShowSizeLegend->getCheck() != FALSE);
977  tmpSettings.showColorLegend = (myShowColorLegend->getCheck() != FALSE);
978 
979  // lanes (colors)
980  if (sender == myLaneColorRainbow) {
981  myParent->buildColorRainbow(tmpSettings, tmpSettings.getLaneEdgeScheme(), tmpSettings.getLaneEdgeMode(), GLO_LANE,
982  myLaneColorRainbowCheck->getCheck() != FALSE, myLaneColorRainbowThreshold->getValue());
983  doRebuildColorMatrices = true;
984  }
985  if (sender == myJunctionColorRainbow) {
986  myParent->buildColorRainbow(tmpSettings, tmpSettings.junctionColorer.getScheme(), tmpSettings.junctionColorer.getActive(), GLO_JUNCTION);
987  doRebuildColorMatrices = true;
988  }
989  if (tmpSettings.getLaneEdgeMode() == prevLaneMode) {
990  if (updateColorRanges(sender, myLaneColors.begin(), myLaneColors.end(),
991  myLaneThresholds.begin(), myLaneThresholds.end(), myLaneButtons.begin(),
992  tmpSettings.getLaneEdgeScheme())) {
993  doRebuildColorMatrices = true;
994  }
995  if (sender == myLaneColorInterpolation) {
996  tmpSettings.getLaneEdgeScheme().setInterpolated(myLaneColorInterpolation->getCheck() != FALSE);
997  doRebuildColorMatrices = true;
998  }
999  } else {
1000  doRebuildColorMatrices = true;
1001  }
1002  // lanes (scaling)
1003  if (tmpSettings.getLaneEdgeScaleMode() == prevLaneScaleMode) {
1004  if (updateScaleRanges(sender, myLaneScales.begin(), myLaneScales.end(),
1006  tmpSettings.getLaneEdgeScaleScheme())) {
1007  doRebuildColorMatrices = true;
1008  }
1009  if (sender == myLaneScaleInterpolation) {
1010  tmpSettings.getLaneEdgeScaleScheme().setInterpolated(myLaneScaleInterpolation->getCheck() != FALSE);
1011  doRebuildColorMatrices = true;
1012  }
1013  } else {
1014  doRebuildColorMatrices = true;
1015  }
1016  // vehicles
1017  if (tmpSettings.vehicleColorer.getActive() == prevVehicleMode) {
1018  if (updateColorRanges(sender, myVehicleColors.begin(), myVehicleColors.end(),
1020  tmpSettings.vehicleColorer.getScheme())) {
1021  doRebuildColorMatrices = true;
1022  }
1023  if (sender == myVehicleColorInterpolation) {
1024  tmpSettings.vehicleColorer.getScheme().setInterpolated(myVehicleColorInterpolation->getCheck() != FALSE);
1025  doRebuildColorMatrices = true;
1026  }
1027  } else {
1028  doRebuildColorMatrices = true;
1029  }
1030  // persons
1031  if (tmpSettings.personColorer.getActive() == prevPersonMode) {
1032  if (updateColorRanges(sender, myPersonColors.begin(), myPersonColors.end(),
1033  myPersonThresholds.begin(), myPersonThresholds.end(), myPersonButtons.begin(),
1034  tmpSettings.personColorer.getScheme())) {
1035  doRebuildColorMatrices = true;
1036  }
1037  if (sender == myPersonColorInterpolation) {
1038  tmpSettings.personColorer.getScheme().setInterpolated(myPersonColorInterpolation->getCheck() != FALSE);
1039  doRebuildColorMatrices = true;
1040  }
1041  } else {
1042  doRebuildColorMatrices = true;
1043  }
1044  // containers
1045  if (tmpSettings.containerColorer.getActive() == prevContainerMode) {
1046  if (updateColorRanges(sender, myContainerColors.begin(), myContainerColors.end(),
1048  tmpSettings.containerColorer.getScheme())) {
1049  doRebuildColorMatrices = true;
1050  }
1051  if (sender == myContainerColorInterpolation) {
1052  tmpSettings.containerColorer.getScheme().setInterpolated(myContainerColorInterpolation->getCheck() != FALSE);
1053  doRebuildColorMatrices = true;
1054  }
1055  } else {
1056  doRebuildColorMatrices = true;
1057  }
1058  // junctions
1059  if (tmpSettings.junctionColorer.getActive() == prevJunctionMode) {
1060  if (updateColorRanges(sender, myJunctionColors.begin(), myJunctionColors.end(),
1062  tmpSettings.junctionColorer.getScheme())) {
1063  doRebuildColorMatrices = true;
1064  }
1065  if (sender == myJunctionColorInterpolation) {
1066  tmpSettings.junctionColorer.getScheme().setInterpolated(myJunctionColorInterpolation->getCheck() != FALSE);
1067  doRebuildColorMatrices = true;
1068  }
1069  } else {
1070  doRebuildColorMatrices = true;
1071  }
1072  // POIs
1073  if (tmpSettings.poiColorer.getActive() == prevPOIMode) {
1074  if (updateColorRanges(sender, myPOIColors.begin(), myPOIColors.end(),
1075  myPOIThresholds.begin(), myPOIThresholds.end(), myPOIButtons.begin(),
1076  tmpSettings.poiColorer.getScheme())) {
1077  doRebuildColorMatrices = true;
1078  }
1079  if (sender == myPOIColorInterpolation) {
1080  tmpSettings.poiColorer.getScheme().setInterpolated(myPOIColorInterpolation->getCheck() != FALSE);
1081  doRebuildColorMatrices = true;
1082  }
1083  } else {
1084  doRebuildColorMatrices = true;
1085  }
1086  // polygons
1087  if (tmpSettings.polyColorer.getActive() == prevPolyMode) {
1088  if (updateColorRanges(sender, myPolyColors.begin(), myPolyColors.end(),
1089  myPolyThresholds.begin(), myPolyThresholds.end(), myPolyButtons.begin(),
1090  tmpSettings.polyColorer.getScheme())) {
1091  doRebuildColorMatrices = true;
1092  }
1093  if (sender == myPolyColorInterpolation) {
1094  tmpSettings.polyColorer.getScheme().setInterpolated(myPolyColorInterpolation->getCheck() != FALSE);
1095  doRebuildColorMatrices = true;
1096  }
1097  } else {
1098  doRebuildColorMatrices = true;
1099  }
1100 
1101  if (tmpSettings == *mySettings) {
1102  return 1;
1103  }
1104 
1105  int index = mySchemeName->getCurrentItem();
1106  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1107  // one of the initial settings is modified
1108  // every time this happens we create a new scheme
1109  int suffix = 1;
1110  while (gSchemeStorage.contains("custom_" + toString(suffix))) {
1111  suffix++;
1112  }
1113  tmpSettings.name = "custom_" + toString(suffix);
1114  // the newly created settings must be entered in several places:
1115  // - the comboBox mySchemeName of this dialog
1116  // - the comboBox of the parent view (set as active)
1117  // - the comboBox of all other views (only append) XXX @todo
1118  index = mySchemeName->appendItem(tmpSettings.name.c_str());
1119  mySchemeName->setCurrentItem(index);
1120  myParent->getColoringSchemesCombo()->appendItem(tmpSettings.name.c_str());
1121  }
1122  myParent->getColoringSchemesCombo()->setCurrentItem(
1123  myParent->getColoringSchemesCombo()->findItem(tmpSettings.name.c_str()));
1124  gSchemeStorage.add(tmpSettings); // overwrites existing
1125  mySettings = &gSchemeStorage.get(tmpSettings.name);
1126  myParent->setColorScheme(tmpSettings.name);
1127 
1128  if (doRebuildColorMatrices) {
1129  rebuildColorMatrices(true);
1130  }
1131  myParent->forceRefresh();
1132  getApp()->forceRefresh();
1133  return 1;
1134 }
1135 
1136 
1137 void
1138 GUIDialog_ViewSettings::loadSettings(const std::string& file) {
1139  GUISettingsHandler handler(file, true, mySettings->netedit);
1140  std::string settingsName = handler.addSettings(myParent);
1141  if (settingsName != "") {
1142  FXint index = mySchemeName->appendItem(settingsName.c_str());
1143  mySchemeName->setCurrentItem(index);
1144  mySettings = &gSchemeStorage.get(settingsName);
1145  }
1146  if (handler.hasDecals()) {
1147  myDecalsLock->lock();
1148  (*myDecals) = handler.getDecals();
1149  rebuildList();
1150  myParent->update();
1151  myDecalsLock->unlock();
1152  }
1153  if (handler.getDelay() >= 0) {
1154  myParent->setDelay(handler.getDelay());
1155  }
1156  if (handler.getBreakpoints().size() > 0) {
1158  }
1159  handler.applyViewport(myParent);
1160  rebuildColorMatrices(true);
1161 }
1162 
1163 
1164 void
1166  std::vector<GUISUMOAbstractView::Decal>::iterator j;
1167  for (j = myDecals->begin(); j != myDecals->end(); ++j) {
1170  dev.writeAttr("filename", d.filename);
1176  dev.writeAttr("altitude", d.altitude);
1177  dev.writeAttr("rotation", d.rot);
1178  dev.writeAttr("tilt", d.tilt);
1179  dev.writeAttr("roll", d.roll);
1181  dev.writeAttr("screenRelative", d.screenRelative);
1182  dev.closeTag();
1183  }
1184 }
1185 
1186 
1187 void
1188 GUIDialog_ViewSettings::loadDecals(const std::string& file) {
1189  myDecalsLock->lock();
1190  GUISettingsHandler handler(file);
1191  if (handler.hasDecals()) {
1192  (*myDecals) = handler.getDecals();
1193  }
1194  rebuildList();
1195  myParent->update();
1196  myDecalsLock->unlock();
1197 }
1198 
1199 
1200 long
1201 GUIDialog_ViewSettings::onCmdSaveSetting(FXObject*, FXSelector, void* /*data*/) {
1202  int index = mySchemeName->getCurrentItem();
1203  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1204  return 1;
1205  }
1206  // get the name
1207  std::string name = "";
1208  while (name.length() == 0) {
1209  FXDialogBox dialog(this, "Enter a name", GUIDesignViewSettingsDialog);
1210  FXVerticalFrame* content = new FXVerticalFrame(&dialog, GUIDesignViewSettingsVerticalFrame5);
1211  new FXLabel(content, "Please enter an alphanumeric name: ", nullptr, GUIDesignViewSettingsLabel2);
1212  FXTextField* text = new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsTextField1);
1213  new FXHorizontalSeparator(content, GUIDesignHorizontalSeparator);
1214  FXHorizontalFrame* buttons = new FXHorizontalFrame(content, GUIDesignViewSettingsHorizontalFrame3);
1215  new FXButton(buttons, "&OK", nullptr, &dialog, FXDialogBox::ID_ACCEPT, GUIDesignViewSettingsButton4);
1216  new FXButton(buttons, "&Cancel", nullptr, &dialog, FXDialogBox::ID_CANCEL, GUIDesignViewSettingsButton5);
1217  dialog.create();
1218  text->setFocus();
1219  if (!dialog.execute()) {
1220  return 1;
1221  }
1222  name = text->getText().text();
1223  for (int i = 0; i < (int)name.length(); ++i) {
1224  if (name[i] != '_' && (name[i] < 'a' || name[i] > 'z') && (name[i] < 'A' || name[i] > 'Z') && (name[i] < '0' || name[i] > '9')) {
1225  name = "";
1226  break;
1227  }
1228  }
1229  }
1230  GUIVisualizationSettings tmpSettings = *mySettings;
1232  tmpSettings.name = name;
1233  gSchemeStorage.add(tmpSettings);
1234  mySchemeName->setItemText(index, tmpSettings.name.c_str());
1235  myParent->getColoringSchemesCombo()->setItemText(index, tmpSettings.name.c_str());
1236  myParent->setColorScheme(tmpSettings.name);
1237  mySettings = &gSchemeStorage.get(name);
1238  myBackup = *mySettings;
1239  gSchemeStorage.writeSettings(getApp());
1240  return 1;
1241 }
1242 
1243 
1244 long
1245 GUIDialog_ViewSettings::onUpdSaveSetting(FXObject* sender, FXSelector, void* ptr) {
1246  sender->handle(this,
1247  mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1248  ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1249  ptr);
1250  return 1;
1251 }
1252 
1253 
1254 long
1255 GUIDialog_ViewSettings::onCmdDeleteSetting(FXObject*, FXSelector, void* /*data*/) {
1256  int index = mySchemeName->getCurrentItem();
1257  if (index < (int) gSchemeStorage.getNumInitialSettings()) {
1258  return 1;
1259  }
1260  std::string name = mySchemeName->getItem(index).text();
1261  gSchemeStorage.remove(name);
1262  mySchemeName->removeItem(index);
1263  onCmdNameChange(nullptr, 0, (void*) mySchemeName->getItem(0).text());
1264  gSchemeStorage.writeSettings(getApp());
1265  return 1;
1266 }
1267 
1268 
1269 long
1270 GUIDialog_ViewSettings::onUpdDeleteSetting(FXObject* sender, FXSelector, void* ptr) {
1271  sender->handle(this,
1272  mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1273  ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1274  ptr);
1275  return 1;
1276 }
1277 
1278 
1279 long
1280 GUIDialog_ViewSettings::onCmdExportSetting(FXObject*, FXSelector, void* /*data*/) {
1281  FXString file = MFXUtils::getFilename2Write(this, "Export view settings", ".xml", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder);
1282  if (file == "") {
1283  return 1;
1284  }
1285  try {
1286  OutputDevice& dev = OutputDevice::getDevice(file.text());
1288  mySettings->save(dev);
1289  if (mySaveViewPort->getCheck()) {
1291  }
1292  if (mySaveDelay->getCheck()) {
1293  dev.openTag(SUMO_TAG_DELAY);
1295  dev.closeTag();
1296  }
1297  if (mySaveDecals->getCheck()) {
1298  saveDecals(dev);
1299  }
1300  if (!mySettings->netedit && mySaveBreakpoints->getCheck()) {
1301  for (SUMOTime t : myParent->retrieveBreakpoints()) {
1304  dev.closeTag();
1305  }
1306  }
1307  dev.closeTag();
1308  dev.close();
1309  } catch (IOError& e) {
1310  FXMessageBox::error(this, MBOX_OK, "Storing failed!", "%s", e.what());
1311  }
1312  return 1;
1313 }
1314 
1315 
1316 long
1317 GUIDialog_ViewSettings::onUpdExportSetting(FXObject* sender, FXSelector, void* ptr) {
1318  sender->handle(this,
1319  (mySchemeName->getCurrentItem() < (int) gSchemeStorage.getNumInitialSettings()
1320  && !mySaveViewPort->getCheck() && !mySaveDelay->getCheck() && !mySaveDecals->getCheck() && !mySaveBreakpoints->getCheck()) ?
1321  FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1322  ptr);
1323  return 1;
1324 }
1325 
1326 
1327 long
1328 GUIDialog_ViewSettings::onCmdImportSetting(FXObject*, FXSelector, void* /*data*/) {
1329  FXFileDialog opendialog(this, "Import view settings");
1330  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
1331  opendialog.setSelectMode(SELECTFILE_ANY);
1332  opendialog.setPatternList("*.xml");
1333  if (gCurrentFolder.length() != 0) {
1334  opendialog.setDirectory(gCurrentFolder);
1335  }
1336  if (opendialog.execute()) {
1337  gCurrentFolder = opendialog.getDirectory();
1338  loadSettings(opendialog.getFilename().text());
1339  }
1340  return 1;
1341 }
1342 
1343 
1344 long
1345 GUIDialog_ViewSettings::onCmdLoadDecals(FXObject*, FXSelector, void* /*data*/) {
1346  FXFileDialog opendialog(this, "Load Decals");
1347  opendialog.setIcon(GUIIconSubSys::getIcon(ICON_EMPTY));
1348  opendialog.setSelectMode(SELECTFILE_ANY);
1349  opendialog.setPatternList("*.xml");
1350  if (gCurrentFolder.length() != 0) {
1351  opendialog.setDirectory(gCurrentFolder);
1352  }
1353  if (opendialog.execute()) {
1354  gCurrentFolder = opendialog.getDirectory();
1355  loadDecals(opendialog.getFilename().text());
1356  }
1357  return 1;
1358 }
1359 
1360 
1361 long
1362 GUIDialog_ViewSettings::onCmdSaveDecals(FXObject*, FXSelector, void* /*data*/) {
1363  FXString file = MFXUtils::getFilename2Write(this, "Save Decals", ".xml", GUIIconSubSys::getIcon(ICON_EMPTY), gCurrentFolder);
1364  if (file == "") {
1365  return 1;
1366  }
1367  try {
1368  OutputDevice& dev = OutputDevice::getDevice(file.text());
1369  dev.openTag("decals");
1370  saveDecals(dev);
1371  dev.closeTag();
1372  dev.close();
1373  } catch (IOError& e) {
1374  FXMessageBox::error(myParent, MBOX_OK, "Storing failed!", "%s", e.what());
1375  }
1376  return 1;
1377 }
1378 
1379 
1380 
1381 
1382 long
1383 GUIDialog_ViewSettings::onUpdImportSetting(FXObject* sender, FXSelector, void* ptr) {
1384  sender->handle(this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1385  return 1;
1386 }
1387 
1388 
1389 void
1391  myDecalsTable->clearItems();
1392  const int cols = 8;
1393  // set table attributes
1394  const int numRows = MAX2((int)10, (int)myDecals->size() + 1);
1395  myDecalsTable->setTableSize(numRows, cols);
1396  myDecalsTable->setColumnText(0, "picture file");
1397  myDecalsTable->setColumnText(1, "center x");
1398  myDecalsTable->setColumnText(2, "center y");
1399  myDecalsTable->setColumnText(3, "width");
1400  myDecalsTable->setColumnText(4, "height");
1401  myDecalsTable->setColumnText(5, "rotation");
1402  myDecalsTable->setColumnText(6, "layer");
1403  myDecalsTable->setColumnText(7, "relative");
1404  FXHeader* header = myDecalsTable->getColumnHeader();
1405  header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1406  int k;
1407  for (k = 0; k < cols; k++) {
1408  header->setItemJustify(k, GUIDesignViewSettingsMFXTableJustify);
1409  header->setItemSize(k, 60);
1410  }
1411  header->setItemSize(0, 150);
1412  // insert already known decals information into table
1413  FXint row = 0;
1414  std::vector<GUISUMOAbstractView::Decal>::iterator j;
1415  for (j = myDecals->begin(); j != myDecals->end(); ++j) {
1417  myDecalsTable->setItemText(row, 0, d.filename.c_str());
1418  myDecalsTable->setItemText(row, 1, toString<double>(d.centerX).c_str());
1419  myDecalsTable->setItemText(row, 2, toString<double>(d.centerY).c_str());
1420  myDecalsTable->setItemText(row, 3, toString<double>(d.width).c_str());
1421  myDecalsTable->setItemText(row, 4, toString<double>(d.height).c_str());
1422  myDecalsTable->setItemText(row, 5, toString<double>(d.rot).c_str());
1423  myDecalsTable->setItemText(row, 6, toString<double>(d.layer).c_str());
1424  myDecalsTable->setItemText(row, 7, toString<double>(d.screenRelative).c_str());
1425  row++;
1426  }
1427  // insert dummy last field
1428  for (k = 0; k < 7; k++) {
1429  myDecalsTable->setItemText(row, k, " ");
1430  }
1431 }
1432 
1433 
1434 FXMatrix*
1436  std::vector<FXColorWell*>& colors,
1437  std::vector<FXRealSpinner*>& thresholds,
1438  std::vector<FXButton*>& buttons,
1439  FXCheckButton* interpolation,
1440  GUIColorScheme& scheme) {
1441  MFXUtils::deleteChildren(frame);
1442  FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1443  colors.clear();
1444  thresholds.clear();
1445  buttons.clear();
1446  const bool fixed = scheme.isFixed();
1447  std::vector<RGBColor>::const_iterator colIt = scheme.getColors().begin();
1448  std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1449  std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1450  while (colIt != scheme.getColors().end()) {
1451  colors.push_back(new FXColorWell(m, MFXUtils::getFXColor(*colIt), this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsColorWell1));
1452  if (fixed) {
1453  new FXLabel(m, nameIt->c_str());
1454  new FXLabel(m, "");
1455  new FXLabel(m, "");
1456  } else {
1457  const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1458  FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignSpinDial | SPIN_NOMAX | dialerOptions);
1459  threshDialer->setValue(*threshIt);
1460  thresholds.push_back(threshDialer);
1461  buttons.push_back(new FXButton(m, "Add", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1462  buttons.push_back(new FXButton(m, "Remove", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1463  }
1464  colIt++;
1465  threshIt++;
1466  nameIt++;
1467  }
1468  interpolation->setCheck(scheme.isInterpolated());
1469  if (fixed) {
1470  interpolation->disable();
1471  } else {
1472  if (colors.size() > 1) {
1473  interpolation->enable();
1474  if (interpolation->getCheck() != FALSE) {
1475  thresholds.front()->enable();
1476  } else {
1477  thresholds.front()->disable();
1478  }
1479  } else {
1480  interpolation->disable();
1481  thresholds.front()->disable();
1482  }
1483  }
1484  return m;
1485 }
1486 
1487 
1488 FXMatrix*
1490  std::vector<FXRealSpinner*>& scales,
1491  std::vector<FXRealSpinner*>& thresholds,
1492  std::vector<FXButton*>& buttons,
1493  FXCheckButton* interpolation,
1494  GUIScaleScheme& scheme) {
1495  MFXUtils::deleteChildren(frame);
1496  FXMatrix* m = new FXMatrix(frame, 4, GUIDesignViewSettingsMatrix4);
1497  scales.clear();
1498  thresholds.clear();
1499  buttons.clear();
1500  const bool fixed = scheme.isFixed();
1501  std::vector<double>::const_iterator scaleIt = scheme.getColors().begin();
1502  std::vector<double>::const_iterator threshIt = scheme.getThresholds().begin();
1503  std::vector<std::string>::const_iterator nameIt = scheme.getNames().begin();
1504  while (scaleIt != scheme.getColors().end()) {
1505  FXRealSpinner* scaleDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignSpinDial | SPIN_NOMAX);
1506  scaleDialer->setValue(*scaleIt);
1507  scales.push_back(scaleDialer);
1508  if (fixed) {
1509  new FXLabel(m, nameIt->c_str());
1510  new FXLabel(m, "");
1511  new FXLabel(m, "");
1512  } else {
1513  const int dialerOptions = scheme.allowsNegativeValues() ? SPIN_NOMIN : 0;
1514  FXRealSpinner* threshDialer = new FXRealSpinner(m, 10, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignSpinDial | SPIN_NOMAX | dialerOptions);
1515  threshDialer->setValue(*threshIt);
1516  thresholds.push_back(threshDialer);
1517  buttons.push_back(new FXButton(m, "Add", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1518  buttons.push_back(new FXButton(m, "Remove", nullptr, this, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsButton1));
1519  }
1520  scaleIt++;
1521  threshIt++;
1522  nameIt++;
1523  }
1524  interpolation->setCheck(scheme.isInterpolated());
1525  if (fixed) {
1526  interpolation->disable();
1527  } else {
1528  if (scales.size() > 1) {
1529  interpolation->enable();
1530  if (interpolation->getCheck() != FALSE) {
1531  thresholds.front()->enable();
1532  } else {
1533  thresholds.front()->disable();
1534  }
1535  } else {
1536  interpolation->disable();
1537  thresholds.front()->disable();
1538  }
1539  }
1540  return m;
1541 }
1542 
1543 
1544 void
1546  // decals
1547  delete myDecalsTable;
1549  myDecalsTable->setVisibleRows(5);
1550  myDecalsTable->setVisibleColumns(7);
1551  myDecalsTable->setTableSize(5, 7);
1552  myDecalsTable->setBackColor(FXRGB(255, 255, 255));
1553  myDecalsTable->getRowHeader()->setWidth(0);
1554  for (int i = 1; i <= 5; ++i) {
1556  myDecalsTable->setNumberCellParams(i, -10000000, 10000000, 1, 10, 100, "%.2f");
1557  }
1558  rebuildList();
1559  if (doCreate) {
1560  myDecalsTable->create();
1561  }
1563  if (doCreate) {
1564  m->create();
1565  }
1567  myLaneColorRainbow->disable();
1568  } else {
1569  myLaneColorRainbow->enable();
1570  }
1572  myJunctionColorRainbow->disable();
1573  } else {
1574  myJunctionColorRainbow->enable();
1575  }
1576  std::string activeSchemeName = myLaneEdgeColorMode->getText().text();
1577  myParamKey->clearItems();
1579  myParamKey->appendItem(mySettings->edgeParam.c_str());
1580  for (const std::string& attr : myParent->getEdgeLaneParamKeys(true)) {
1581  if (attr != mySettings->edgeParam) {
1582  myParamKey->appendItem(attr.c_str());
1583  }
1584  }
1585  myParamKey->enable();
1586  } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL) {
1587  myParamKey->appendItem(mySettings->laneParam.c_str());
1588  for (const std::string& attr : myParent->getEdgeLaneParamKeys(false)) {
1589  if (attr != mySettings->laneParam) {
1590  myParamKey->appendItem(attr.c_str());
1591  }
1592  }
1593  myParamKey->enable();
1594  } else if (activeSchemeName == GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL) {
1595  myParamKey->appendItem(mySettings->edgeData.c_str());
1596  for (const std::string& attr : myParent->getEdgeDataAttrs()) {
1597  if (attr != mySettings->edgeData) {
1598  myParamKey->appendItem(attr.c_str());
1599  }
1600  }
1601  myParamKey->enable();
1602  myParamKey->setEditable(false);
1603  } else {
1604  myParamKey->disable();
1605  }
1606  myParamKey->setNumVisible(myParamKey->getNumItems());
1607  myLaneColorSettingFrame->getParent()->recalc();
1608 
1610  if (doCreate) {
1611  m->create();
1612  }
1613  myLaneScaleSettingFrame->getParent()->recalc();
1614 
1616  if (doCreate) {
1617  m->create();
1618  }
1619  activeSchemeName = myVehicleColorMode->getText().text();
1620  myVehicleParamKey->setEditable(true);
1623  myVehicleParamKey->enable();
1624  } else {
1625  myVehicleParamKey->disable();
1626  }
1627  myVehicleColorSettingFrame->getParent()->recalc();
1628 
1630  if (doCreate) {
1631  m->create();
1632  }
1633  myPersonColorSettingFrame->getParent()->recalc();
1635  if (doCreate) {
1636  m->create();
1637  }
1638  myContainerColorSettingFrame->getParent()->recalc();
1640  if (doCreate) {
1641  m->create();
1642  }
1643  myJunctionColorSettingFrame->getParent()->recalc();
1644  // POIs
1646  if (doCreate) {
1647  m->create();
1648  }
1649  myPOIColorSettingFrame->getParent()->recalc();
1650  // polygons
1652  if (doCreate) {
1653  m->create();
1654  }
1655  myPolyColorSettingFrame->getParent()->recalc();
1656 
1657  layout();
1658  update();
1659 }
1660 
1661 
1662 void
1664  myVehicleParamKey->clearItems();
1665  myVehicleTextParamKey->clearItems();
1666  for (const std::string& attr : myParent->getVehicleParamKeys(false)) {
1667  myVehicleParamKey->appendItem(attr.c_str());
1668  myVehicleTextParamKey->appendItem(attr.c_str());
1669  }
1670  if (myVehicleTextParamKey->getNumItems() == 0) {
1671  myVehicleParamKey->appendItem(mySettings->vehicleParam.c_str());
1672  myVehicleTextParamKey->appendItem(mySettings->vehicleTextParam.c_str());
1673  }
1674  myVehicleParamKey->setNumVisible(myVehicleParamKey->getNumItems());
1675  myVehicleTextParamKey->setNumVisible(myVehicleTextParamKey->getNumItems());
1676 }
1677 
1678 long
1679 GUIDialog_ViewSettings::onCmdEditTable(FXObject*, FXSelector, void* data) {
1681  std::string value = i->item->getText().text();
1682  // check whether the inserted value is empty
1683  if (value.find_first_not_of(" ") == std::string::npos) {
1684  return 1;
1685  }
1687  int row = i->row;
1688  // check whether we add a new entry or edit an existing entry
1689  if (row == static_cast<int>(myDecals->size())) {
1690  d.filename = "";
1691  d.centerX = double(myParent->getGridWidth() / 2.);
1692  d.centerY = double(myParent->getGridHeight() / 2.);
1693  d.width = 0.;
1694  d.height = 0.;
1695  d.initialised = false;
1696  d.rot = 0;
1697  d.layer = 0;
1698  d.screenRelative = false;
1699  myDecalsLock->lock();
1700  myDecals->push_back(d);
1701  myDecalsLock->unlock();
1702  } else if (row > static_cast<int>(myDecals->size())) {
1703  // ignore clicks two lines below existing entries
1704  return 1;
1705  } else {
1706  d = (*myDecals)[row];
1707  }
1708 
1709  switch (i->col) {
1710  case 0:
1711  if (d.initialised && d.filename != value) {
1712  d.initialised = false;
1713  }
1714  d.filename = value;
1715  break;
1716  case 1:
1717  try {
1718  d.centerX = StringUtils::toDouble(value);
1719  } catch (NumberFormatException&) {
1720  std::string msg = "The value must be a float, is:" + value;
1721  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1722  }
1723  break;
1724  case 2:
1725  try {
1726  d.centerY = StringUtils::toDouble(value);
1727  } catch (NumberFormatException&) {
1728  std::string msg = "The value must be a float, is:" + value;
1729  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1730  }
1731  break;
1732  case 3:
1733  try {
1734  d.width = StringUtils::toDouble(value);
1735  } catch (NumberFormatException&) {
1736  std::string msg = "The value must be a float, is:" + value;
1737  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1738  }
1739  break;
1740  case 4:
1741  try {
1742  d.height = StringUtils::toDouble(value);
1743  } catch (NumberFormatException&) {
1744  std::string msg = "The value must be a float, is:" + value;
1745  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1746  }
1747  break;
1748  case 5:
1749  try {
1750  d.rot = StringUtils::toDouble(value);
1751  } catch (NumberFormatException&) {
1752  std::string msg = "The value must be a float, is:" + value;
1753  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1754  }
1755  break;
1756  case 6:
1757  try {
1758  d.layer = StringUtils::toDouble(value);
1759  } catch (NumberFormatException&) {
1760  std::string msg = "The value must be a float, is:" + value;
1761  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1762  }
1763  break;
1764  case 7:
1765  try {
1767  } catch (NumberFormatException&) {
1768  std::string msg = "The value must be a bool, is:" + value;
1769  FXMessageBox::error(this, MBOX_OK, "Number format error", "%s", msg.c_str());
1770  }
1771  break;
1772  default:
1773  throw 1;
1774  }
1775  (*myDecals)[row] = d;
1776  if (!i->updateOnly) {
1777  rebuildList();
1778  }
1779  myParent->update();
1780  return 1;
1781 }
1782 
1783 
1784 std::string
1786  return mySchemeName->getItem(mySchemeName->getCurrentItem()).text();
1787 }
1788 
1789 
1790 void
1792  if (name.c_str() == mySchemeName->getItemText(mySchemeName->getCurrentItem())) {
1793  return;
1794  }
1795  for (int i = 0; i < mySchemeName->getNumItems(); ++i) {
1796  if (name.c_str() == mySchemeName->getItemText(i)) {
1797  mySchemeName->setCurrentItem(i);
1798  onCmdNameChange(nullptr, 0, (void*)name.c_str());
1799  return;
1800  }
1801  }
1802 }
1803 
1805  FXMatrix* parent,
1806  GUIDialog_ViewSettings* target,
1807  const std::string& title,
1808  const GUIVisualizationTextSettings& settings) {
1809  myCheck = new FXCheckButton(parent, title.c_str(), target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1810  myCheck->setCheck(settings.show);
1811  myMatrix0 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1812  myConstSizeCheck = new FXCheckButton(myMatrix0, "constant text size", target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1813  myConstSizeCheck->setCheck(settings.constSize);
1814  FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1815  new FXLabel(m1, "Size", nullptr, GUIDesignViewSettingsLabel1);
1816  mySizeDial = new FXRealSpinner(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1817  mySizeDial->setRange(10, 1000);
1818  mySizeDial->setValue(settings.size);
1819  FXMatrix* m2 = new FXMatrix(parent, 4, GUIDesignViewSettingsMatrix5);
1820  new FXLabel(m2, "Color", nullptr, GUIDesignViewSettingsLabel1);
1822  new FXLabel(m2, "Background", nullptr, GUIDesignViewSettingsLabel1);
1824 }
1825 
1826 
1829  return GUIVisualizationTextSettings(myCheck->getCheck() != FALSE,
1830  mySizeDial->getValue(),
1831  MFXUtils::getRGBColor(myColorWell->getRGBA()),
1832  MFXUtils::getRGBColor(myBGColorWell->getRGBA()),
1833  myConstSizeCheck->getCheck() != FALSE);
1834 }
1835 
1836 
1837 void
1839  myCheck->setCheck(settings.show);
1840  mySizeDial->setValue(settings.size);
1841  myColorWell->setRGBA(MFXUtils::getFXColor(settings.color));
1842  myBGColorWell->setRGBA(MFXUtils::getFXColor(settings.bgColor));
1843  myConstSizeCheck->setCheck(settings.constSize);
1844 }
1845 
1846 
1848  FXMatrix* parent,
1849  GUIDialog_ViewSettings* target,
1850  const GUIVisualizationSizeSettings& settings) {
1851  myCheck = new FXCheckButton(parent, "Draw with constant size when zoomed out", target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1852  myCheck->setCheck(settings.constantSize);
1853  myCheckSelected = new FXCheckButton(parent, "Only for selected", target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignCheckButtonViewSettings);
1854  myCheckSelected->setCheck(settings.constantSizeSelected);
1855  FXMatrix* m1 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1856  new FXLabel(m1, "Minimum Size", nullptr, GUIDesignViewSettingsLabel1);
1857  myMinSizeDial = new FXRealSpinner(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial1);
1858  myMinSizeDial->setValue(settings.minSize);
1859  FXMatrix* m2 = new FXMatrix(parent, 2, GUIDesignViewSettingsMatrix5);
1860  new FXLabel(m2, "Exaggerate by", nullptr, GUIDesignViewSettingsLabel1);
1861  myExaggerateDial = new FXRealSpinner(m2, 10, target, MID_SIMPLE_VIEW_COLORCHANGE, GUIDesignViewSettingsSpinDial2);
1862  myExaggerateDial->setRange(0, 10000);
1863  myExaggerateDial->setValue(settings.exaggeration);
1864 }
1865 
1866 
1870  myMinSizeDial->getValue(), myExaggerateDial->getValue(),
1871  myCheck->getCheck() != FALSE,
1872  myCheckSelected->getCheck() != FALSE);
1873 }
1874 
1875 
1876 void
1878  myCheck->setCheck(settings.constantSize);
1879  myCheckSelected->setCheck(settings.constantSizeSelected);
1880  myMinSizeDial->setValue(settings.minSize);
1881  myExaggerateDial->setValue(settings.exaggeration);
1882 }
1883 
1884 
1885 void
1887  getApp()->reg().writeIntEntry("VIEWSETTINGS", "x", getX());
1888  getApp()->reg().writeIntEntry("VIEWSETTINGS", "y", getY());
1889  getApp()->reg().writeIntEntry("VIEWSETTINGS", "width", getWidth());
1890  getApp()->reg().writeIntEntry("VIEWSETTINGS", "height", getHeight());
1891 }
1892 
1893 void
1895  // ensure window is visible after switching screen resolutions
1896  const FXint minSize = 400;
1897  const FXint minTitlebarHeight = 20;
1898  setX(MAX2(0, MIN2(getApp()->reg().readIntEntry("VIEWSETTINGS", "x", 150),
1899  getApp()->getRootWindow()->getWidth() - minSize)));
1900  setY(MAX2(minTitlebarHeight,
1901  MIN2(getApp()->reg().readIntEntry("VIEWSETTINGS", "y", 150),
1902  getApp()->getRootWindow()->getHeight() - minSize)));
1903  setWidth(MAX2(getApp()->reg().readIntEntry("VIEWSETTINGS", "width", 700), minSize));
1904  setHeight(MAX2(getApp()->reg().readIntEntry("VIEWSETTINGS", "height", 500), minSize));
1905 }
1906 
1907 /****************************************************************************/
1908 
GUISUMOAbstractView::Decal::roll
double roll
The roll of the image to the ground plane (in degrees)
Definition: GUISUMOAbstractView.h:326
GUIDialog_ViewSettings::myJunctionIndexPanel
NamePanel * myJunctionIndexPanel
Definition: GUIDialog_ViewSettings.h:363
GUICompleteSchemeStorage.h
GUIDialog_ViewSettings::onCmdSaveSetting
long onCmdSaveSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be saved into the registry.
Definition: GUIDialog_ViewSettings.cpp:1201
GUIDesignViewSettingsLabel1
#define GUIDesignViewSettingsLabel1
Label.
Definition: GUIDesigns.h:400
GUIVisualizationSettings::polySize
GUIVisualizationSizeSettings polySize
Definition: GUIVisualizationSettings.h:616
GUIVisualizationSettings::name
std::string name
The name of this setting.
Definition: GUIVisualizationSettings.h:399
GUIDialog_ViewSettings::myDecalsLock
FXMutex * myDecalsLock
Lock used when changing the decals.
Definition: GUIDialog_ViewSettings.h:252
GUIVisualizationSettings::edgeColorer
GUIColorer edgeColorer
The mesoscopic edge colorer.
Definition: GUIVisualizationSettings.h:431
GUIVisualizationSettings::getLaneEdgeScaleMode
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
Definition: GUIVisualizationSettings.cpp:1170
GUIDialog_ViewSettings::myPolyButtons
std::vector< FXButton * > myPolyButtons
Definition: GUIDialog_ViewSettings.h:349
GUIDialog_ViewSettings::myJunctionNamePanel
NamePanel * myJunctionNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::myHideMacroConnectors
FXCheckButton * myHideMacroConnectors
Definition: GUIDialog_ViewSettings.h:298
GUIVisualizationSettings::fps
bool fps
Information whether frames-per-second should be drawn.
Definition: GUIVisualizationSettings.h:411
GUIDialog_ViewSettings::NamePanel::update
void update(const GUIVisualizationTextSettings &settings)
Definition: GUIDialog_ViewSettings.cpp:1838
GUIDialog_ViewSettings::NamePanel::myMatrix0
FXMatrix * myMatrix0
Definition: GUIDialog_ViewSettings.h:66
GUIDialog_ViewSettings::myJunctionSizePanel
SizePanel * myJunctionSizePanel
Definition: GUIDialog_ViewSettings.h:372
MFXAddEditTypedTable::setCellType
void setCellType(int pos, CellType t)
Definition: MFXAddEditTypedTable.cpp:549
GUIDialog_ViewSettings::myLaneScaleThresholds
std::vector< FXRealSpinner * > myLaneScaleThresholds
Definition: GUIDialog_ViewSettings.h:294
GUIDialog_ViewSettings::myDecals
std::vector< GUISUMOAbstractView::Decal > * myDecals
The parent's decals.
Definition: GUIDialog_ViewSettings.h:249
ToString.h
GUIVisualizationColorSettings::selectedEdgeColor
RGBColor selectedEdgeColor
edge selection color
Definition: GUIVisualizationSettings.h:132
GUIVisualizationSettings::UseMesoSim
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
Definition: GUIVisualizationSettings.h:437
GUIDesignSpinDial
#define GUIDesignSpinDial
Definition: GUIDesigns.h:341
GUIVisualizationSettings::hideConnectors
bool hideConnectors
flag to show or hidde connectors
Definition: GUIVisualizationSettings.h:464
GUIDesignViewSettingsVerticalFrame2
#define GUIDesignViewSettingsVerticalFrame2
Definition: GUIDesigns.h:355
GUISUMOAbstractView::getGridHeight
double getGridHeight() const
get grid height
Definition: GUISUMOAbstractView.cpp:1419
MID_SETTINGS_CANCEL
Cancel-button was pushed.
Definition: GUIAppEnum.h:468
MIN2
T MIN2(T a, T b)
Definition: StdDefs.h:73
GUIDialog_ViewSettings::mySaveDelay
FXCheckButton * mySaveDelay
Definition: GUIDialog_ViewSettings.h:376
GUIDialog_ViewSettings::SizePanel::update
void update(const GUIVisualizationSizeSettings &settings)
Definition: GUIDialog_ViewSettings.cpp:1877
GUIVisualizationSettings::laneShowBorders
bool laneShowBorders
Information whether lane borders shall be drawn.
Definition: GUIVisualizationSettings.h:446
GUIDialog_ViewSettings::loadWindowSize
void loadWindowSize()
load window position and size from the registry
Definition: GUIDialog_ViewSettings.cpp:1894
GUIVisualizationSettings::edgeParam
std::string edgeParam
key for coloring by edge parameter
Definition: GUIVisualizationSettings.h:482
GUIVisualizationSettings::SCHEME_NAME_LANE_PARAM_NUMERICAL
static const std::string SCHEME_NAME_LANE_PARAM_NUMERICAL
Definition: GUIVisualizationSettings.h:669
LineReader.h
GUIDialog_ViewSettings::onUpdExportSetting
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
Definition: GUIDialog_ViewSettings.cpp:1317
StringUtils::toBool
static bool toBool(const std::string &sData)
converts a string into the bool value described by it by calling the char-type converter
Definition: StringUtils.cpp:374
GUIDialog_ViewSettings::mySaveBreakpoints
FXCheckButton * mySaveBreakpoints
Definition: GUIDialog_ViewSettings.h:376
CT_REAL
Definition: MFXAddEditTypedTable.h:30
GUIVisualizationSettings::laneMinSize
double laneMinSize
The minimum visual lane width for drawing.
Definition: GUIVisualizationSettings.h:470
GUIDialog_ViewSettings::myPOITypePanel
NamePanel * myPOITypePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::NamePanel::myCheck
FXCheckButton * myCheck
Definition: GUIDialog_ViewSettings.h:61
GUISUMOAbstractView
Definition: GUISUMOAbstractView.h:72
GUIDialog_ViewSettings::myPolyNamePanel
NamePanel * myPolyNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUICompleteSchemeStorage::writeSettings
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
Definition: GUICompleteSchemeStorage.cpp:204
GUIDialog_ViewSettings::myVehicleTextParamKey
FXComboBox * myVehicleTextParamKey
Definition: GUIDialog_ViewSettings.h:312
GUIVisualizationSettings::junctionSize
GUIVisualizationSizeSettings junctionSize
Definition: GUIVisualizationSettings.h:578
GUIVisualizationSettings::vehicleValue
GUIVisualizationTextSettings vehicleValue
Definition: GUIVisualizationSettings.h:523
GUIDesignViewSettingsTabBook1
#define GUIDesignViewSettingsTabBook1
Tab books.
Definition: GUIDesigns.h:395
GUIDialog_ViewSettings::onCmdDeleteSetting
long onCmdDeleteSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be deleted.
Definition: GUIDialog_ViewSettings.cpp:1255
GUIVisualizationSettings::tlsPhaseIndex
GUIVisualizationTextSettings tlsPhaseIndex
Definition: GUIVisualizationSettings.h:569
GUIDialog_ViewSettings::NamePanel::getSettings
GUIVisualizationTextSettings getSettings()
Definition: GUIDialog_ViewSettings.cpp:1828
GUIDialog_ViewSettings::myLaneColors
std::vector< FXColorWell * > myLaneColors
Definition: GUIDialog_ViewSettings.h:280
GUIDialog_ViewSettings::myPersonColorInterpolation
FXCheckButton * myPersonColorInterpolation
Definition: GUIDialog_ViewSettings.h:320
GUIDialog_ViewSettings
The dialog to change the view (gui) settings.
Definition: GUIDialog_ViewSettings.h:47
GUIVisualizationTextSettings::bgColor
RGBColor bgColor
background text color
Definition: GUIVisualizationSettings.h:77
GUICompleteSchemeStorage::remove
void remove(const std::string &name)
Removes the setting with the given name.
Definition: GUICompleteSchemeStorage.cpp:80
GUIDesignMatrixViewSettings
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
Definition: GUIDesigns.h:248
GUIDialog_ViewSettings::myVehicleParamKey
FXComboBox * myVehicleParamKey
Definition: GUIDialog_ViewSettings.h:311
GUIDialog_ViewSettings::myPOIThresholds
std::vector< FXRealSpinner * > myPOIThresholds
Definition: GUIDialog_ViewSettings.h:341
GUIPropertyScheme::setColor
void setColor(const int pos, const T &color)
Definition: GUIPropertyScheme.h:64
MID_SIMPLE_VIEW_NAMECHANGE
Informs the dialog about switching to another scheme.
Definition: GUIAppEnum.h:536
GUIVisualizationSettings::gridYSize
double gridYSize
Definition: GUIVisualizationSettings.h:423
GUIVisualizationSettings::getLaneEdgeMode
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
Definition: GUIVisualizationSettings.cpp:1161
OutputDevice
Static storage of an output device and its base (abstract) implementation.
Definition: OutputDevice.h:63
GUIDialog_ViewSettings::onCmdLoadDecals
long onCmdLoadDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
Definition: GUIDialog_ViewSettings.cpp:1345
GUIDialog_ViewSettings::myPolyThresholds
std::vector< FXRealSpinner * > myPolyThresholds
Definition: GUIDialog_ViewSettings.h:348
GUIDialog_ViewSettings::myTLSPhaseIndexPanel
NamePanel * myTLSPhaseIndexPanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_EditViewport::writeXML
void writeXML(OutputDevice &dev)
write the settings to the given device
Definition: GUIDialog_EditViewport.cpp:242
GUIDesignViewSettingsTabItemBook1
#define GUIDesignViewSettingsTabItemBook1
Definition: GUIDesigns.h:397
MID_TABLE
The Table.
Definition: GUIAppEnum.h:454
MFXEditedTableItem::updateOnly
bool updateOnly
Definition: MFXEditableTable.h:32
GUIDialog_ViewSettings::onCmdImportSetting
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
Definition: GUIDialog_ViewSettings.cpp:1328
GUIDialog_ViewSettings::mySelectedCrossingColor
FXColorWell * mySelectedCrossingColor
Definition: GUIDialog_ViewSettings.h:270
GUISUMOAbstractView::setColorScheme
virtual bool setColorScheme(const std::string &)
set color scheme
Definition: GUISUMOAbstractView.cpp:1389
GUISUMOAbstractView::getColoringSchemesCombo
FXComboBox * getColoringSchemesCombo()
get coloring schemes combo
Definition: GUISUMOAbstractView.cpp:1450
GUIVisualizationSettings::drawBoundaries
bool drawBoundaries
enable or disable draw boundaries
Definition: GUIVisualizationSettings.h:638
GUIVisualizationSizeSettings::constantSizeSelected
bool constantSizeSelected
whether only selected objects shall be drawn with constant
Definition: GUIVisualizationSettings.h:112
SUMO_TAG_VIEWSETTINGS
Definition: SUMOXMLDefinitions.h:240
GUIDialog_ViewSettings::myVehicleValuePanel
NamePanel * myVehicleValuePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::myAddFullNamePanel
NamePanel * myAddFullNamePanel
Definition: GUIDialog_ViewSettings.h:363
StringUtils::toDouble
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter
Definition: StringUtils.cpp:345
GUIVisualizationSettings::containerName
GUIVisualizationTextSettings containerName
Definition: GUIVisualizationSettings.h:558
GUIDialog_ViewSettings::myLaneWidthUpscaleDialer
FXRealSpinner * myLaneWidthUpscaleDialer
Definition: GUIDialog_ViewSettings.h:300
ICON_EMPTY
Definition: GUIIcons.h:41
GUIVisualizationSettings::showRouteIndex
bool showRouteIndex
Information whether the route index should be shown.
Definition: GUIVisualizationSettings.h:517
GUIDialog_ViewSettings::onCmdEditTable
long onCmdEditTable(FXObject *, FXSelector, void *data)
Called if the decals-table was changed.
Definition: GUIDialog_ViewSettings.cpp:1679
GUISettingsHandler::getDecals
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
Definition: GUISettingsHandler.cpp:410
GUIDesignViewSettingsButton4
#define GUIDesignViewSettingsButton4
Definition: GUIDesigns.h:414
GUIDialog_ViewSettings::rebuildColorMatrices
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
Definition: GUIDialog_ViewSettings.cpp:1545
GUIVisualizationTextSettings::color
RGBColor color
text color
Definition: GUIVisualizationSettings.h:74
GUIDialog_ViewSettings::mySaveViewPort
FXCheckButton * mySaveViewPort
Definition: GUIDialog_ViewSettings.h:376
GUIVisualizationSettings::showGrid
bool showGrid
Information whether a grid shall be shown.
Definition: GUIVisualizationSettings.h:420
ICON_SAVE
Definition: GUIIcons.h:48
GUIDialog_ViewSettings::myEdgeNamePanel
NamePanel * myEdgeNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::myShowGrid
FXCheckButton * myShowGrid
Definition: GUIDialog_ViewSettings.h:257
GUIDialog_ViewSettings::myPOIColorMode
MFXIconComboBox * myPOIColorMode
Definition: GUIDialog_ViewSettings.h:338
GUIDialog_ViewSettings::myVehicleColorSettingFrame
FXVerticalFrame * myVehicleColorSettingFrame
Definition: GUIDialog_ViewSettings.h:305
GUIDesignViewSettingsSpinDial2
#define GUIDesignViewSettingsSpinDial2
Definition: GUIDesigns.h:392
GUIDialog_ViewSettings::onUpdSaveSetting
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
Definition: GUIDialog_ViewSettings.cpp:1245
GUISUMOAbstractView::Decal::centerY
double centerY
The center of the image in y-direction (net coordinates, in m)
Definition: GUISUMOAbstractView.h:312
GUIDialog_ViewSettings::myJunctionColorInterpolation
FXCheckButton * myJunctionColorInterpolation
Definition: GUIDialog_ViewSettings.h:336
GUIDialog_ViewSettings::myParent
GUISUMOAbstractView * myParent
The parent view (which settings are changed)
Definition: GUIDialog_ViewSettings.h:240
GUIDialog_ViewSettings::myBackup
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
Definition: GUIDialog_ViewSettings.h:246
GUIDialog_ViewSettings::myVehicleColorMode
MFXIconComboBox * myVehicleColorMode
Definition: GUIDialog_ViewSettings.h:304
GUIDialog_ViewSettings::myGridXSizeDialer
FXRealSpinner * myGridXSizeDialer
Definition: GUIDialog_ViewSettings.h:258
GUICompleteSchemeStorage::add
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
Definition: GUICompleteSchemeStorage.cpp:52
GUISUMOAbstractView::Decal::filename
std::string filename
The path to the file the image is located at.
Definition: GUISUMOAbstractView.h:308
GUIPropertyScheme::removeColor
void removeColor(const int pos)
Definition: GUIPropertyScheme.h:97
GUIDialog_ViewSettings::myShowBlinker
FXCheckButton * myShowBlinker
Definition: GUIDialog_ViewSettings.h:310
SUMOTime
long long int SUMOTime
Definition: SUMOTime.h:34
GUIDialog_ViewSettings::mySelectedConnectionColor
FXColorWell * mySelectedConnectionColor
Definition: GUIDialog_ViewSettings.h:268
GUIDialog_ViewSettings::myPersonNamePanel
NamePanel * myPersonNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUISUMOAbstractView::getEdgeLaneParamKeys
virtual std::vector< std::string > getEdgeLaneParamKeys(bool) const
return list of available edge parameters
Definition: GUISUMOAbstractView.h:235
GUIDialog_ViewSettings::myFPS
FXCheckButton * myFPS
Definition: GUIDialog_ViewSettings.h:356
GUIVisualizationSettings::netedit
bool netedit
Whether the settings are for Netedit.
Definition: GUIVisualizationSettings.h:402
GUIVisualizationSettings::personColorer
GUIColorer personColorer
The person colorer.
Definition: GUIVisualizationSettings.h:532
MID_SIMPLE_VIEW_EXPORT
For the export-to-file - button.
Definition: GUIAppEnum.h:542
GUIDialog_ViewSettings::myShowLaneDirection
FXCheckButton * myShowLaneDirection
Definition: GUIDialog_ViewSettings.h:298
GUIDesignViewSettingsColorWell
#define GUIDesignViewSettingsColorWell
ColorWell.
Definition: GUIDesigns.h:388
GUIDialog_ViewSettings::myVehicleButtons
std::vector< FXButton * > myVehicleButtons
Definition: GUIDialog_ViewSettings.h:308
GUIDialog_ViewSettings::updateScaleRanges
bool updateScaleRanges(FXObject *sender, std::vector< FXRealSpinner * >::const_iterator colIt, std::vector< FXRealSpinner * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIScaleScheme &scheme)
Definition: GUIDialog_ViewSettings.cpp:794
GUIVisualizationColorSettings::selectedRouteColor
RGBColor selectedRouteColor
route selection color (used for routes and vehicle stops)
Definition: GUIVisualizationSettings.h:150
ICON_OPEN_CONFIG
Definition: GUIIcons.h:42
GUIVisualizationTextSettings
Definition: GUIVisualizationSettings.h:50
GUISUMOAbstractView::Decal::centerZ
double centerZ
The center of the image in z-direction (net coordinates, in m)
Definition: GUISUMOAbstractView.h:314
GUIDialog_ViewSettings::myVehicleColors
std::vector< FXColorWell * > myVehicleColors
Definition: GUIDialog_ViewSettings.h:306
GUIVisualizationSettings::containerSize
GUIVisualizationSizeSettings containerSize
Definition: GUIVisualizationSettings.h:555
GUIVisualizationSettings::drawLinkJunctionIndex
GUIVisualizationTextSettings drawLinkJunctionIndex
Definition: GUIVisualizationSettings.h:569
GUIDesigns.h
GUIVisualizationSettings::vehicleSize
GUIVisualizationSizeSettings vehicleSize
Definition: GUIVisualizationSettings.h:520
GUIVisualizationSettings::showRails
bool showRails
Information whether rails shall be drawn.
Definition: GUIVisualizationSettings.h:458
MFXAddEditTypedTable::setNumberCellParams
void setNumberCellParams(int pos, double min, double max, double steps1, double steps2, double steps3, const std::string &format)
Definition: MFXAddEditTypedTable.cpp:557
GUIVisualizationSettings::vehicleColorer
GUIColorer vehicleColorer
The vehicle colorer.
Definition: GUIVisualizationSettings.h:496
GUIDialog_ViewSettings::myLaneColorInterpolation
FXCheckButton * myLaneColorInterpolation
Definition: GUIDialog_ViewSettings.h:283
GUIDialog_ViewSettings::NamePanel
Definition: GUIDialog_ViewSettings.h:52
MFXEditedTableItem::item
FXTableItem * item
Definition: MFXEditableTable.h:29
GUISUMOAbstractView::Decal::height
double height
The height of the image (net coordinates in y-direction, in m)
Definition: GUISUMOAbstractView.h:318
GUIVisualizationColorSettings::selectedConnectionColor
RGBColor selectedConnectionColor
connection selection color
Definition: GUIVisualizationSettings.h:138
GUIVisualizationSettings::edgeScaler
GUIScaler edgeScaler
The mesoscopic edge scaler.
Definition: GUIVisualizationSettings.h:434
GUISettingsHandler.h
MFXEditedTableItem::col
int col
Definition: MFXEditableTable.h:31
GUIDialog_ViewSettings::myShowSizeLegend
FXCheckButton * myShowSizeLegend
Definition: GUIDialog_ViewSettings.h:360
GUIDialog_ViewSettings::myPOISizePanel
SizePanel * myPOISizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GUIDialog_ViewSettings::myShowLane2Lane
FXCheckButton * myShowLane2Lane
Definition: GUIDialog_ViewSettings.h:352
OutputDevice::close
void close()
Closes the device and removes it from the dictionary.
Definition: OutputDevice.cpp:207
GUIDialog_ViewSettings::myLaneColorSettingFrame
FXVerticalFrame * myLaneColorSettingFrame
Definition: GUIDialog_ViewSettings.h:279
MID_SIMPLE_VIEW_SAVE_DECALS
For the save-decals - button.
Definition: GUIAppEnum.h:548
GUIDialog_ViewSettings::myPersonThresholds
std::vector< FXRealSpinner * > myPersonThresholds
Definition: GUIDialog_ViewSettings.h:318
GUIDialog_ViewSettings::myDrawBoundaries
FXCheckButton * myDrawBoundaries
Definition: GUIDialog_ViewSettings.h:357
GUIDialog_ViewSettings::myVehicleThresholds
std::vector< FXRealSpinner * > myVehicleThresholds
Definition: GUIDialog_ViewSettings.h:307
GUIDesignViewSettingsButton5
#define GUIDesignViewSettingsButton5
Definition: GUIDesigns.h:416
GUIDialog_ViewSettings::myShowLinkRules
FXCheckButton * myShowLinkRules
Definition: GUIDialog_ViewSettings.h:298
GUIDialog_ViewSettings::rebuildList
void rebuildList()
Rebuilds the decals table.
Definition: GUIDialog_ViewSettings.cpp:1390
GUIVisualizationSettings::polyName
GUIVisualizationTextSettings polyName
Definition: GUIVisualizationSettings.h:619
GUIVisualizationSettings::drawMinGap
bool drawMinGap
Information whether the minimum gap shall be drawn.
Definition: GUIVisualizationSettings.h:508
SUMO_TAG_BREAKPOINT
Definition: SUMOXMLDefinitions.h:262
GUIVisualizationSettings::polyColorer
GUIColorer polyColorer
The polygon colorer.
Definition: GUIVisualizationSettings.h:613
GUIDialog_ViewSettings::show
void show()
show view settings dialog
Definition: GUIDialog_ViewSettings.cpp:593
GUIDesignViewSettingsMFXTableJustify
#define GUIDesignViewSettingsMFXTableJustify
Definition: GUIDesigns.h:426
MFXUtils::getFilename2Write
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString &currentFolder)
Returns the file name to write.
Definition: MFXUtils.cpp:83
GUIDesignButtonToolbar
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
Definition: GUIDesigns.h:79
RGBColor.h
GUIDialog_ViewSettings::NamePanel::mySizeDial
FXRealSpinner * mySizeDial
Definition: GUIDialog_ViewSettings.h:62
GUIDialog_ViewSettings::myLaneScaleSettingFrame
FXVerticalFrame * myLaneScaleSettingFrame
Definition: GUIDialog_ViewSettings.h:292
GUIDialog_ViewSettings::mySettings
GUIVisualizationSettings * mySettings
The current settings.
Definition: GUIDialog_ViewSettings.h:243
MFXUtils::getRGBColor
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:107
GUIVisualizationColorSettings::selectedProhibitionColor
RGBColor selectedProhibitionColor
prohibition selection color
Definition: GUIVisualizationSettings.h:141
OutputDevice::closeTag
bool closeTag(const std::string &comment="")
Closes the most recently opened tag and optionally adds a comment.
Definition: OutputDevice.cpp:253
GUIVisualizationSettings::junctionName
GUIVisualizationTextSettings junctionName
Definition: GUIVisualizationSettings.h:569
GUIDesignViewSettingsHorizontalFrame2
#define GUIDesignViewSettingsHorizontalFrame2
Definition: GUIDesigns.h:368
GUIAppEnum.h
GUIPropertyScheme::getThresholds
const std::vector< double > & getThresholds() const
Definition: GUIPropertyScheme.h:145
GUIDialog_ViewSettings::myPOINamePanel
NamePanel * myPOINamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::getLaneEdgeScheme
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
Definition: GUIVisualizationSettings.cpp:1179
GUIDialog_ViewSettings::myPolyColorInterpolation
FXCheckButton * myPolyColorInterpolation
Definition: GUIDialog_ViewSettings.h:350
GUIDesignViewSettingsVerticalFrame5
#define GUIDesignViewSettingsVerticalFrame5
Definition: GUIDesigns.h:361
GUIVisualizationSettings::junctionColorer
GUIColorer junctionColorer
The junction colorer.
Definition: GUIVisualizationSettings.h:566
MAX2
T MAX2(T a, T b)
Definition: StdDefs.h:79
GUISUMOAbstractView::Decal::layer
double layer
The layer of the image.
Definition: GUISUMOAbstractView.h:328
GUIDialog_ViewSettings::loadDecals
void loadDecals(const std::string &file)
Loads decals from a file.
Definition: GUIDialog_ViewSettings.cpp:1188
GUICompleteSchemeStorage::getNames
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
Definition: GUICompleteSchemeStorage.cpp:99
MFXAddEditTypedTable::ID_TEXT_CHANGED
Definition: MFXAddEditTypedTable.h:129
GUIDialog_ViewSettings::myVehicleShapeDetail
MFXIconComboBox * myVehicleShapeDetail
Definition: GUIDialog_ViewSettings.h:304
GUIDialog_ViewSettings::saveWindowSize
void saveWindowSize()
save window position and size to the registry
Definition: GUIDialog_ViewSettings.cpp:1886
GUISUMOAbstractView.h
GUIDesignViewSettingsHorizontalFrame1
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
Definition: GUIDesigns.h:366
GUIDialog_ViewSettings::loadSettings
void loadSettings(const std::string &file)
Loads a scheme from a file.
Definition: GUIDialog_ViewSettings.cpp:1138
GUIVisualizationSettings::polyType
GUIVisualizationTextSettings polyType
Definition: GUIVisualizationSettings.h:622
GUIVisualizationSettings::drawCrossingsAndWalkingareas
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
Definition: GUIVisualizationSettings.h:576
NumberFormatException
Definition: UtilExceptions.h:95
GUIDialog_ViewSettings::myShowBrakeGap
FXCheckButton * myShowBrakeGap
Definition: GUIDialog_ViewSettings.h:310
OutputDevice::writeAttr
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
Definition: OutputDevice.h:255
GUIVisualizationSettings::gridXSize
double gridXSize
Information about the grid spacings.
Definition: GUIVisualizationSettings.h:423
GUIVisualizationSettings::backgroundColor
RGBColor backgroundColor
The background color to use.
Definition: GUIVisualizationSettings.h:417
GUIDialog_ViewSettings::myPolyColorSettingFrame
FXVerticalFrame * myPolyColorSettingFrame
Definition: GUIDialog_ViewSettings.h:346
GUIVisualizationSettings::internalEdgeName
GUIVisualizationTextSettings internalEdgeName
Definition: GUIVisualizationSettings.h:461
GUIVisualizationSettings::addName
GUIVisualizationTextSettings addName
Definition: GUIVisualizationSettings.h:591
GUIDialog_ViewSettings::myLaneScaleButtons
std::vector< FXButton * > myLaneScaleButtons
Definition: GUIDialog_ViewSettings.h:295
GUIVisualizationSettings::save
void save(OutputDevice &dev) const
Writes the settings into an output device.
Definition: GUIVisualizationSettings.cpp:1197
GUIPropertyScheme::getColors
const std::vector< T > & getColors() const
Definition: GUIPropertyScheme.h:141
GUISUMOAbstractView::Decal::screenRelative
bool screenRelative
Whether this image should be skipped in 2D-views.
Definition: GUISUMOAbstractView.h:334
GUIVisualizationSettings::showBikeMarkings
bool showBikeMarkings
Information whether bicycle lane marking shall be drawn.
Definition: GUIVisualizationSettings.h:449
GUIDialog_ViewSettings::myCwaEdgeNamePanel
NamePanel * myCwaEdgeNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::onCmdSaveDecals
long onCmdSaveDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
Definition: GUIDialog_ViewSettings.cpp:1362
GUIVisualizationSettings::poiSize
GUIVisualizationSizeSettings poiSize
Definition: GUIVisualizationSettings.h:604
GUICompleteSchemeStorage::getNumInitialSettings
int getNumInitialSettings() const
Returns the number of initial settings.
Definition: GUICompleteSchemeStorage.cpp:105
SUMO_ATTR_CENTER_Y
Definition: SUMOXMLDefinitions.h:402
GUIDesignViewSettingsMFXTable
#define GUIDesignViewSettingsMFXTable
MFX Add/Edit Typed Table.
Definition: GUIDesigns.h:424
GUIDialog_ViewSettings::saveDecals
void saveDecals(OutputDevice &dev) const
Writes the currently used decals into a file.
Definition: GUIDialog_ViewSettings.cpp:1165
GUIVisualizationTextSettings::constSize
bool constSize
@brif flag to avoid size changes
Definition: GUIVisualizationSettings.h:80
GUISUMOAbstractView::Decal::rot
double rot
The rotation of the image in the ground plane (in degrees)
Definition: GUISUMOAbstractView.h:322
GUIDialog_ViewSettings::myLaneEdgeScaleMode
MFXIconComboBox * myLaneEdgeScaleMode
... lane scaler
Definition: GUIDialog_ViewSettings.h:291
GUIVisualizationColorSettings::selectedAdditionalColor
RGBColor selectedAdditionalColor
additional selection color (busStops, Detectors...)
Definition: GUIVisualizationSettings.h:147
GUIVisualizationSettings::showLinkDecals
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
Definition: GUIVisualizationSettings.h:452
GUIDialog_ViewSettings::onCmdExportSetting
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
Definition: GUIDialog_ViewSettings.cpp:1280
GUISUMOAbstractView::Decal::tilt
double tilt
The tilt of the image to the ground plane (in degrees)
Definition: GUISUMOAbstractView.h:324
GUIVisualizationSettings::laneWidthExaggeration
double laneWidthExaggeration
The lane exaggeration (upscale thickness)
Definition: GUIVisualizationSettings.h:467
GUIVisualizationSettings::showColorLegend
bool showColorLegend
Information whether the colo legend shall be drawn.
Definition: GUIVisualizationSettings.h:629
GUIDesignViewSettingsSpinDial1
#define GUIDesignViewSettingsSpinDial1
Definition: GUIDesigns.h:390
GUIVisualizationSizeSettings
struct for size settings
Definition: GUIVisualizationSettings.h:85
GUIPropertySchemeStorage::getScheme
T & getScheme()
Definition: GUIPropertySchemeStorage.h:79
GUIVisualizationSettings::laneScaler
GUIScaler laneScaler
The lane scaler.
Definition: GUIVisualizationSettings.h:443
GUIDialog_ViewSettings::myLaneThresholds
std::vector< FXRealSpinner * > myLaneThresholds
Definition: GUIDialog_ViewSettings.h:281
GUIDialog_ViewSettings::myPOIButtons
std::vector< FXButton * > myPOIButtons
Definition: GUIDialog_ViewSettings.h:342
GUIDialog_ViewSettings::myPersonButtons
std::vector< FXButton * > myPersonButtons
Definition: GUIDialog_ViewSettings.h:319
GUIPropertyScheme::isFixed
bool isFixed() const
Definition: GUIPropertyScheme.h:157
GUIDesignHorizontalSeparator
#define GUIDesignHorizontalSeparator
Definition: GUIDesigns.h:321
MID_SIMPLE_VIEW_SAVE
For the save-to-db - button.
Definition: GUIAppEnum.h:538
GUIDialog_ViewSettings::myShowBikeMarkings
FXCheckButton * myShowBikeMarkings
Definition: GUIDialog_ViewSettings.h:298
GUIVisualizationSizeSettings::constantSize
bool constantSize
whether the object shall be drawn with constant size regardless of zoom
Definition: GUIVisualizationSettings.h:109
GUIDialog_ViewSettings::myLaneColorRainbowThreshold
FXRealSpinner * myLaneColorRainbowThreshold
Definition: GUIDialog_ViewSettings.h:286
GUIDialog_ViewSettings::myAddNamePanel
NamePanel * myAddNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::vehicleQuality
int vehicleQuality
The quality of vehicle drawing.
Definition: GUIVisualizationSettings.h:499
GUIDialog_ViewSettings::myJunctionColors
std::vector< FXColorWell * > myJunctionColors
Definition: GUIDialog_ViewSettings.h:333
GUIDialog_ViewSettings::myPOIColors
std::vector< FXColorWell * > myPOIColors
Definition: GUIDialog_ViewSettings.h:340
GUIDialog_ViewSettings::myShowSublanes
FXCheckButton * myShowSublanes
Definition: GUIDialog_ViewSettings.h:298
SUMO_ATTR_WIDTH
Definition: SUMOXMLDefinitions.h:386
GUIDialog_ViewSettings::myShowRouteIndex
FXCheckButton * myShowRouteIndex
Definition: GUIDialog_ViewSettings.h:310
GUIVisualizationSettings::showSublanes
bool showSublanes
Whether to show sublane boundaries.
Definition: GUIVisualizationSettings.h:476
GUIDesignViewSettingsTextField1
#define GUIDesignViewSettingsTextField1
textFields
Definition: GUIDesigns.h:405
update
GUIDialog_ViewSettings::myJunctionThresholds
std::vector< FXRealSpinner * > myJunctionThresholds
Definition: GUIDialog_ViewSettings.h:334
GUIDialog_ViewSettings::myPersonColorMode
MFXIconComboBox * myPersonColorMode
Definition: GUIDialog_ViewSettings.h:315
GUIVisualizationSettings::SCHEME_NAME_EDGEDATA_NUMERICAL
static const std::string SCHEME_NAME_EDGEDATA_NUMERICAL
Definition: GUIVisualizationSettings.h:671
MID_SIMPLE_VIEW_DELETE
For the delete - button.
Definition: GUIAppEnum.h:540
GUIVisualizationColorSettings::selectedPersonColor
RGBColor selectedPersonColor
person selection color
Definition: GUIVisualizationSettings.h:156
SUMO_ATTR_LAYER
A layer number.
Definition: SUMOXMLDefinitions.h:712
OutputDevice.h
GUIVisualizationSettings::vehicleName
GUIVisualizationTextSettings vehicleName
Definition: GUIVisualizationSettings.h:523
GUIDialog_ViewSettings::rebuildScaleMatrix
FXMatrix * rebuildScaleMatrix(FXVerticalFrame *frame, std::vector< FXRealSpinner * > &scales, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIScaleScheme &scheme)
Rebuilds manipulators for the current scaling scheme.
Definition: GUIDialog_ViewSettings.cpp:1489
GUIVisualizationSettings::containerQuality
int containerQuality
The quality of container drawing.
Definition: GUIVisualizationSettings.h:552
gSchemeStorage
GUICompleteSchemeStorage gSchemeStorage
Definition: GUICompleteSchemeStorage.cpp:38
GUIDialog_ViewSettings::SizePanel
Definition: GUIDialog_ViewSettings.h:69
GUIDialog_ViewSettings::myTLIndexPanel
NamePanel * myTLIndexPanel
Definition: GUIDialog_ViewSettings.h:363
GUIPropertyScheme::setInterpolated
void setInterpolated(const bool interpolate, double interpolationStart=0.f)
Definition: GUIPropertyScheme.h:130
GUISettingsHandler
An XML-handler for visualisation schemes.
Definition: GUISettingsHandler.h:44
time2string
std::string time2string(SUMOTime t)
Definition: SUMOTime.cpp:67
GUIVisualizationSettings::vehicleTextParam
std::string vehicleTextParam
key for rendering textual parameter
Definition: GUIVisualizationSettings.h:486
GUIDialog_ViewSettings::mySelectedAdditionalColor
FXColorWell * mySelectedAdditionalColor
Definition: GUIDialog_ViewSettings.h:271
GUIVisualizationSettings::dither
bool dither
Information whether dithering shall be enabled.
Definition: GUIVisualizationSettings.h:408
GUIDialog_ViewSettings::myPersonValuePanel
NamePanel * myPersonValuePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::NamePanel::NamePanel
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
Definition: GUIDialog_ViewSettings.cpp:1804
GUISUMOAbstractView::remove
void remove(GUIDialog_EditViewport *)
remove viewport
Definition: GUISUMOAbstractView.cpp:1401
GUIIOGlobals.h
GUIDesignViewSettingsMatrix2
#define GUIDesignViewSettingsMatrix2
Definition: GUIDesigns.h:375
GUIVisualizationSettings::addFullName
GUIVisualizationTextSettings addFullName
Definition: GUIVisualizationSettings.h:593
GUIDialog_ViewSettings::myContainerButtons
std::vector< FXButton * > myContainerButtons
Definition: GUIDialog_ViewSettings.h:327
GUIDialog_ViewSettings::myVehicleColorInterpolation
FXCheckButton * myVehicleColorInterpolation
Definition: GUIDialog_ViewSettings.h:309
GUIVisualizationSettings::drawLinkTLIndex
GUIVisualizationTextSettings drawLinkTLIndex
Definition: GUIVisualizationSettings.h:569
GUISettingsHandler::hasDecals
bool hasDecals() const
Returns whether any decals have been parsed.
Definition: GUISettingsHandler.cpp:404
GLO_LANE
a lane
Definition: GUIGlObjectTypes.h:48
GUIVisualizationSettings::personSize
GUIVisualizationSizeSettings personSize
Definition: GUIVisualizationSettings.h:538
GUIDesignViewSettingsHorizontalFrame3
#define GUIDesignViewSettingsHorizontalFrame3
Definition: GUIDesigns.h:370
SUMO_ATTR_CENTER_Z
Definition: SUMOXMLDefinitions.h:403
GUIDialog_ViewSettings::mySelectedLaneColor
FXColorWell * mySelectedLaneColor
Definition: GUIDialog_ViewSettings.h:267
GUISUMOAbstractView::Decal::altitude
double altitude
The altitude of the image (net coordinates in z-direction, in m)
Definition: GUISUMOAbstractView.h:320
GUIDesignViewSettingsVerticalFrame3
#define GUIDesignViewSettingsVerticalFrame3
Definition: GUIDesigns.h:357
GUIVisualizationTextSettings::show
bool show
flag show
Definition: GUIVisualizationSettings.h:68
GUIPropertyScheme::allowsNegativeValues
bool allowsNegativeValues() const
Definition: GUIPropertyScheme.h:161
ICON_REMOVEDB
Definition: GUIIcons.h:101
GUIDesignViewSettingsButton2
#define GUIDesignViewSettingsButton2
Definition: GUIDesigns.h:410
GUIDialog_ViewSettings::onCmdColorChange
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
Definition: GUIDialog_ViewSettings.cpp:846
GUIDialog_ViewSettings::myInternalEdgeNamePanel
NamePanel * myInternalEdgeNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDialog_ViewSettings::myContainerColorSettingFrame
FXVerticalFrame * myContainerColorSettingFrame
Definition: GUIDialog_ViewSettings.h:324
ICON_SAVEDB
Definition: GUIIcons.h:100
GUIDialog_ViewSettings::SizePanel::SizePanel
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings)
Definition: GUIDialog_ViewSettings.cpp:1847
GUISettingsHandler::applyViewport
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
Definition: GUISettingsHandler.cpp:382
GUIDesignComboBoxStatic
#define GUIDesignComboBoxStatic
Combo box static (not editable)
Definition: GUIDesigns.h:208
GUIVisualizationSettings::SCHEME_NAME_EDGE_PARAM_NUMERICAL
static const std::string SCHEME_NAME_EDGE_PARAM_NUMERICAL
scheme names
Definition: GUIVisualizationSettings.h:668
gCurrentFolder
FXString gCurrentFolder
The folder used as last.
Definition: GUIIOGlobals.cpp:32
GUIDialog_ViewSettings::myJunctionColorMode
MFXIconComboBox * myJunctionColorMode
Definition: GUIDialog_ViewSettings.h:331
GUIVisualizationSettings::laneParam
std::string laneParam
Definition: GUIVisualizationSettings.h:482
GUIDialog_ViewSettings::onCmdNameChange
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
Definition: GUIDialog_ViewSettings.cpp:626
GUIDialog_ViewSettings::mySelectedVehicleColor
FXColorWell * mySelectedVehicleColor
Definition: GUIDialog_ViewSettings.h:273
GUIDialog_ViewSettings::updateVehicleParams
void updateVehicleParams()
reload known vehicle parameters
Definition: GUIDialog_ViewSettings.cpp:1663
GUIDialog_ViewSettings.h
GUIDialog_ViewSettings::myContainerThresholds
std::vector< FXRealSpinner * > myContainerThresholds
Definition: GUIDialog_ViewSettings.h:326
GUIVisualizationSettings::internalJunctionName
GUIVisualizationTextSettings internalJunctionName
Definition: GUIVisualizationSettings.h:569
GUIDialog_ViewSettings::myPolySizePanel
SizePanel * myPolySizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIDialog_ViewSettings::myVehicleSizePanel
SizePanel * myVehicleSizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIVisualizationSizeSettings::minSize
double minSize
The minimum size to draw this object.
Definition: GUIVisualizationSettings.h:103
GUIDesignViewSettingsMainDialog
#define GUIDesignViewSettingsMainDialog
Definition: GUIDesigns.h:348
GUIVisualizationSettings::vehicleParam
std::string vehicleParam
key for coloring by vehicle parameter
Definition: GUIVisualizationSettings.h:484
GUIDialog_ViewSettings::myPOIColorSettingFrame
FXVerticalFrame * myPOIColorSettingFrame
Definition: GUIDialog_ViewSettings.h:339
GUIDialog_ViewSettings::myGridYSizeDialer
FXRealSpinner * myGridYSizeDialer
Definition: GUIDialog_ViewSettings.h:258
GUIVisualizationSettings::getLaneEdgeScaleScheme
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
Definition: GUIVisualizationSettings.cpp:1188
GUIDesignViewSettingsDialog
#define GUIDesignViewSettingsDialog
Definition: GUIDesigns.h:350
GUIVisualizationSettings::streetName
GUIVisualizationTextSettings streetName
Definition: GUIVisualizationSettings.h:461
GUIDialog_ViewSettings::myContainerSizePanel
SizePanel * myContainerSizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIVisualizationSettings::colorSettings
GUIVisualizationColorSettings colorSettings
color settings
Definition: GUIVisualizationSettings.h:677
GUIDesignViewSettingsButton3
#define GUIDesignViewSettingsButton3
Definition: GUIDesigns.h:412
GUISUMOAbstractView::getViewportEditor
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
Definition: GUISUMOAbstractView.cpp:1336
GUIDialog_ViewSettings::mySelectedPersonColor
FXColorWell * mySelectedPersonColor
Definition: GUIDialog_ViewSettings.h:274
GUIVisualizationColorSettings::selectionColor
RGBColor selectionColor
basic selection color
Definition: GUIVisualizationSettings.h:129
GUIIconSubSys.h
GUIDialog_ViewSettings::myContainerColorInterpolation
FXCheckButton * myContainerColorInterpolation
Definition: GUIDialog_ViewSettings.h:328
GUIDialog_ViewSettings::myInternalJunctionNamePanel
NamePanel * myInternalJunctionNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::vehicleText
GUIVisualizationTextSettings vehicleText
Definition: GUIVisualizationSettings.h:523
GUISUMOAbstractView::getVehicleParamKeys
virtual std::vector< std::string > getVehicleParamKeys(bool) const
return list of available vehicle parameters
Definition: GUISUMOAbstractView.h:240
SUMO_TAG_DELAY
Definition: SUMOXMLDefinitions.h:258
SUMO_ATTR_HEIGHT
Definition: SUMOXMLDefinitions.h:789
GUIVisualizationSettings::showSizeLegend
bool showSizeLegend
Information whether the size legend shall be drawn.
Definition: GUIVisualizationSettings.h:626
GUIVisualizationSettings::cwaEdgeName
GUIVisualizationTextSettings cwaEdgeName
Definition: GUIVisualizationSettings.h:461
OutputDevice::openTag
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
Definition: OutputDevice.cpp:239
toString
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:47
GUIVisualizationSettings::SCHEME_NAME_PARAM_NUMERICAL
static const std::string SCHEME_NAME_PARAM_NUMERICAL
Definition: GUIVisualizationSettings.h:670
GUIDialog_ViewSettings::myShowMinGap
FXCheckButton * myShowMinGap
Definition: GUIDialog_ViewSettings.h:310
GUIDialog_ViewSettings::myParamKey
FXComboBox * myParamKey
Definition: GUIDialog_ViewSettings.h:288
StringUtils.h
GUIVisualizationSettings::poiType
GUIVisualizationTextSettings poiType
Definition: GUIVisualizationSettings.h:610
GUIDialog_ViewSettings::myEdgeValuePanel
NamePanel * myEdgeValuePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::poiName
GUIVisualizationTextSettings poiName
Definition: GUIVisualizationSettings.h:607
GUIDialog_ViewSettings::myLaneScales
std::vector< FXRealSpinner * > myLaneScales
Definition: GUIDialog_ViewSettings.h:293
GUISUMOAbstractView::buildColorRainbow
virtual void buildColorRainbow(const GUIVisualizationSettings &, GUIColorScheme &, int, GUIGlObjectType, bool hide=false, double hideThreshold=0)
recalibrate color scheme according to the current value range
Definition: GUISUMOAbstractView.h:223
GUIDesignViewSettingsButton1
#define GUIDesignViewSettingsButton1
Buttons.
Definition: GUIDesigns.h:408
OutputDevice::getDevice
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
Definition: OutputDevice.cpp:54
GUIDialog_ViewSettings::myPersonSizePanel
SizePanel * myPersonSizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIDesignViewSettingsComboBox1
#define GUIDesignViewSettingsComboBox1
Combo boxs.
Definition: GUIDesigns.h:385
GUIVisualizationSettings::showLaneDirection
bool showLaneDirection
Whether to show direction indicators for lanes.
Definition: GUIVisualizationSettings.h:473
GUIDesignViewSettingsColorWell1
#define GUIDesignViewSettingsColorWell1
Color wells.
Definition: GUIDesigns.h:419
GUIDialog_ViewSettings::myPersonShapeDetail
MFXIconComboBox * myPersonShapeDetail
Definition: GUIDialog_ViewSettings.h:315
GUIDialog_ViewSettings::setCurrentScheme
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
Definition: GUIDialog_ViewSettings.cpp:1791
GUIDesignCheckButtonViewSettings
#define GUIDesignCheckButtonViewSettings
CheckButton for Frames without thick extended over the frame.
Definition: GUIDesigns.h:121
GUISUMOAbstractView::setDelay
void setDelay(double delay)
Sets the delay of the parent application.
Definition: GUISUMOAbstractView.cpp:1661
GUISUMOAbstractView::getDelay
double getDelay() const
Returns the delay of the parent application.
Definition: GUISUMOAbstractView.cpp:1655
GUIDesignViewSettingsColorWell2
#define GUIDesignViewSettingsColorWell2
Definition: GUIDesigns.h:421
GUIDialog_ViewSettings::mySelectionColor
FXColorWell * mySelectionColor
selection colors
Definition: GUIDialog_ViewSettings.h:265
GUIVisualizationSettings::showLane2Lane
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
Definition: GUIVisualizationSettings.h:572
GUIDialog_ViewSettings::mySchemeName
FXComboBox * mySchemeName
Definition: GUIDialog_ViewSettings.h:256
GUIDialog_ViewSettings::myBackgroundColor
FXColorWell * myBackgroundColor
Definition: GUIDialog_ViewSettings.h:260
GUIDialog_ViewSettings::onUpdImportSetting
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
Definition: GUIDialog_ViewSettings.cpp:1383
GUIVisualizationSettings::showBlinker
bool showBlinker
Information whether vehicle blinkers shall be drawn.
Definition: GUIVisualizationSettings.h:502
SUMO_ATTR_CENTER_X
Definition: SUMOXMLDefinitions.h:401
GUIDialog_ViewSettings::myDrawCrossingsAndWalkingAreas
FXCheckButton * myDrawCrossingsAndWalkingAreas
Definition: GUIDialog_ViewSettings.h:354
GUIDialog_ViewSettings::mySelectedPersonPlanColor
FXColorWell * mySelectedPersonPlanColor
Definition: GUIDialog_ViewSettings.h:275
GUIDialog_ViewSettings::myStreetNamePanel
NamePanel * myStreetNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDesignViewSettingsVerticalFrame1
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
Definition: GUIDesigns.h:353
MID_SIMPLE_VIEW_LOAD_DECALS
For the load-decals - button.
Definition: GUIAppEnum.h:546
MFXUtils.h
GUIDialog_ViewSettings::mySpreadSuperposed
FXCheckButton * mySpreadSuperposed
Definition: GUIDialog_ViewSettings.h:298
GUIDialog_ViewSettings::onUpdDeleteSetting
long onUpdDeleteSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to delete settings.
Definition: GUIDialog_ViewSettings.cpp:1270
MID_SIMPLE_VIEW_IMPORT
For the import-from-file - button.
Definition: GUIAppEnum.h:544
SUMO_ATTR_VALUE
Definition: SUMOXMLDefinitions.h:779
GUIPropertyScheme::getName
const std::string & getName() const
Definition: GUIPropertyScheme.h:137
MID_SETTINGS_OK
Ok-button was pushed.
Definition: GUIAppEnum.h:466
GUIDialog_ViewSettings::SizePanel::getSettings
GUIVisualizationSizeSettings getSettings()
Definition: GUIDialog_ViewSettings.cpp:1868
GUIDialog_ViewSettings::myLaneEdgeColorMode
MFXIconComboBox * myLaneEdgeColorMode
... lane colorer
Definition: GUIDialog_ViewSettings.h:278
GUIDialog_ViewSettings::updateColorRanges
bool updateColorRanges(FXObject *sender, std::vector< FXColorWell * >::const_iterator colIt, std::vector< FXColorWell * >::const_iterator colEnd, std::vector< FXRealSpinner * >::const_iterator threshIt, std::vector< FXRealSpinner * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIColorScheme &scheme)
Definition: GUIDialog_ViewSettings.cpp:741
GUIDesignViewSettingsVerticalFrame4
#define GUIDesignViewSettingsVerticalFrame4
Definition: GUIDesigns.h:359
GUIDesignViewSettingsMatrix4
#define GUIDesignViewSettingsMatrix4
Definition: GUIDesigns.h:379
MFXAddEditTypedTable
Definition: MFXAddEditTypedTable.h:40
GUIDialog_ViewSettings::myContainerShapeDetail
MFXIconComboBox * myContainerShapeDetail
Definition: GUIDialog_ViewSettings.h:323
IOError
Definition: UtilExceptions.h:161
GUIDialog_ViewSettings::myPersonColorSettingFrame
FXVerticalFrame * myPersonColorSettingFrame
Definition: GUIDialog_ViewSettings.h:316
GUIDialog_ViewSettings::myContainerColors
std::vector< FXColorWell * > myContainerColors
Definition: GUIDialog_ViewSettings.h:325
GUIDialog_ViewSettings::myShowColorLegend
FXCheckButton * myShowColorLegend
Definition: GUIDialog_ViewSettings.h:361
GUIDialog_ViewSettings::myJunctionButtons
std::vector< FXButton * > myJunctionButtons
Definition: GUIDialog_ViewSettings.h:335
GUIVisualizationTextSettings::size
double size
text size
Definition: GUIVisualizationSettings.h:71
GUIDialog_ViewSettings::myDecalsFrame
FXVerticalFrame * myDecalsFrame
Definition: GUIDialog_ViewSettings.h:261
GUISUMOAbstractView::setBreakpoints
void setBreakpoints(const std::vector< SUMOTime > &breakpoints)
Sets the breakpoints of the parent application.
Definition: GUISUMOAbstractView.cpp:1667
GUIDialog_EditViewport.h
GUIVisualizationSettings::personQuality
int personQuality
The quality of person drawing.
Definition: GUIVisualizationSettings.h:535
GUIDialog_ViewSettings::myJunctionColorRainbow
FXButton * myJunctionColorRainbow
Definition: GUIDialog_ViewSettings.h:287
MID_SIMPLE_VIEW_COLORCHANGE
Informs the dialog about a value's change.
Definition: GUIAppEnum.h:534
GUIDialog_ViewSettings::mySaveDecals
FXCheckButton * mySaveDecals
Definition: GUIDialog_ViewSettings.h:376
GUISUMOAbstractView::Decal::initialised
bool initialised
Whether this image was initialised (inserted as a texture)
Definition: GUISUMOAbstractView.h:330
GUIPropertyScheme::addColor
int addColor(const T &color, const double threshold, const std::string &name="")
Definition: GUIPropertyScheme.h:80
GUIVisualizationColorSettings::selectedPersonPlanColor
RGBColor selectedPersonPlanColor
person plan selection color (Rides, Walks, personStops...)
Definition: GUIVisualizationSettings.h:159
GUIPropertyScheme::getNames
const std::vector< std::string > & getNames() const
Definition: GUIPropertyScheme.h:153
GUIDialog_ViewSettings::mySelectedEdgeColor
FXColorWell * mySelectedEdgeColor
Definition: GUIDialog_ViewSettings.h:266
MFXAddEditTypedTable.h
config.h
GUIVisualizationSettings::addSize
GUIVisualizationSizeSettings addSize
Definition: GUIVisualizationSettings.h:589
GUIVisualizationSettings::personValue
GUIVisualizationTextSettings personValue
Definition: GUIVisualizationSettings.h:541
GUISUMOAbstractView::getEdgeDataAttrs
virtual std::vector< std::string > getEdgeDataAttrs() const
return list of loaded edgeData attributes
Definition: GUISUMOAbstractView.h:230
GUIVisualizationSettings::personName
GUIVisualizationTextSettings personName
Definition: GUIVisualizationSettings.h:541
GUIDialog_ViewSettings::myShowLaneDecals
FXCheckButton * myShowLaneDecals
Definition: GUIDialog_ViewSettings.h:298
GUIVisualizationSettings::laneColorer
GUIColorer laneColorer
The lane colorer.
Definition: GUIVisualizationSettings.h:440
GLO_JUNCTION
a junction
Definition: GUIGlObjectTypes.h:50
GUIDesignViewSettingsVerticalFrame6
#define GUIDesignViewSettingsVerticalFrame6
Definition: GUIDesigns.h:363
GUIVisualizationSettings::containerColorer
GUIColorer containerColorer
The container colorer.
Definition: GUIVisualizationSettings.h:549
MFXEditedTableItem
Definition: MFXEditableTable.h:28
GUIVisualizationSettings::showLinkRules
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
Definition: GUIVisualizationSettings.h:455
GUIDesignViewSettingsMatrix5
#define GUIDesignViewSettingsMatrix5
Definition: GUIDesigns.h:381
GUIVisualizationColorSettings::selectedCrossingColor
RGBColor selectedCrossingColor
crossings selection color
Definition: GUIVisualizationSettings.h:144
GUIVisualizationSettings::spreadSuperposed
bool spreadSuperposed
Whether to improve visualisation of superposed (rail) edges.
Definition: GUIVisualizationSettings.h:479
GUIDialog_ViewSettings::~GUIDialog_ViewSettings
~GUIDialog_ViewSettings()
Destructor.
Definition: GUIDialog_ViewSettings.cpp:558
GUIDialog_ViewSettings::myLaneButtons
std::vector< FXButton * > myLaneButtons
Definition: GUIDialog_ViewSettings.h:282
GUIDialog_ViewSettings::myDither
FXCheckButton * myDither
Definition: GUIDialog_ViewSettings.h:355
GUIDialog_ViewSettings::myLaneMinWidthDialer
FXRealSpinner * myLaneMinWidthDialer
Definition: GUIDialog_ViewSettings.h:301
GUIDialog_ViewSettings::myVehicleNamePanel
NamePanel * myVehicleNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIDesignViewSettingsMatrix3
#define GUIDesignViewSettingsMatrix3
Definition: GUIDesigns.h:377
GUIDialog_ViewSettings::myJunctionColorSettingFrame
FXVerticalFrame * myJunctionColorSettingFrame
Definition: GUIDialog_ViewSettings.h:332
GUIDialog_ViewSettings::myPolyColorMode
MFXIconComboBox * myPolyColorMode
Definition: GUIDialog_ViewSettings.h:345
GUIDialog_ViewSettings::NamePanel::myBGColorWell
FXColorWell * myBGColorWell
Definition: GUIDialog_ViewSettings.h:64
GUIDialog_ViewSettings::myShowLaneBorders
FXCheckButton * myShowLaneBorders
Definition: GUIDialog_ViewSettings.h:298
GUIVisualizationSettings::drawBrakeGap
bool drawBrakeGap
Information whether the brake gap shall be drawn.
Definition: GUIVisualizationSettings.h:511
MFXUtils::getFXColor
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
Definition: MFXUtils.cpp:113
GUIVisualizationSettings::drawJunctionShape
bool drawJunctionShape
whether the shape of the junction should be drawn
Definition: GUIVisualizationSettings.h:574
GUISUMOAbstractView::retrieveBreakpoints
virtual const std::vector< SUMOTime > retrieveBreakpoints() const
retrieve breakpoints if provided by the application
Definition: GUISUMOAbstractView.h:372
MFXIconComboBox.h
GUIVisualizationSettings::poiColorer
GUIColorer poiColorer
The POI colorer.
Definition: GUIVisualizationSettings.h:601
GUIDialog_ViewSettings::myLaneScaleInterpolation
FXCheckButton * myLaneScaleInterpolation
Definition: GUIDialog_ViewSettings.h:296
FXDEFMAP
FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[]
GUIDialog_ViewSettings::myVehicleTextPanel
NamePanel * myVehicleTextPanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings
Stores the information about how to visualize structures.
Definition: GUIVisualizationSettings.h:345
GUIDialog_ViewSettings::myPOIColorInterpolation
FXCheckButton * myPOIColorInterpolation
Definition: GUIDialog_ViewSettings.h:343
GUIDialog_ViewSettings::myPersonColors
std::vector< FXColorWell * > myPersonColors
Definition: GUIDialog_ViewSettings.h:317
GUIDialog_ViewSettings::myForceDrawForPositionSelection
FXCheckButton * myForceDrawForPositionSelection
Definition: GUIDialog_ViewSettings.h:358
GUIDialog_ViewSettings::myAddSizePanel
SizePanel * myAddSizePanel
Definition: GUIDialog_ViewSettings.h:372
GUIDialog_ViewSettings::mySelectedRouteColor
FXColorWell * mySelectedRouteColor
Definition: GUIDialog_ViewSettings.h:272
GUIDialog_ViewSettings::myForceDrawForRectangleSelection
FXCheckButton * myForceDrawForRectangleSelection
Definition: GUIDialog_ViewSettings.h:359
GUIDesignViewSettingsLabel2
#define GUIDesignViewSettingsLabel2
Definition: GUIDesigns.h:402
GUIDialog_ViewSettings::onCmdCancel
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
Definition: GUIDialog_ViewSettings.cpp:617
GUIPropertyScheme::setThreshold
void setThreshold(const int pos, const double threshold)
Definition: GUIPropertyScheme.h:60
GUISUMOAbstractView::Decal::width
double width
The width of the image (net coordinates in x-direction, in m)
Definition: GUISUMOAbstractView.h:316
GUIDialog_ViewSettings::myPolyColors
std::vector< FXColorWell * > myPolyColors
Definition: GUIDialog_ViewSettings.h:347
GUIDialog_ViewSettings::rebuildColorMatrix
FXMatrix * rebuildColorMatrix(FXVerticalFrame *frame, std::vector< FXColorWell * > &colors, std::vector< FXRealSpinner * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIColorScheme &scheme)
Rebuilds manipulators for the current coloring scheme.
Definition: GUIDialog_ViewSettings.cpp:1435
GUISettingsHandler::addSettings
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
Definition: GUISettingsHandler.cpp:368
GUIDialog_ViewSettings::onCmdOk
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
Definition: GUIDialog_ViewSettings.cpp:609
GUIDialog_ViewSettings::NamePanel::myColorWell
FXColorWell * myColorWell
Definition: GUIDialog_ViewSettings.h:63
GUIDialog_ViewSettings::myLaneColorRainbowCheck
FXCheckButton * myLaneColorRainbowCheck
Definition: GUIDialog_ViewSettings.h:285
GUIDialog_ViewSettings::myShowBTRange
FXCheckButton * myShowBTRange
Definition: GUIDialog_ViewSettings.h:310
GUISettingsHandler::getDelay
double getDelay() const
Returns the parsed delay.
Definition: GUISettingsHandler.cpp:416
GUICompleteSchemeStorage::contains
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
Definition: GUICompleteSchemeStorage.cpp:74
GUIVisualizationColorSettings::selectedVehicleColor
RGBColor selectedVehicleColor
vehicle selection color
Definition: GUIVisualizationSettings.h:153
GUIPropertyScheme::isInterpolated
bool isInterpolated() const
Definition: GUIPropertyScheme.h:149
GUIDialog_ViewSettings::myPolyTypePanel
NamePanel * myPolyTypePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::forceDrawForPositionSelection
bool forceDrawForPositionSelection
flag to force draw for position selection (see drawForPositionSelection)
Definition: GUIVisualizationSettings.h:650
MFXEditedTableItem::row
int row
Definition: MFXEditableTable.h:30
GUIDialog_ViewSettings::setCurrent
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
Definition: GUIDialog_ViewSettings.cpp:601
GUISettingsHandler::getBreakpoints
const std::vector< SUMOTime > & getBreakpoints() const
Returns the parsed breakpoints.
Definition: GUISettingsHandler.h:111
GUISUMOAbstractView::Decal::centerX
double centerX
The center of the image in x-direction (net coordinates, in m)
Definition: GUISUMOAbstractView.h:310
GUIPropertySchemeStorage::setActive
void setActive(int scheme)
Definition: GUIPropertySchemeStorage.h:69
GUISUMOAbstractView::Decal
A decal (an image) that can be shown.
Definition: GUISUMOAbstractView.h:303
GUICompleteSchemeStorage::get
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
Definition: GUICompleteSchemeStorage.cpp:62
GUIVisualizationColorSettings::selectedLaneColor
RGBColor selectedLaneColor
lane selection color
Definition: GUIVisualizationSettings.h:135
GUIDialog_ViewSettings::mySelectedProhibitionColor
FXColorWell * mySelectedProhibitionColor
Definition: GUIDialog_ViewSettings.h:269
GUIDialog_ViewSettings::myShowRails
FXCheckButton * myShowRails
Definition: GUIDialog_ViewSettings.h:298
GUIVisualizationSettings::edgeName
GUIVisualizationTextSettings edgeName
Definition: GUIVisualizationSettings.h:461
GUIDialog_ViewSettings::myContainerColorMode
MFXIconComboBox * myContainerColorMode
Definition: GUIDialog_ViewSettings.h:323
MFXIconComboBox
Definition: MFXIconComboBox.h:53
GUIDesignViewSettingsMatrix1
#define GUIDesignViewSettingsMatrix1
Matrix.
Definition: GUIDesigns.h:373
GUIDialog_ViewSettings::getCurrentScheme
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
Definition: GUIDialog_ViewSettings.cpp:1785
GUIDialog_ViewSettings::myDecalsTable
MFXAddEditTypedTable * myDecalsTable
Definition: GUIDialog_ViewSettings.h:262
GUIVisualizationSettings::edgeValue
GUIVisualizationTextSettings edgeValue
Definition: GUIVisualizationSettings.h:461
GUIDialog_ViewSettings::myContainerNamePanel
NamePanel * myContainerNamePanel
Definition: GUIDialog_ViewSettings.h:363
GUIVisualizationSettings::forceDrawForRectangleSelection
bool forceDrawForRectangleSelection
flag to force draw for rectangle selection (see drawForRectangleSelection)
Definition: GUIVisualizationSettings.h:653
GUIVisualizationSettings::edgeData
std::string edgeData
key for coloring by edgeData
Definition: GUIVisualizationSettings.h:489
GUIPropertyScheme
Definition: GUIPropertyScheme.h:45
GUIPropertySchemeStorage::getActive
int getActive() const
Definition: GUIPropertySchemeStorage.h:75
GUIVisualizationSettings::showBTRange
bool showBTRange
Information whether the communication range shall be drawn.
Definition: GUIVisualizationSettings.h:514
GUIDialog_ViewSettings::myDrawJunctionShape
FXCheckButton * myDrawJunctionShape
Definition: GUIDialog_ViewSettings.h:353
GUIDialog_ViewSettings::NamePanel::myConstSizeCheck
FXCheckButton * myConstSizeCheck
Definition: GUIDialog_ViewSettings.h:65
GUISUMOAbstractView::getGridWidth
double getGridWidth() const
get grid width
Definition: GUISUMOAbstractView.cpp:1413
MFXUtils::deleteChildren
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
Definition: MFXUtils.cpp:31
GUIDialog_ViewSettings::myLaneColorRainbow
FXButton * myLaneColorRainbow
Definition: GUIDialog_ViewSettings.h:284
GUIVisualizationSizeSettings::exaggeration
double exaggeration
The size exaggeration (upscale)
Definition: GUIVisualizationSettings.h:106
SUMO_TAG_VIEWSETTINGS_DECAL
Definition: SUMOXMLDefinitions.h:241