52 #ifdef CHECK_MEMORY_LEAKS 54 #endif // CHECK_MEMORY_LEAKS 83 FXIMPLEMENT(
GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
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);
104 FXHorizontalFrame* frame0 =
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);
162 FXHorizontalFrame* frame111 =
new FXHorizontalFrame(frame11, LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 5, 5);
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);
174 new FXLabel(m12,
"");
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 mySettings->edgeColorer.fill(*myLaneEdgeColorMode);
225 mySettings->edgeScaler.fill(*myLaneEdgeScaleMode);
226 myLaneEdgeColorMode->setNumVisible((
int)mySettings->edgeColorer.size());
227 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->edgeScaler.size());
229 mySettings->laneColorer.fill(*myLaneEdgeColorMode);
230 mySettings->laneScaler.fill(*myLaneEdgeScaleMode);
231 myLaneEdgeColorMode->setNumVisible((
int)mySettings->laneColorer.size());
232 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->laneScaler.size());
235 new FXHorizontalSeparator(frame2, SEPARATOR_GROOVE | LAYOUT_FILL_X);
237 new FXMatrix(frame2, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
238 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
240 myShowLaneBorders->setCheck(mySettings->laneShowBorders);
241 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
243 myShowLaneDecals->setCheck(mySettings->showLinkDecals);
244 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
246 myShowRails->setCheck(mySettings->showRails);
247 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
249 myHideMacroConnectors->setCheck(mySettings->hideConnectors);
250 new FXLabel(m22,
" ", 0, LAYOUT_CENTER_Y);
251 new FXLabel(m22,
"Exaggerate width by", 0, LAYOUT_CENTER_Y);
252 myLaneWidthUpscaleDialer =
254 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
255 myLaneWidthUpscaleDialer->setRange(0, 10000);
256 myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration);
259 myEdgeNamePanel =
new NamePanel(m22,
this,
"Show edge name", mySettings->edgeName);
260 myStreetNamePanel =
new NamePanel(m22,
this,
"Show street name", mySettings->streetName);
264 new FXTabItem(tabbook,
"Vehicles", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
265 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
266 FXVerticalFrame* frame3 =
267 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
270 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
271 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
272 new FXLabel(m31,
"Show As", 0, LAYOUT_CENTER_Y);
273 myVehicleShapeDetail =
new FXComboBox(m31, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
274 myVehicleShapeDetail->appendItem(
"'triangles'");
275 myVehicleShapeDetail->appendItem(
"'boxes'");
276 myVehicleShapeDetail->appendItem(
"'simple shapes'");
277 myVehicleShapeDetail->appendItem(
"'raster images'");
278 myVehicleShapeDetail->setNumVisible(4);
279 myVehicleShapeDetail->setCurrentItem(settings->vehicleQuality);
281 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
284 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
285 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
286 new FXLabel(m32,
"Color", 0, LAYOUT_CENTER_Y);
287 myVehicleColorMode =
new FXComboBox(m32, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
288 mySettings->vehicleColorer.fill(*myVehicleColorMode);
289 myVehicleColorMode->setNumVisible((
int)mySettings->vehicleColorer.size());
290 myVehicleColorInterpolation =
new FXCheckButton(m32,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
292 myVehicleColorSettingFrame =
293 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
295 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
298 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
299 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
301 myShowBlinker->setCheck(mySettings->showBlinker);
302 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
304 myShowMinGap->setCheck(mySettings->drawMinGap);
305 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
307 myShowBTRange->setCheck(mySettings->showBTRange);
308 new FXLabel(m33,
" ", 0, LAYOUT_CENTER_Y);
314 myVehicleNamePanel =
new NamePanel(m33,
this,
"Show vehicle name", mySettings->vehicleName);
322 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
325 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
326 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
327 myVehicleSizePanel =
new SizePanel(m34,
this, mySettings->vehicleSize);
332 new FXTabItem(tabbook,
"Persons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
333 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
334 FXVerticalFrame* frame3 =
335 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
338 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
339 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
340 new FXLabel(m101,
"Show As", 0, LAYOUT_CENTER_Y);
341 myPersonShapeDetail =
new FXComboBox(m101, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
342 myPersonShapeDetail->appendItem(
"'triangles'");
343 myPersonShapeDetail->appendItem(
"'boxes'");
344 myPersonShapeDetail->appendItem(
"'simple shapes'");
345 myPersonShapeDetail->appendItem(
"'raster images'");
346 myPersonShapeDetail->setNumVisible(4);
347 myPersonShapeDetail->setCurrentItem(settings->personQuality);
349 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
352 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
353 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
354 new FXLabel(m102,
"Color", 0, LAYOUT_CENTER_Y);
355 myPersonColorMode =
new FXComboBox(m102, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
356 mySettings->personColorer.fill(*myPersonColorMode);
357 myPersonColorMode->setNumVisible(10);
358 myPersonColorInterpolation =
new FXCheckButton(m102,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
360 myPersonColorSettingFrame =
361 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
363 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
366 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
367 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
368 myPersonNamePanel =
new NamePanel(m103,
this,
"Show person name", mySettings->personName);
370 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
373 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
374 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
375 myPersonSizePanel =
new SizePanel(m104,
this, mySettings->personSize);
380 new FXTabItem(tabbook,
"Containers", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
381 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
382 FXVerticalFrame* frame3 =
383 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
386 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
387 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
388 new FXLabel(m101,
"Show As", 0, LAYOUT_CENTER_Y);
389 myContainerShapeDetail =
new FXComboBox(m101, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
390 myContainerShapeDetail->appendItem(
"'triangles'");
391 myContainerShapeDetail->appendItem(
"'boxes'");
392 myContainerShapeDetail->appendItem(
"'simple shapes'");
393 myContainerShapeDetail->appendItem(
"'raster images'");
394 myContainerShapeDetail->setNumVisible(4);
395 myContainerShapeDetail->setCurrentItem(settings->containerQuality);
397 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
400 new FXMatrix(frame3, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
401 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
402 new FXLabel(m102,
"Color", 0, LAYOUT_CENTER_Y);
403 myContainerColorMode =
new FXComboBox(m102, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
404 mySettings->containerColorer.fill(*myContainerColorMode);
405 myContainerColorMode->setNumVisible(9);
406 myContainerColorInterpolation =
new FXCheckButton(m102,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
408 myContainerColorSettingFrame =
409 new FXVerticalFrame(frame3, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
411 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
414 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
415 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
416 myContainerNamePanel =
new NamePanel(m103,
this,
"Show container name", mySettings->containerName);
418 new FXHorizontalSeparator(frame3, SEPARATOR_GROOVE | LAYOUT_FILL_X);
421 new FXMatrix(frame3, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
422 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
423 myContainerSizePanel =
new SizePanel(m104,
this, mySettings->containerSize);
427 new FXTabItem(tabbook,
"Junctions", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
428 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
429 FXVerticalFrame* frame4 =
430 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
432 new FXMatrix(frame4, 3, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
433 0, 0, 0, 0, 10, 10, 10, 2, 5, 5);
434 new FXLabel(m41,
"Color", 0, LAYOUT_CENTER_Y);
435 myJunctionColorMode =
new FXComboBox(m41, 20,
this,
MID_SIMPLE_VIEW_COLORCHANGE, FRAME_SUNKEN | LAYOUT_LEFT | LAYOUT_TOP | COMBOBOX_STATIC);
436 mySettings->junctionColorer.fill(*myJunctionColorMode);
437 myJunctionColorMode->setNumVisible(3);
438 myJunctionColorInterpolation =
new FXCheckButton(m41,
"Interpolate",
this,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
440 myJunctionColorSettingFrame =
441 new FXVerticalFrame(frame4, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 2, 8, 5, 2);
443 new FXHorizontalSeparator(frame4, SEPARATOR_GROOVE | LAYOUT_FILL_X);
445 new FXMatrix(frame4, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
446 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
447 myTLIndexPanel =
new NamePanel(m42,
this,
"Show link tls index", mySettings->drawLinkTLIndex);
448 myJunctionIndexPanel =
new NamePanel(m42,
this,
"Show link junction index", mySettings->drawLinkJunctionIndex);
450 myShowLane2Lane->setCheck(mySettings->showLane2Lane);
451 new FXLabel(m42,
" ", 0, LAYOUT_CENTER_Y);
452 myJunctionNamePanel =
new NamePanel(m42,
this,
"Show junction name", mySettings->junctionName);
453 myInternalJunctionNamePanel =
new NamePanel(m42,
this,
"Show internal junction name", mySettings->internalJunctionName);
454 myInternalEdgeNamePanel =
new NamePanel(m42,
this,
"Show internal edge name", mySettings->internalEdgeName);
455 myCwaEdgeNamePanel =
new NamePanel(m42,
this,
"Show crossing and walkingarea name", mySettings->cwaEdgeName);
457 myDrawJunctionShape->setCheck(mySettings->drawJunctionShape);
459 myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas);
462 new FXTabItem(tabbook,
"Detectors/Trigger", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
463 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
464 FXVerticalFrame* frame5 =
465 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
468 new FXMatrix(frame5, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
469 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
470 myAddNamePanel =
new NamePanel(m51,
this,
"Show detector name", mySettings->addName);
471 new FXHorizontalSeparator(frame5 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
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 myAddSizePanel =
new SizePanel(m52,
this, mySettings->addSize);
487 new FXTabItem(tabbook,
"POIs", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
488 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
489 FXVerticalFrame* frame6 =
490 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
493 new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
494 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
495 myPOINamePanel =
new NamePanel(m61,
this,
"Show poi names", mySettings->poiName);
496 myPOITypePanel =
new NamePanel(m61,
this,
"Show poi types", mySettings->poiType);
497 new FXHorizontalSeparator(frame6 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
500 new FXMatrix(frame6, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
501 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
502 myPOISizePanel =
new SizePanel(m62,
this, mySettings->poiSize);
506 new FXTabItem(tabbook,
"Polygons", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
507 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
508 FXVerticalFrame* frame9 =
509 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
512 new FXMatrix(frame9, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
513 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
514 myPolyNamePanel =
new NamePanel(m91,
this,
"Show polygon names", mySettings->polyName);
515 myPolyTypePanel =
new NamePanel(m91,
this,
"Show polygon types", mySettings->polyType);
516 new FXHorizontalSeparator(frame9 , SEPARATOR_GROOVE | LAYOUT_FILL_X);
518 myPolySizePanel =
new SizePanel(m91,
this, mySettings->polySize);
522 new FXTabItem(tabbook,
"Legend", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
523 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
524 FXVerticalFrame* frame7 =
525 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
528 new FXMatrix(frame7, 2, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
529 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
531 myShowSizeLegend->setCheck(mySettings->showSizeLegend);
532 new FXLabel(m72,
"");
535 new FXTabItem(tabbook,
"openGL", NULL, TAB_LEFT_NORMAL, 0, 0, 0, 0, 4, 8, 4, 4);
536 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
537 FXVerticalFrame* frame8 =
538 new FXVerticalFrame(genScroll, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2);
541 new FXMatrix(frame8, 1, LAYOUT_FILL_X | LAYOUT_TOP | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
542 0, 0, 0, 0, 10, 10, 10, 10, 5, 5);
544 myAntialiase->setCheck(mySettings->antialiase);
546 myDither->setCheck(mySettings->dither);
548 FXHorizontalFrame* f2 =
new FXHorizontalFrame(contentFrame, LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 5, 5);
549 FXButton* initial =
new FXButton(f2,
"&OK", 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);
550 new FXButton(f2,
"&Cancel", 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);
553 rebuildColorMatrices(
false);
556 const FXint minSize = 400;
557 setX(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - minSize));
558 setY(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - minSize));
559 setWidth(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"width", 700), minSize));
560 setHeight(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"height", 500), minSize));
618 FXString dataS = (
char*) data;
621 for (
int i = 0; i <
mySchemeName->getNumItems() - 1; ++i) {
700 std::vector<FXColorWell*>::const_iterator colEnd,
701 std::vector<FXRealSpinDial*>::const_iterator threshIt,
702 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
703 std::vector<FXButton*>::const_iterator buttonIt,
706 while (colIt != colEnd) {
708 if (sender == *colIt) {
712 if (sender == *threshIt) {
713 const SUMOReal val = (*threshIt)->getValue();
717 (*threshIt)->getRange(lo, hi);
718 (*threshIt)->setRange(lo, val);
722 if (threshIt != threshEnd) {
723 (*threshIt)->getRange(lo, hi);
724 (*threshIt)->setRange(val, hi);
729 if (sender == *colIt) {
733 if (sender == *buttonIt) {
753 std::vector<FXRealSpinDial*>::const_iterator scaleEnd,
754 std::vector<FXRealSpinDial*>::const_iterator threshIt,
755 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
756 std::vector<FXButton*>::const_iterator buttonIt,
759 while (scaleIt != scaleEnd) {
761 if (sender == *scaleIt) {
762 scheme.
setColor(pos, (*scaleIt)->getValue());
765 if (sender == *threshIt) {
766 const SUMOReal val = (*threshIt)->getValue();
770 (*threshIt)->getRange(lo, hi);
771 (*threshIt)->setRange(lo, val);
775 if (threshIt != threshEnd) {
776 (*threshIt)->getRange(lo, hi);
777 (*threshIt)->setRange(val, hi);
782 if (sender == *scaleIt) {
783 scheme.
setColor(pos, (*scaleIt)->getValue());
786 if (sender == *buttonIt) {
788 scheme.
addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
813 bool doRebuildColorMatrices =
false;
888 doRebuildColorMatrices =
true;
892 doRebuildColorMatrices =
true;
895 doRebuildColorMatrices =
true;
902 doRebuildColorMatrices =
true;
906 doRebuildColorMatrices =
true;
909 doRebuildColorMatrices =
true;
916 doRebuildColorMatrices =
true;
920 doRebuildColorMatrices =
true;
923 doRebuildColorMatrices =
true;
930 doRebuildColorMatrices =
true;
934 doRebuildColorMatrices =
true;
937 doRebuildColorMatrices =
true;
944 doRebuildColorMatrices =
true;
948 doRebuildColorMatrices =
true;
951 doRebuildColorMatrices =
true;
958 doRebuildColorMatrices =
true;
962 doRebuildColorMatrices =
true;
965 doRebuildColorMatrices =
true;
995 if (doRebuildColorMatrices) {
999 getApp()->forceRefresh();
1008 if (settingsName !=
"") {
1009 FXint index =
mySchemeName->appendItem(settingsName.c_str());
1025 if (lookFrom.
z() > 0) {
1034 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1074 std::string name =
"";
1075 while (name.length() == 0) {
1076 FXDialogBox dialog(
this,
"Enter a name", DECOR_TITLE | DECOR_BORDER);
1077 FXVerticalFrame* content =
new FXVerticalFrame(&dialog, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 10, 10, 10, 10);
1078 new FXLabel(content,
"Please enter an alphanumeric name: ", NULL, LAYOUT_FILL_X | JUSTIFY_LEFT);
1079 FXTextField* text =
new FXTextField(content, 40, &dialog, FXDialogBox::ID_ACCEPT, TEXTFIELD_ENTER_ONLY | FRAME_SUNKEN | FRAME_THICK | LAYOUT_FILL_X);
1080 new FXHorizontalSeparator(content, SEPARATOR_GROOVE | LAYOUT_FILL_X);
1081 FXHorizontalFrame* buttons =
new FXHorizontalFrame(content, LAYOUT_FILL_X | PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 0, 0, 0, 0);
1082 new FXButton(buttons,
"&OK", NULL, &dialog, FXDialogBox::ID_ACCEPT, BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_RIGHT);
1083 new FXButton(buttons,
"&Cancel", NULL, &dialog, FXDialogBox::ID_CANCEL, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_RIGHT, 0, 0, 0, 0, 20, 20);
1086 if (!dialog.execute()) {
1089 name = text->getText().text();
1090 for (
size_t i = 0; i < name.length(); ++i) {
1091 if (name[i] !=
'_' && (name[i] <
'a' || name[i] >
'z') && (name[i] <
'A' || name[i] >
'Z') && (name[i] <
'0' || name[i] >
'9')) {
1099 tmpSettings.
name = name;
1113 sender->handle(
this,
1115 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1127 std::string name =
mySchemeName->getItem(index).text();
1138 sender->handle(
this,
1140 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1170 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
1178 sender->handle(
this,
1181 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1189 FXFileDialog opendialog(
this,
"Import view settings");
1191 opendialog.setSelectMode(SELECTFILE_ANY);
1192 opendialog.setPatternList(
"*.xml");
1196 if (opendialog.execute()) {
1206 FXFileDialog opendialog(
this,
"Load Decals");
1208 opendialog.setSelectMode(SELECTFILE_ANY);
1209 opendialog.setPatternList(
"*.xml");
1213 if (opendialog.execute()) {
1234 FXMessageBox::error(
myParent, MBOX_OK,
"Storing failed!",
"%s", e.what());
1244 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1262 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1264 for (k = 0; k < 7; k++) {
1265 header->setItemJustify(k, JUSTIFY_CENTER_X | JUSTIFY_TOP);
1266 header->setItemSize(k, 60);
1268 header->setItemSize(0, 150);
1271 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1284 for (k = 0; k < 7; k++) {
1292 std::vector<FXColorWell*>& colors,
1293 std::vector<FXRealSpinDial*>& thresholds,
1294 std::vector<FXButton*>& buttons,
1295 FXCheckButton* interpolation,
1298 FXMatrix* m =
new FXMatrix(frame, 3,
1299 LAYOUT_FILL_X | MATRIX_BY_COLUMNS,
1300 0, 0, 0, 0, 10, 10, 0, 0, 5, 3);
1304 const bool fixed = scheme.
isFixed();
1305 std::vector<RGBColor>::const_iterator colIt = scheme.
getColors().begin();
1306 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1307 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1308 FX::FXString buttonText =
"Add";
1309 while (colIt != scheme.
getColors().end()) {
1312 LAYOUT_FIX_WIDTH | LAYOUT_CENTER_Y | FRAME_SUNKEN | FRAME_THICK | ICON_AFTER_TEXT,
1313 0, 0, 100, 0, 0, 0, 0, 0));
1315 new FXLabel(m, nameIt->c_str());
1320 threshDialer->setValue(*threshIt);
1321 thresholds.push_back(threshDialer);
1322 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));
1323 buttonText =
"Remove";
1331 interpolation->disable();
1333 if (colors.size() > 1) {
1334 interpolation->enable();
1335 if (interpolation->getCheck() != FALSE) {
1336 thresholds.front()->enable();
1338 thresholds.front()->disable();
1341 interpolation->disable();
1342 thresholds.front()->disable();
1351 std::vector<FXRealSpinDial*>& scales,
1352 std::vector<FXRealSpinDial*>& thresholds,
1353 std::vector<FXButton*>& buttons,
1354 FXCheckButton* interpolation,
1357 FXMatrix* m =
new FXMatrix(frame, 3,
1358 LAYOUT_FILL_X | MATRIX_BY_COLUMNS,
1359 0, 0, 0, 0, 10, 10, 0, 0, 5, 3);
1363 const bool fixed = scheme.
isFixed();
1364 std::vector<SUMOReal>::const_iterator scaleIt = scheme.
getColors().begin();
1365 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1366 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1367 FX::FXString buttonText =
"Add";
1368 while (scaleIt != scheme.
getColors().end()) {
1370 scaleDialer->setValue(*scaleIt);
1371 scales.push_back(scaleDialer);
1373 new FXLabel(m, nameIt->c_str());
1378 threshDialer->setValue(*threshIt);
1379 thresholds.push_back(threshDialer);
1380 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));
1381 buttonText =
"Remove";
1389 interpolation->disable();
1391 if (scales.size() > 1) {
1392 interpolation->enable();
1393 if (interpolation->getCheck() != FALSE) {
1394 thresholds.front()->enable();
1396 thresholds.front()->disable();
1399 interpolation->disable();
1400 thresholds.front()->disable();
1412 LAYOUT_FILL_Y | LAYOUT_FIX_WIDTH, 0, 0, 470, 0);
1418 for (
int i = 1; i <= 5; ++i) {
1468 std::string value = i->
item->getText().text();
1470 if (value.find_first_not_of(
" ") == std::string::npos) {
1476 if (row == static_cast<int>(
myDecals->size())) {
1488 }
else if (row > static_cast<int>(
myDecals->size())) {
1492 d = (*myDecals)[row];
1506 std::string msg =
"The value must be a float, is:" + value;
1507 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1514 std::string msg =
"The value must be a float, is:" + value;
1515 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1522 std::string msg =
"The value must be a float, is:" + value;
1523 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1530 std::string msg =
"The value must be a float, is:" + value;
1531 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1538 std::string msg =
"The value must be a float, is:" + value;
1539 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1546 std::string msg =
"The value must be a float, is:" + value;
1547 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1553 (*myDecals)[row] = d;
1573 for (
int i = 0; i <
mySchemeName->getNumItems(); ++i) {
1585 const std::string& title,
1588 myCheck->setCheck(settings.
show);
1589 new FXLabel(parent,
"");
1590 FXMatrix* m1 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1591 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1592 new FXLabel(m1,
"Size", 0, LAYOUT_CENTER_Y);
1593 mySizeDial =
new FXRealSpinDial(m1, 10, target, MID_SIMPLE_VIEW_COLORCHANGE,
1594 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1595 mySizeDial->setRange(10, 1000);
1596 mySizeDial->setValue(settings.
size);
1597 FXMatrix* m2 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1598 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1599 new FXLabel(m2,
"Color", 0, LAYOUT_CENTER_Y);
1601 target, MID_SIMPLE_VIEW_COLORCHANGE,
1602 LAYOUT_FIX_WIDTH | LAYOUT_CENTER_Y | LAYOUT_SIDE_TOP | FRAME_SUNKEN | FRAME_THICK | ICON_AFTER_TEXT,
1603 0, 0, 100, 0, 0, 0, 0, 0);
1616 myCheck->setCheck(settings.
show);
1617 mySizeDial->setValue(settings.
size);
1626 myCheck =
new FXCheckButton(parent,
"Draw with constant size when zoomed out", target,
MID_SIMPLE_VIEW_COLORCHANGE, LAYOUT_CENTER_Y | CHECKBUTTON_NORMAL);
1628 new FXLabel(parent,
"");
1629 FXMatrix* m1 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1630 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1631 new FXLabel(m1,
"Minimum Size", 0, LAYOUT_CENTER_Y);
1633 LAYOUT_CENTER_Y | LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1634 myMinSizeDial->setValue(settings.
minSize);
1635 FXMatrix* m2 =
new FXMatrix(parent, 2, LAYOUT_FILL_X | LAYOUT_BOTTOM | LAYOUT_LEFT | MATRIX_BY_COLUMNS,
1636 0, 0, 0, 0, 10, 10, 0, 0, 5, 5);
1637 new FXLabel(m2,
"Exaggerate by", 0, LAYOUT_CENTER_Y);
1639 LAYOUT_TOP | FRAME_SUNKEN | FRAME_THICK);
1640 myExaggerateDial->setRange(0, 10000);
1648 myMinSizeDial->getValue(), myExaggerateDial->getValue(), myCheck->getCheck() != FALSE);
1655 myMinSizeDial->setValue(settings.
minSize);
1662 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"x", getX());
1663 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"y", getY());
1664 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"width", getWidth());
1665 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
GUIVisualizationTextSettings poiType
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
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)
NamePanel * myPolyTypePanel
GUIColorer edgeColorer
The mesoscopic edge colorer.
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.
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.
SUMOReal getDelay() const
Returns the parsed delay.
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)
FXCheckButton * myDrawCrossingsAndWalkingAreas
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.
GUIVisualizationTextSettings polyType
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)
GUIVisualizationTextSettings drawLinkTLIndex
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
GUIScaler edgeScaler
The mesoscopic edge scaler.
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.
NamePanel * myTLIndexPanel
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
NamePanel * myContainerNamePanel
MFXAddEditTypedTable * myDecalsTable
FXCheckButton * myDrawJunctionShape
float exaggeration
The size exaggeration (upscale)
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
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
SUMOReal getGridWidth() const
FXCheckButton * myShowRails
GUIVisualizationSizeSettings personSize
virtual bool setColorScheme(const std::string &)
int personQuality
The quality of person drawing.
bool showGrid
Information whether a grid shall be shown.
bool drawCrossingsAndWalkingareas
whether crosings and walkingareas shall be drawn
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.
NamePanel * myPOITypePanel
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.
void setDelay(SUMOReal delay)
Sets the delay of the parent application.
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.
NamePanel * myJunctionIndexPanel
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)
static bool UseMesoSim
this should be set at the same time as MSGlobals::gUseMesoSim
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
GUIVisualizationTextSettings drawLinkJunctionIndex
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