52 #ifdef CHECK_MEMORY_LEAKS
54 #endif // CHECK_MEMORY_LEAKS
93 FXDialogBox(parent, "View Settings", DECOR_TITLE | DECOR_BORDER | DECOR_RESIZE, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0),
94 myParent(parent), mySettings(settings),
95 myDecals(decals), myDecalsLock(decalsLock),
97 myBackup = (*mySettings);
99 FXVerticalFrame* contentFrame =
100 new FXVerticalFrame(
this, LAYOUT_SIDE_TOP | LAYOUT_FILL_X | LAYOUT_FILL_Y,
101 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
105 new FXHorizontalFrame(contentFrame, FRAME_THICK, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
106 mySchemeName =
new FXComboBox(frame0, 20,
this,
MID_SIMPLE_VIEW_NAMECHANGE, COMBOBOX_INSERT_LAST | FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_CENTER_Y | COMBOBOX_STATIC);
108 for (std::vector<std::string>::const_iterator i = names.begin(); i != names.end(); ++i) {
109 size_t index = mySchemeName->appendItem((*i).c_str());
110 if ((*i) == mySettings->name) {
111 mySchemeName->setCurrentItem((FXint) index);
114 mySchemeName->setNumVisible(5);
116 new FXButton(frame0,
"\t\tSave the setting to registry",
118 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
119 new FXButton(frame0,
"\t\tRemove the setting from registry",
121 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
122 new FXButton(frame0,
"\t\tExport setting to file",
124 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
125 new FXButton(frame0,
"\t\tLoad setting from file",
127 ICON_ABOVE_TEXT | BUTTON_TOOLBAR | FRAME_RAISED | LAYOUT_TOP | LAYOUT_LEFT);
129 new FXVerticalSeparator(frame0);
130 new FXLabel(frame0,
"Export includes:", 0, LAYOUT_CENTER_Y);
131 mySaveViewPort =
new FXCheckButton(frame0,
"Viewport");
132 mySaveDelay =
new FXCheckButton(frame0,
"Delay");
133 mySaveDecals =
new FXCheckButton(frame0,
"Decals");
138 new FXTabBook(contentFrame, 0, 0, TABBOOK_LEFTTABS | PACK_UNIFORM_WIDTH | PACK_UNIFORM_HEIGHT | LAYOUT_FILL_X | LAYOUT_FILL_Y | LAYOUT_RIGHT,
139 0, 0, 0, 0, 0, 0, 0, 0);
142 new FXTabItem(tabbook,
"Background", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
143 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
144 FXVerticalFrame* frame1 =
145 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
148 new FXMatrix(frame1, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
149 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
150 new FXLabel(m11,
"Color", 0, LAYOUT_CENTER_Y);
153 LAYOUT_FIX_WIDTH | LAYOUT_CENTER_Y | LAYOUT_SIDE_TOP | FRAME_SUNKEN | FRAME_THICK | ICON_AFTER_TEXT,
154 0, 0, 100, 0, 0, 0, 0, 0);
156 new FXHorizontalSeparator(frame1, SEPARATOR_GROOVE | LAYOUT_FILL_X);
158 FXVerticalFrame* frame11 =
159 new FXVerticalFrame(frame1, LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
160 new FXLabel(frame11,
"Decals:");
161 myDecalsFrame =
new FXVerticalFrame(frame11);
163 new FXButton(frame111,
"&Load Decals", NULL,
this,
MID_SIMPLE_VIEW_LOAD_DECALS, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 20, 20, 4, 4);
164 new FXButton(frame111,
"&Save Decals", NULL,
this,
MID_SIMPLE_VIEW_SAVE_DECALS, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 20, 20, 4, 4);
166 new FXHorizontalSeparator(frame1, SEPARATOR_GROOVE | LAYOUT_FILL_X);
169 new FXMatrix(frame1, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
170 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
173 myShowGrid->setCheck(mySettings->showGrid);
176 new FXMatrix(m12, 2, LAYOUT_CENTER_Y | LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
177 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
178 new FXLabel(m121,
"x-spacing", 0, LAYOUT_CENTER_Y);
181 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
182 myGridXSizeDialer->setRange(1, 10000);
183 myGridXSizeDialer->setValue(mySettings->gridXSize);
185 new FXMatrix(m12, 2, LAYOUT_CENTER_Y | LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
186 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
187 new FXLabel(m122,
"y-spacing", 0, LAYOUT_CENTER_Y);
190 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
191 myGridYSizeDialer->setRange(1, 10000);
192 myGridYSizeDialer->setValue(mySettings->gridXSize);
196 new FXTabItem(tabbook,
"Streets", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
197 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
198 FXVerticalFrame* frame2 =
199 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
201 FXVerticalFrame* frame22 =
202 new FXVerticalFrame(frame2, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
204 new FXMatrix(frame22, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
205 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
206 new FXLabel(m21,
"Color", 0, LAYOUT_CENTER_Y);
207 myLaneEdgeColorMode =
new FXComboBox(m21, 30,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
208 myLaneColorInterpolation =
new FXCheckButton(m21,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
209 myLaneColorSettingFrame =
new FXVerticalFrame(frame22, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
211 new FXHorizontalSeparator(frame2, SEPARATOR_GROOVE | LAYOUT_FILL_X);
213 FXVerticalFrame* frame23 =
214 new FXVerticalFrame(frame2, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
216 new FXMatrix(frame23, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
217 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
218 new FXLabel(m23,
"Scale width", 0, LAYOUT_CENTER_Y);
219 myLaneEdgeScaleMode =
new FXComboBox(m23, 30,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
220 myLaneScaleInterpolation =
new FXCheckButton(m23,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
221 myLaneScaleSettingFrame =
new FXVerticalFrame(frame23, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
224 if (GUIVisualizationSettings::UseMesoSim) {
225 mySettings->edgeColorer.fill(*myLaneEdgeColorMode);
226 mySettings->edgeScaler.fill(*myLaneEdgeScaleMode);
227 myLaneEdgeColorMode->setNumVisible((
int)mySettings->edgeColorer.size());
228 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->edgeScaler.size());
231 mySettings->laneColorer.fill(*myLaneEdgeColorMode);
232 mySettings->laneScaler.fill(*myLaneEdgeScaleMode);
233 myLaneEdgeColorMode->setNumVisible((
int)mySettings->laneColorer.size());
234 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->laneScaler.size());
239 new FXHorizontalSeparator(frame2, SEPARATOR_GROOVE | LAYOUT_FILL_X);
241 new FXMatrix(frame2, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
242 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
244 myShowLaneBorders->setCheck(mySettings->laneShowBorders);
245 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
247 myShowLaneDecals->setCheck(mySettings->showLinkDecals);
248 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
250 myShowRails->setCheck(mySettings->showRails);
251 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
253 myHideMacroConnectors->setCheck(mySettings->hideConnectors);
254 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
255 new FXLabel(m22,
"Exaggerate width by", 0, LAYOUT_CENTER_Y);
256 myLaneWidthUpscaleDialer =
258 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
259 myLaneWidthUpscaleDialer->setRange(0, 10000);
260 myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration);
263 myEdgeNamePanel =
new NamePanel(m22,
this,
"Show edge name", mySettings->edgeName);
264 myStreetNamePanel =
new NamePanel(m22,
this,
"Show street name", mySettings->streetName);
265 myInternalEdgeNamePanel =
new NamePanel(m22,
this,
"Show internal edge name", mySettings->internalEdgeName);
266 myCwaEdgeNamePanel =
new NamePanel(m22,
this,
"Show crossing and walkingarea name", mySettings->cwaEdgeName);
270 new FXTabItem(tabbook,
"Vehicles", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
271 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
272 FXVerticalFrame* frame3 =
273 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
276 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
277 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
278 new FXLabel(m31,
"Show As", 0, LAYOUT_CENTER_Y);
279 myVehicleShapeDetail =
new FXComboBox(m31, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
280 myVehicleShapeDetail->appendItem(
"'triangles'");
281 myVehicleShapeDetail->appendItem(
"'boxes'");
282 myVehicleShapeDetail->appendItem(
"'simple shapes'");
283 myVehicleShapeDetail->appendItem(
"'raster images'");
284 myVehicleShapeDetail->setNumVisible(4);
285 myVehicleShapeDetail->setCurrentItem(settings->vehicleQuality);
287 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
290 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
291 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
292 new FXLabel(m32,
"Color", 0, LAYOUT_CENTER_Y);
293 myVehicleColorMode =
new FXComboBox(m32, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
294 mySettings->vehicleColorer.fill(*myVehicleColorMode);
295 myVehicleColorMode->setNumVisible((
int)mySettings->vehicleColorer.size());
296 myVehicleColorInterpolation =
new FXCheckButton(m32,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
298 myVehicleColorSettingFrame =
299 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
301 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
304 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
305 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
307 myShowBlinker->setCheck(mySettings->showBlinker);
308 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
310 myShowMinGap->setCheck(mySettings->drawMinGap);
311 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
313 myShowBTRange->setCheck(mySettings->showBTRange);
314 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
320 myVehicleNamePanel =
new NamePanel(m33,
this,
"Show vehicle name", mySettings->vehicleName);
328 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
331 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
332 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
333 myVehicleSizePanel =
new SizePanel(m34,
this, mySettings->vehicleSize);
338 new FXTabItem(tabbook,
"Persons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
339 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
340 FXVerticalFrame* frame3 =
341 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
344 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
345 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
346 new FXLabel(m101,
"Show As", 0, LAYOUT_CENTER_Y);
347 myPersonShapeDetail =
new FXComboBox(m101, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
348 myPersonShapeDetail->appendItem(
"'triangles'");
349 myPersonShapeDetail->appendItem(
"'boxes'");
350 myPersonShapeDetail->appendItem(
"'simple shapes'");
351 myPersonShapeDetail->appendItem(
"'raster images'");
352 myPersonShapeDetail->setNumVisible(4);
353 myPersonShapeDetail->setCurrentItem(settings->personQuality);
355 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
358 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
359 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
360 new FXLabel(m102,
"Color", 0, LAYOUT_CENTER_Y);
361 myPersonColorMode =
new FXComboBox(m102, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
362 mySettings->personColorer.fill(*myPersonColorMode);
363 myPersonColorMode->setNumVisible(10);
364 myPersonColorInterpolation =
new FXCheckButton(m102,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
366 myPersonColorSettingFrame =
367 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
369 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
372 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
373 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
374 myPersonNamePanel =
new NamePanel(m103,
this,
"Show person name", mySettings->personName);
376 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
379 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
380 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
381 myPersonSizePanel =
new SizePanel(m104,
this, mySettings->personSize);
386 new FXTabItem(tabbook,
"Containers", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
387 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
388 FXVerticalFrame* frame3 =
389 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
392 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
393 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
394 new FXLabel(m101,
"Show As", 0, LAYOUT_CENTER_Y);
395 myContainerShapeDetail =
new FXComboBox(m101, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
396 myContainerShapeDetail->appendItem(
"'triangles'");
397 myContainerShapeDetail->appendItem(
"'boxes'");
398 myContainerShapeDetail->appendItem(
"'simple shapes'");
399 myContainerShapeDetail->appendItem(
"'raster images'");
400 myContainerShapeDetail->setNumVisible(4);
401 myContainerShapeDetail->setCurrentItem(settings->containerQuality);
403 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
406 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
407 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
408 new FXLabel(m102,
"Color", 0, LAYOUT_CENTER_Y);
409 myContainerColorMode =
new FXComboBox(m102, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
410 mySettings->containerColorer.fill(*myContainerColorMode);
411 myContainerColorMode->setNumVisible(9);
412 myContainerColorInterpolation =
new FXCheckButton(m102,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
414 myContainerColorSettingFrame =
415 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
417 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
420 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
421 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
422 myContainerNamePanel =
new NamePanel(m103,
this,
"Show container name", mySettings->containerName);
424 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
427 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
428 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
429 myContainerSizePanel =
new SizePanel(m104,
this, mySettings->containerSize);
433 new FXTabItem(tabbook,
"Junctions", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
434 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
435 FXVerticalFrame* frame4 =
436 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
438 new FXMatrix(frame4, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
439 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
440 new FXLabel(m41,
"Color", 0, LAYOUT_CENTER_Y);
441 myJunctionColorMode =
new FXComboBox(m41, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
442 mySettings->junctionColorer.fill(*myJunctionColorMode);
443 myJunctionColorMode->setNumVisible(3);
444 myJunctionColorInterpolation =
new FXCheckButton(m41,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
446 myJunctionColorSettingFrame =
447 new FXVerticalFrame(frame4, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
449 new FXHorizontalSeparator(frame4, SEPARATOR_GROOVE | LAYOUT_FILL_X);
451 new FXMatrix(frame4, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
452 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
454 myShowTLIndex->setCheck(mySettings->drawLinkTLIndex);
455 new FXLabel(m42,
" ", 0, LAYOUT_CENTER_Y);
457 myShowJunctionIndex->setCheck(mySettings->drawLinkJunctionIndex);
458 new FXLabel(m42,
" ", 0, LAYOUT_CENTER_Y);
460 myShowLane2Lane->setCheck(mySettings->showLane2Lane);
461 new FXLabel(m42,
" ", 0, LAYOUT_CENTER_Y);
462 myJunctionNamePanel =
new NamePanel(m42,
this,
"Show junction name", mySettings->junctionName);
463 myInternalJunctionNamePanel =
new NamePanel(m42,
this,
"Show internal junction name", mySettings->internalJunctionName);
465 myDrawJunctionShape->setCheck(mySettings->drawJunctionShape);
468 new FXTabItem(tabbook,
"Detectors/Trigger", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
469 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
470 FXVerticalFrame* frame5 =
471 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
474 new FXMatrix(frame5, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
475 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
476 myAddNamePanel =
new NamePanel(m51,
this,
"Show detector name", mySettings->addName);
477 new FXHorizontalSeparator(frame5 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
480 new FXMatrix(frame5, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
481 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
482 myAddSizePanel =
new SizePanel(m52,
this, mySettings->addSize);
493 new FXTabItem(tabbook,
"POIs", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
494 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
495 FXVerticalFrame* frame6 =
496 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
499 new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
500 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
501 myPOINamePanel =
new NamePanel(m61,
this,
"Show poi names", mySettings->poiName);
502 new FXHorizontalSeparator(frame6 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
505 new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
506 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
507 myPOISizePanel =
new SizePanel(m62,
this, mySettings->poiSize);
511 new FXTabItem(tabbook,
"Polygons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
512 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
513 FXVerticalFrame* frame9 =
514 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
517 new FXMatrix(frame9, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
518 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
519 myPolyNamePanel =
new NamePanel(m91,
this,
"Show polygon names", mySettings->polyName);
520 new FXHorizontalSeparator(frame9 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
522 myPolySizePanel =
new SizePanel(m91,
this, mySettings->polySize);
526 new FXTabItem(tabbook,
"Legend", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
527 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
528 FXVerticalFrame* frame7 =
529 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
532 new FXMatrix(frame7, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
533 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
535 myShowSizeLegend->setCheck(mySettings->showSizeLegend);
539 new FXTabItem(tabbook,
"openGL", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
540 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
541 FXVerticalFrame* frame8 =
542 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
545 new FXMatrix(frame8, 1, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
546 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
548 myAntialiase->setCheck(mySettings->antialiase);
550 myDither->setCheck(mySettings->dither);
553 FXButton* initial =
new FXButton(f2,
"&Use", NULL,
this,
MID_SETTINGS_OK, BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
554 new FXButton(f2,
"&Discard", NULL,
this,
MID_SETTINGS_CANCEL, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
557 rebuildColorMatrices(
false);
560 const FXint minSize = 400;
561 setX(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - minSize));
562 setY(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - minSize));
563 setWidth(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"width", 700), minSize));
564 setHeight(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"height", 500), minSize));
618 FXString dataS = (
char*) data;
621 for (
int i = 0; i <
mySchemeName->getNumItems() - 1; ++i) {
697 std::vector<FXColorWell*>::const_iterator colEnd,
698 std::vector<FXRealSpinDial*>::const_iterator threshIt,
699 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
700 std::vector<FXButton*>::const_iterator buttonIt,
703 while (colIt != colEnd) {
705 if (sender == *colIt) {
709 if (sender == *threshIt) {
710 const SUMOReal val = (*threshIt)->getValue();
714 (*threshIt)->getRange(lo, hi);
715 (*threshIt)->setRange(lo, val);
719 if (threshIt != threshEnd) {
720 (*threshIt)->getRange(lo, hi);
721 (*threshIt)->setRange(val, hi);
726 if (sender == *colIt) {
730 if (sender == *buttonIt) {
750 std::vector<FXRealSpinDial*>::const_iterator scaleEnd,
751 std::vector<FXRealSpinDial*>::const_iterator threshIt,
752 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
753 std::vector<FXButton*>::const_iterator buttonIt,
756 while (scaleIt != scaleEnd) {
758 if (sender == *scaleIt) {
759 scheme.
setColor(pos, (*scaleIt)->getValue());
762 if (sender == *threshIt) {
763 const SUMOReal val = (*threshIt)->getValue();
767 (*threshIt)->getRange(lo, hi);
768 (*threshIt)->setRange(lo, val);
772 if (threshIt != threshEnd) {
773 (*threshIt)->getRange(lo, hi);
774 (*threshIt)->setRange(val, hi);
779 if (sender == *scaleIt) {
780 scheme.
setColor(pos, (*scaleIt)->getValue());
783 if (sender == *buttonIt) {
785 scheme.
addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
810 bool doRebuildColorMatrices =
false;
819 if (GUIVisualizationSettings::UseMesoSim) {
886 doRebuildColorMatrices =
true;
890 doRebuildColorMatrices =
true;
893 doRebuildColorMatrices =
true;
900 doRebuildColorMatrices =
true;
904 doRebuildColorMatrices =
true;
907 doRebuildColorMatrices =
true;
914 doRebuildColorMatrices =
true;
918 doRebuildColorMatrices =
true;
921 doRebuildColorMatrices =
true;
928 doRebuildColorMatrices =
true;
932 doRebuildColorMatrices =
true;
935 doRebuildColorMatrices =
true;
942 doRebuildColorMatrices =
true;
946 doRebuildColorMatrices =
true;
949 doRebuildColorMatrices =
true;
956 doRebuildColorMatrices =
true;
960 doRebuildColorMatrices =
true;
963 doRebuildColorMatrices =
true;
993 if (doRebuildColorMatrices) {
997 getApp()->forceRefresh();
1006 if (settingsName !=
"") {
1007 FXint index =
mySchemeName->appendItem(settingsName.c_str());
1020 if (lookFrom.
z() > 0) {
1029 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1069 std::string name =
"";
1070 while (name.length() == 0) {
1071 FXDialogBox dialog(
this,
"Enter a name", DECOR_TITLE | DECOR_BORDER);
1072 FXVerticalFrame* content =
new FXVerticalFrame(&dialog, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10);
1073 new FXLabel(content,
"Please enter an alphanumeric name: ", NULL, LAYOUT_FILL_X | JUSTIFY_LEFT);
1074 FXTextField* text =
new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, TEXTFIELD_ENTER_ONLY | FRAME_SUNKEN | FRAME_THICK | LAYOUT_FILL_X);
1075 new FXHorizontalSeparator(content, SEPARATOR_GROOVE | LAYOUT_FILL_X);
1077 new FXButton(buttons,
"&OK", NULL, &dialog, FXDialogBox::ID_ACCEPT, BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_RIGHT);
1078 new FXButton(buttons,
"&Cancel", NULL, &dialog, FXDialogBox::ID_CANCEL, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_RIGHT, 0, 0, 0, 0, 20, 20);
1081 if (!dialog.execute()) {
1084 name = text->getText().text();
1085 for (
size_t i = 0; i < name.length(); ++i) {
1086 if (name[i] !=
'_' && (name[i] <
'a' || name[i] >
'z') && (name[i] <
'A' || name[i] >
'Z') && (name[i] <
'0' || name[i] >
'9')) {
1094 tmpSettings.
name = name;
1108 sender->handle(
this,
1110 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1122 std::string name =
mySchemeName->getItem(index).text();
1133 sender->handle(
this,
1135 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1165 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
1173 sender->handle(
this,
1176 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1184 FXFileDialog opendialog(
this,
"Import view settings");
1186 opendialog.setSelectMode(SELECTFILE_ANY);
1187 opendialog.setPatternList(
"*.xml");
1191 if (opendialog.execute()) {
1201 FXFileDialog opendialog(
this,
"Load Decals");
1203 opendialog.setSelectMode(SELECTFILE_ANY);
1204 opendialog.setPatternList(
"*.xml");
1208 if (opendialog.execute()) {
1229 FXMessageBox::error(
myParent, MBOX_OK,
"Storing failed!",
"%s", e.what());
1239 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1257 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1259 for (k = 0; k < 7; k++) {
1260 header->setItemJustify(k, JUSTIFY_CENTER_X | JUSTIFY_TOP);
1261 header->setItemSize(k, 60);
1263 header->setItemSize(0, 150);
1266 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1279 for (k = 0; k < 7; k++) {
1287 std::vector<FXColorWell*>& colors,
1288 std::vector<FXRealSpinDial*>& thresholds,
1289 std::vector<FXButton*>& buttons,
1290 FXCheckButton* interpolation,
1293 FXMatrix* m =
new FXMatrix(frame, 3,
1294 LAYOUT_FILL_X | MATRIX_BY_COLUMNS,
1295 0, 0, 0, 0, 10, 10, 0, 0, 5, 3);
1299 const bool fixed = scheme.
isFixed();
1300 std::vector<RGBColor>::const_iterator colIt = scheme.
getColors().begin();
1301 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1302 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1303 FX::FXString buttonText =
"Add";
1304 while (colIt != scheme.
getColors().end()) {
1307 LAYOUT_FIX_WIDTH | LAYOUT_CENTER_Y | FRAME_SUNKEN | FRAME_THICK | ICON_AFTER_TEXT,
1308 0, 0, 100, 0, 0, 0, 0, 0));
1310 new FXLabel(m, nameIt->c_str());
1315 threshDialer->setValue(*threshIt);
1316 thresholds.push_back(threshDialer);
1317 buttons.push_back(
new FXButton(m, buttonText, NULL,
this,
MID_SIMPLE_VIEW_COLORCHANGE, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 20, 20, 4, 4));
1318 buttonText =
"Remove";
1326 interpolation->disable();
1328 if (colors.size() > 1) {
1329 interpolation->enable();
1330 if (interpolation->getCheck() != FALSE) {
1331 thresholds.front()->enable();
1333 thresholds.front()->disable();
1336 interpolation->disable();
1337 thresholds.front()->disable();
1346 std::vector<FXRealSpinDial*>& scales,
1347 std::vector<FXRealSpinDial*>& thresholds,
1348 std::vector<FXButton*>& buttons,
1349 FXCheckButton* interpolation,
1352 FXMatrix* m =
new FXMatrix(frame, 3,
1353 LAYOUT_FILL_X | MATRIX_BY_COLUMNS,
1354 0, 0, 0, 0, 10, 10, 0, 0, 5, 3);
1358 const bool fixed = scheme.
isFixed();
1359 std::vector<SUMOReal>::const_iterator scaleIt = scheme.
getColors().begin();
1360 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1361 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1362 FX::FXString buttonText =
"Add";
1363 while (scaleIt != scheme.
getColors().end()) {
1365 scaleDialer->setValue(*scaleIt);
1366 scales.push_back(scaleDialer);
1368 new FXLabel(m, nameIt->c_str());
1373 threshDialer->setValue(*threshIt);
1374 thresholds.push_back(threshDialer);
1375 buttons.push_back(
new FXButton(m, buttonText, NULL,
this,
MID_SIMPLE_VIEW_COLORCHANGE, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 20, 20, 4, 4));
1376 buttonText =
"Remove";
1384 interpolation->disable();
1386 if (scales.size() > 1) {
1387 interpolation->enable();
1388 if (interpolation->getCheck() != FALSE) {
1389 thresholds.front()->enable();
1391 thresholds.front()->disable();
1394 interpolation->disable();
1395 thresholds.front()->disable();
1407 LAYOUT_FILL_Y | LAYOUT_FIX_WIDTH, 0, 0, 470, 0);
1413 for (
int i = 1; i <= 5; ++i) {
1463 std::string value = i->
item->getText().text();
1465 if (value.find_first_not_of(
" ") == std::string::npos) {
1471 if (row == static_cast<int>(
myDecals->size())) {
1483 }
else if (row > static_cast<int>(
myDecals->size())) {
1487 d = (*myDecals)[row];
1501 std::string msg =
"The value must be a float, is:" + value;
1502 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1509 std::string msg =
"The value must be a float, is:" + value;
1510 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1517 std::string msg =
"The value must be a float, is:" + value;
1518 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1525 std::string msg =
"The value must be a float, is:" + value;
1526 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1533 std::string msg =
"The value must be a float, is:" + value;
1534 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1541 std::string msg =
"The value must be a float, is:" + value;
1542 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1548 (*myDecals)[row] = d;
1568 for (
int i = 0; i <
mySchemeName->getNumItems(); ++i) {
1580 const std::string& title,
1585 FXMatrix* m1 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1586 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1587 new FXLabel(m1,
"Size", 0, LAYOUT_CENTER_Y);
1588 mySizeDial =
new FXRealSpinDial(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE,
1589 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1592 FXMatrix* m2 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1593 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1594 new FXLabel(m2,
"Color", 0, LAYOUT_CENTER_Y);
1596 target, MID_SIMPLE_VIEW_COLORCHANGE,
1597 LAYOUT_FIX_WIDTH | LAYOUT_CENTER_Y | LAYOUT_SIDE_TOP | FRAME_SUNKEN | FRAME_THICK | ICON_AFTER_TEXT,
1598 0, 0, 100, 0, 0, 0, 0, 0);
1611 myCheck->setCheck(settings.
show);
1612 mySizeDial->setValue(settings.
size);
1621 myCheck =
new FXCheckButton(parent,
"Draw with constant size when zoomed out", target,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
1624 FXMatrix* m1 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1625 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1626 new FXLabel(m1,
"Minimum Size", 0, LAYOUT_CENTER_Y);
1628 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1629 myMinSizeDial->setValue(settings.
minSize);
1630 FXMatrix* m2 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1631 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1632 new FXLabel(m2,
"Exaggerate by", 0, LAYOUT_CENTER_Y);
1634 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1635 myExaggerateDial->setRange(0, 10000);
1643 myMinSizeDial->getValue(), myExaggerateDial->getValue(), myCheck->getCheck() != FALSE);
1650 myMinSizeDial->setValue(settings.
minSize);
1657 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"x", getX());
1658 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"y", getY());
1659 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"width", getWidth());
1660 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"height", getHeight());
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
GUIDialog_EditViewport * getViewportEditor()
get the viewport and create it on first access
GUIVisualizationTextSettings junctionName
A decal (an image) that can be shown.
FXCheckButton * mySaveViewPort
FXVerticalFrame * myVehicleColorSettingFrame
long onUpdSaveSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to save the settings into the registry.
FXCheckButton * myLaneColorInterpolation
OutputDevice & writeAttr(const SumoXMLAttr attr, const T &val)
writes a named attribute
FXComboBox * myJunctionColorMode
void close()
Closes the device and removes it from the dictionary.
FXVerticalFrame * myDecalsFrame
const std::vector< T > & getColors() const
GUICompleteSchemeStorage gSchemeStorage
bool showSizeLegend
Information whether the size legend shall be drawn.
FXCheckButton * myJunctionColorInterpolation
FXCheckButton * myShowBlinker
bool isInterpolated() const
FXVerticalFrame * myLaneScaleSettingFrame
FXCheckButton * myShowBTRange
GUIVisualizationTextSettings streetName
float laneWidthExaggeration
The lane exaggeration (upscale thickness)
size_t getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
SUMOReal roll
The roll of the image to the ground plane (in degrees)
std::string addSettings(GUISUMOAbstractView *view=0) const
Adds the parsed settings to the global list of settings.
virtual void setViewport(const Position &lookFrom, const Position &lookAt)
applies the given viewport settings
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings addName
FXComboBox * myVehicleColorMode
void removeColor(const size_t pos)
GUIVisualizationTextSettings personName
std::vector< FXButton * > myLaneButtons
bool drawLinkTLIndex
Information whether a link's tls index shall be drawn.
static SUMOReal _2SUMOReal(const E *const data)
SizePanel * myPOISizePanel
FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[]
GUIVisualizationTextSettings poiName
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
bool showBTRange
Information whether the communication range shall be drawn.
GUIColorer laneColorer
The lane colorer.
GUIColorer containerColorer
The container colorer.
Stores the information about how to visualize structures.
The dialog to change the view (gui) settings.
SizePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const GUIVisualizationSizeSettings &settings)
static RGBColor getRGBColor(FXColor col)
converts FXColor to RGBColor
void remove(GUIDialog_EditViewport *)
std::vector< FXRealSpinDial * > myLaneScaleThresholds
std::vector< GUISUMOAbstractView::Decal > * myDecals
The parent's decals.
NamePanel * myPOINamePanel
void setColor(const size_t pos, const T &color)
bool showRails
Information whether rails shall be drawn.
void loadDecals(const std::string &file)
Loads decals from a file.
std::vector< FXButton * > myPersonButtons
FXMatrix * rebuildScaleMatrix(FXVerticalFrame *frame, std::vector< FXRealSpinDial * > &scales, std::vector< FXRealSpinDial * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIScaleScheme &scheme)
Rebuilds manipulators for the current scaling scheme.
std::vector< FXColorWell * > myJunctionColors
GUIVisualizationTextSettings vehicleName
FXComboBox * myVehicleShapeDetail
void loadSettings(const std::string &file)
Loads a scheme from a file.
bool hasDecals() const
Returns whether any decals have been parsed.
static void deleteChildren(FXWindow *w)
Deletes all children of the given window.
long onCmdSaveDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be saved to a file.
For the export-to-file - button.
void setActive(size_t scheme)
void writeXML(OutputDevice &dev)
write the settings to the given device
GUIVisualizationTextSettings cwaEdgeName
FXString gCurrentFolder
The folder used as last.
long onCmdSaveSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be saved into the registry.
bool laneShowBorders
Information whether lane borders shall be drawn.
SUMOReal getGridHeight() const
SUMOReal centerZ
The center of the image in z-direction (net coordinates, in m)
long onCmdExportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be exported into a file.
SUMOReal width
The width of the image (net coordinates in x-direction, in m)
long onCmdEditTable(FXObject *, FXSelector, void *data)
Called if the decals-table was changed.
FXCheckButton * mySaveDelay
static FXString getFilename2Write(FXWindow *parent, const FXString &header, const FXString &extension, FXIcon *icon, FXString ¤tFolder)
Returns the file name to write.
bool dither
Information whether dithering shall be enabled.
FXVerticalFrame * myContainerColorSettingFrame
std::vector< FXRealSpinDial * > myPersonThresholds
const std::vector< GUISUMOAbstractView::Decal > & getDecals() const
Returns the parsed decals.
FXColorWell * myColorWell
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
SizePanel * myPolySizePanel
void setViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
void setThreshold(const size_t pos, const SUMOReal threshold)
GUIVisualizationSizeSettings polySize
GUIColorer vehicleColorer
The vehicle colorer.
GUIVisualizationTextSettings edgeName
void setInterpolated(const bool interpolate, SUMOReal interpolationStart=0.f)
std::vector< FXButton * > myContainerButtons
FXCheckButton * myVehicleColorInterpolation
GUIVisualizationSizeSettings addSize
const std::vector< std::string > & getNames() const
Returns a list of stored settings names.
NamePanel * myInternalEdgeNamePanel
FXCheckButton * myShowMinGap
NamePanel * myEdgeNamePanel
FXCheckButton * myShowGrid
std::string name
The name of this setting.
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXCheckButton * myShowLane2Lane
void rebuildList()
Rebuilds the decals table.
void update(const GUIVisualizationSizeSettings &settings)
SUMOReal altitude
The altitude of the image (net coordinates in z-direction, in m)
GUIVisualizationSettings * mySettings
The current settings.
GUIVisualizationTextSettings internalEdgeName
FXMatrix * rebuildColorMatrix(FXVerticalFrame *frame, std::vector< FXColorWell * > &colors, std::vector< FXRealSpinDial * > &thresholds, std::vector< FXButton * > &buttons, FXCheckButton *interpolation, GUIColorScheme &scheme)
Rebuilds manipulators for the current coloring scheme.
std::vector< FXRealSpinDial * > myLaneScales
A point in 2D or 3D with translation and scaling methods.
NamePanel * myStreetNamePanel
SUMOReal centerY
The center of the image in y-direction (net coordinates, in m)
bool drawMinGap
Information whether the minimum gap shall be drawn.
NamePanel * myInternalJunctionNamePanel
std::vector< FXColorWell * > myVehicleColors
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
FXRealSpinDial * myLaneWidthUpscaleDialer
Cancel-button was pushed.
void remove(const std::string &name)
Removes the setting with the given name.
unsigned int getNumInitialSettings() const
Returns the number of initial settings.
void saveWindowSize()
save window position and size to the registry
SUMOReal z() const
Returns the z-position.
FXCheckButton * myShowSizeLegend
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
bool allowsNegativeValues() const
FXCheckButton * mySaveDecals
FXVerticalFrame * myLaneColorSettingFrame
FXComboBox & getColoringSchemesCombo()
bool initialised
Whether this image was initialised (inserted as a texture)
GUIColorer personColorer
The person colorer.
GUIVisualizationTextSettings internalJunctionName
For the import-from-file - button.
const std::vector< std::string > & getNames() const
float minSize
The minimum size to draw this object.
GUIColorer junctionColorer
The junction colorer.
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
std::string filename
The path to the file the image is located at.
SUMOReal gridXSize
Information about the grid spacings.
long onUpdDeleteSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to delete settings.
FXVerticalFrame * myJunctionColorSettingFrame
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
FXCheckButton * myLaneScaleInterpolation
SUMOReal getDelay() const
Returns the delay of the parent application.
FXCheckButton * myShowLaneBorders
SizePanel * myAddSizePanel
NamePanel * myAddNamePanel
unsigned int addColor(const T &color, const SUMOReal threshold, const std::string &name="")
GUIScaleScheme & getLaneEdgeScaleScheme()
Returns the current lane (edge) scaling schme.
std::vector< FXColorWell * > myPersonColors
FXRealSpinDial * myGridYSizeDialer
int containerQuality
The quality of container drawing.
long onCmdCancel(FXObject *, FXSelector, void *)
Called if the Cancel-button was pressed.
RGBColor backgroundColor
The background color to use.
bool antialiase
Information whether antialiase shall be enabled.
std::vector< FXButton * > myLaneScaleButtons
void saveDecals(OutputDevice &dev) const
Writes the currently used decals into a file.
Informs the dialog about a value's change.
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
NamePanel * myCwaEdgeNamePanel
For the save-decals - button.
void unlock()
release mutex lock
For the load-decals - button.
SUMOReal height
The height of the image (net coordinates in y-direction, in m)
FXComboBox * myContainerColorMode
GUIVisualizationSizeSettings poiSize
~GUIDialog_ViewSettings()
Destructor.
bool updateScaleRanges(FXObject *sender, std::vector< FXRealSpinDial * >::const_iterator colIt, std::vector< FXRealSpinDial * >::const_iterator colEnd, std::vector< FXRealSpinDial * >::const_iterator threshIt, std::vector< FXRealSpinDial * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIScaleScheme &scheme)
SUMOReal centerX
The center of the image in x-direction (net coordinates, in m)
NamePanel * myVehicleNamePanel
FXCheckButton * myShowJunctionIndex
NamePanel * myContainerNamePanel
MFXAddEditTypedTable * myDecalsTable
FXCheckButton * myDrawJunctionShape
float exaggeration
The size exaggeration (upscale)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
FXRealSpinDial * mySizeDial
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
GUIVisualizationSizeSettings containerSize
FXComboBox * myLaneEdgeScaleMode
... lane scaler
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
GUIVisualizationTextSettings getSettings()
FXComboBox * myPersonShapeDetail
Informs the dialog about switching to another scheme.
NamePanel * myJunctionNamePanel
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
FXComboBox * myLaneEdgeColorMode
... lane colorer
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
FXCheckButton * myHideMacroConnectors
bool drawLinkJunctionIndex
Information whether a link's junction index shall be drawn.
SUMOReal getGridWidth() const
FXCheckButton * myShowRails
GUIVisualizationSizeSettings personSize
virtual bool setColorScheme(const std::string &)
int personQuality
The quality of person drawing.
FXCheckButton * myShowTLIndex
bool showGrid
Information whether a grid shall be shown.
long onUpdExportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to export settings into a file.
static FXColor getFXColor(const RGBColor &col)
converts FXColor to RGBColor
SUMOReal layer
The layer of the image.
long onCmdColorChange(FXObject *, FXSelector, void *)
Called if something (color, width, etc.) has been changed.
bool showLane2Lane
Information whether lane-to-lane arrows shall be drawn.
SizePanel * myPersonSizePanel
Static storage of an output device and its base (abstract) implementation.
void setCellType(size_t pos, CellType t)
bool closeTag()
Closes the most recently opened tag.
FXRealSpinDial * myGridXSizeDialer
An XML-handler for visualisation schemes.
void save(OutputDevice &dev) const
Writes the settings into an output device.
FXCheckButton * myPersonColorInterpolation
GUIVisualizationSizeSettings vehicleSize
SizePanel * myVehicleSizePanel
bool drawJunctionShape
whether the shape of the junction should be drawn
std::vector< FXRealSpinDial * > myContainerThresholds
long onCmdLoadDecals(FXObject *, FXSelector, void *data)
Called if the decals shall be loaded from a file.
void update(const GUIVisualizationTextSettings &settings)
FXColorWell * myBackgroundColor
std::vector< FXRealSpinDial * > myVehicleThresholds
SUMOReal tilt
The tilt of the image to the ground plane (in degrees)
GUIVisualizationSizeSettings getSettings()
int vehicleQuality
The quality of vehicle drawing.
bool updateColorRanges(FXObject *sender, std::vector< FXColorWell * >::const_iterator colIt, std::vector< FXColorWell * >::const_iterator colEnd, std::vector< FXRealSpinDial * >::const_iterator threshIt, std::vector< FXRealSpinDial * >::const_iterator threshEnd, std::vector< FXButton * >::const_iterator buttonIt, GUIColorScheme &scheme)
MFXMutex * myDecalsLock
Lock used when changing the decals.
SizePanel * myContainerSizePanel
void setNumberCellParams(size_t pos, double min, double max, double steps1, double steps2, double steps3, const std::string &format)
std::vector< FXRealSpinDial * > myJunctionThresholds
FXCheckButton * myContainerColorInterpolation
GUIScaler laneScaler
The lane scaler.
FXCheckButton * myAntialiase
const std::vector< SUMOReal > & getThresholds() const
FXComboBox * myContainerShapeDetail
long onCmdDeleteSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be deleted.
GUISUMOAbstractView * myParent
The parent view (which settings are changed)
FXVerticalFrame * myPersonColorSettingFrame
NamePanel * myPolyNamePanel
std::vector< FXColorWell * > myContainerColors
static FXIcon * getIcon(GUIIcon which)
std::vector< FXButton * > myJunctionButtons
NamePanel * myPersonNamePanel
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
size_t getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
std::vector< FXColorWell * > myLaneColors
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
FXComboBox * mySchemeName
std::vector< FXRealSpinDial * > myLaneThresholds
std::vector< FXButton * > myVehicleButtons
SUMOReal rot
The rotation of the image in the ground plane (in degrees)
long onCmdImportSetting(FXObject *, FXSelector, void *data)
Called if the settings shall be read from a file.
void add(const GUIVisualizationSettings &scheme)
Adds a visualization scheme.
FXComboBox * myPersonColorMode
For the save-to-db - button.
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
GUIVisualizationTextSettings polyName
GUIVisualizationTextSettings containerName
FXCheckButton * myShowLaneDecals