53 #ifdef CHECK_MEMORY_LEAKS 55 #endif // CHECK_MEMORY_LEAKS 84 FXIMPLEMENT(
GUIDialog_ViewSettings, FXDialogBox, GUIDialog_ViewSettingsMap, ARRAYNUMBER(GUIDialog_ViewSettingsMap))
92 myParent(parent), mySettings(settings),
93 myDecals(decals), myDecalsLock(decalsLock),
95 myBackup = (*mySettings);
103 for (std::vector<std::string>::const_iterator i = names.begin(); i != names.end(); ++i) {
104 int index = mySchemeName->appendItem((*i).c_str());
105 if ((*i) == mySettings->name) {
106 mySchemeName->setCurrentItem((FXint) index);
109 mySchemeName->setNumVisible(5);
116 new FXVerticalSeparator(frame0);
118 mySaveViewPort =
new FXCheckButton(frame0,
"Viewport");
119 mySaveDelay =
new FXCheckButton(frame0,
"Delay");
120 mySaveDecals =
new FXCheckButton(frame0,
"Decals");
128 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
138 new FXLabel(frame11,
"Decals:");
139 myDecalsFrame =
new FXVerticalFrame(frame11);
148 myShowGrid->setCheck(mySettings->showGrid);
149 new FXLabel(m12,
"");
153 myGridXSizeDialer->setRange(1, 10000);
154 myGridXSizeDialer->setValue(mySettings->gridXSize);
158 myGridYSizeDialer->setRange(1, 10000);
159 myGridYSizeDialer->setValue(mySettings->gridXSize);
164 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
184 mySettings->edgeColorer.fill(*myLaneEdgeColorMode);
185 mySettings->edgeScaler.fill(*myLaneEdgeScaleMode);
186 myLaneEdgeColorMode->setNumVisible((
int)mySettings->edgeColorer.size());
187 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->edgeScaler.size());
189 mySettings->laneColorer.fill(*myLaneEdgeColorMode);
190 mySettings->laneScaler.fill(*myLaneEdgeScaleMode);
191 myLaneEdgeColorMode->setNumVisible((
int)mySettings->laneColorer.size());
192 myLaneEdgeScaleMode->setNumVisible((
int)mySettings->laneScaler.size());
198 myShowLaneBorders->setCheck(mySettings->laneShowBorders);
201 myShowLaneDecals->setCheck(mySettings->showLinkDecals);
204 myShowLinkRules->setCheck(mySettings->showLinkRules);
207 myShowRails->setCheck(mySettings->showRails);
210 myHideMacroConnectors->setCheck(mySettings->hideConnectors);
213 myShowLaneDirection->setCheck(mySettings->showLaneDirection);
216 myShowSublanes->setCheck(mySettings->showSublanes);
220 myLaneWidthUpscaleDialer->setRange(0, 10000);
221 myLaneWidthUpscaleDialer->setValue(mySettings->laneWidthExaggeration);
225 myLaneMinWidthDialer->setRange(0, 10000);
226 myLaneMinWidthDialer->setValue(mySettings->laneMinSize);
229 myEdgeNamePanel =
new NamePanel(m22,
this,
"Show edge name", mySettings->edgeName);
230 myStreetNamePanel =
new NamePanel(m22,
this,
"Show street name", mySettings->streetName);
235 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
241 myVehicleShapeDetail->appendItem(
"'triangles'");
242 myVehicleShapeDetail->appendItem(
"'boxes'");
243 myVehicleShapeDetail->appendItem(
"'simple shapes'");
244 myVehicleShapeDetail->appendItem(
"'raster images'");
245 myVehicleShapeDetail->setNumVisible(4);
246 myVehicleShapeDetail->setCurrentItem(settings->vehicleQuality);
253 mySettings->vehicleColorer.fill(*myVehicleColorMode);
254 myVehicleColorMode->setNumVisible((
int)mySettings->vehicleColorer.size());
263 myShowBlinker->setCheck(mySettings->showBlinker);
266 myShowMinGap->setCheck(mySettings->drawMinGap);
269 myShowBTRange->setCheck(mySettings->showBTRange);
276 myVehicleNamePanel =
new NamePanel(m33,
this,
"Show vehicle name", mySettings->vehicleName);
287 myVehicleSizePanel =
new SizePanel(m34,
this, mySettings->vehicleSize);
292 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
298 myPersonShapeDetail->appendItem(
"'triangles'");
299 myPersonShapeDetail->appendItem(
"'boxes'");
300 myPersonShapeDetail->appendItem(
"'simple shapes'");
301 myPersonShapeDetail->appendItem(
"'raster images'");
302 myPersonShapeDetail->setNumVisible(4);
303 myPersonShapeDetail->setCurrentItem(settings->personQuality);
310 mySettings->personColorer.fill(*myPersonColorMode);
311 myPersonColorMode->setNumVisible(10);
319 myPersonNamePanel =
new NamePanel(m103,
this,
"Show person name", mySettings->personName);
324 myPersonSizePanel =
new SizePanel(m104,
this, mySettings->personSize);
329 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
335 myContainerShapeDetail->appendItem(
"'triangles'");
336 myContainerShapeDetail->appendItem(
"'boxes'");
337 myContainerShapeDetail->appendItem(
"'simple shapes'");
338 myContainerShapeDetail->appendItem(
"'raster images'");
339 myContainerShapeDetail->setNumVisible(4);
340 myContainerShapeDetail->setCurrentItem(settings->containerQuality);
347 mySettings->containerColorer.fill(*myContainerColorMode);
348 myContainerColorMode->setNumVisible(9);
356 myContainerNamePanel =
new NamePanel(m103,
this,
"Show container name", mySettings->containerName);
361 myContainerSizePanel =
new SizePanel(m104,
this, mySettings->containerSize);
366 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
371 mySettings->junctionColorer.fill(*myJunctionColorMode);
372 myJunctionColorMode->setNumVisible(3);
379 myTLIndexPanel =
new NamePanel(m42,
this,
"Show link tls index", mySettings->drawLinkTLIndex);
380 myJunctionIndexPanel =
new NamePanel(m42,
this,
"Show link junction index", mySettings->drawLinkJunctionIndex);
382 myShowLane2Lane->setCheck(mySettings->showLane2Lane);
384 myJunctionNamePanel =
new NamePanel(m42,
this,
"Show junction name", mySettings->junctionName);
385 myInternalJunctionNamePanel =
new NamePanel(m42,
this,
"Show internal junction name", mySettings->internalJunctionName);
386 myInternalEdgeNamePanel =
new NamePanel(m42,
this,
"Show internal edge name", mySettings->internalEdgeName);
387 myCwaEdgeNamePanel =
new NamePanel(m42,
this,
"Show crossing and walkingarea name", mySettings->cwaEdgeName);
389 myDrawJunctionShape->setCheck(mySettings->drawJunctionShape);
391 myDrawCrossingsAndWalkingAreas->setCheck(mySettings->drawCrossingsAndWalkingareas);
396 myJunctionSizePanel =
new SizePanel(m43,
this, mySettings->junctionSize);
401 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
405 myAddNamePanel =
new NamePanel(m51,
this,
"Show detector name", mySettings->addName);
409 myAddSizePanel =
new SizePanel(m52,
this, mySettings->addSize);
419 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
423 myPOINamePanel =
new NamePanel(m61,
this,
"Show poi names", mySettings->poiName);
424 myPOITypePanel =
new NamePanel(m61,
this,
"Show poi types", mySettings->poiType);
428 myPOISizePanel =
new SizePanel(m62,
this, mySettings->poiSize);
434 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
438 myPolyNamePanel =
new NamePanel(m91,
this,
"Show polygon names", mySettings->polyName);
439 myPolyTypePanel =
new NamePanel(m91,
this,
"Show polygon types", mySettings->polyType);
442 myPolySizePanel =
new SizePanel(m91,
this, mySettings->polySize);
447 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
452 myShowSizeLegend->setCheck(mySettings->showSizeLegend);
453 new FXLabel(m72,
"");
458 FXScrollWindow* genScroll =
new FXScrollWindow(tabbook);
463 myAntialiase->setCheck(mySettings->antialiase);
465 myDither->setCheck(mySettings->dither);
472 rebuildColorMatrices(
false);
475 const FXint minSize = 400;
476 setX(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"x", 150), getApp()->getRootWindow()->getWidth() - minSize));
477 setY(
MIN2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"y", 150), getApp()->getRootWindow()->getHeight() - minSize));
478 setWidth(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"width", 700), minSize));
479 setHeight(
MAX2(getApp()->reg().readIntEntry(
"VIEWSETTINGS",
"height", 500), minSize));
538 FXString dataS = (
char*) data;
541 for (
int i = 0; i <
mySchemeName->getNumItems() - 1; ++i) {
625 std::vector<FXColorWell*>::const_iterator colEnd,
626 std::vector<FXRealSpinDial*>::const_iterator threshIt,
627 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
628 std::vector<FXButton*>::const_iterator buttonIt,
631 while (colIt != colEnd) {
633 if (sender == *colIt) {
637 if (sender == *threshIt) {
638 const SUMOReal val = (*threshIt)->getValue();
642 (*threshIt)->getRange(lo, hi);
643 (*threshIt)->setRange(lo, val);
647 if (threshIt != threshEnd) {
648 (*threshIt)->getRange(lo, hi);
649 (*threshIt)->setRange(val, hi);
654 if (sender == *colIt) {
658 if (sender == *buttonIt) {
678 std::vector<FXRealSpinDial*>::const_iterator scaleEnd,
679 std::vector<FXRealSpinDial*>::const_iterator threshIt,
680 std::vector<FXRealSpinDial*>::const_iterator threshEnd,
681 std::vector<FXButton*>::const_iterator buttonIt,
684 while (scaleIt != scaleEnd) {
686 if (sender == *scaleIt) {
687 scheme.
setColor(pos, (*scaleIt)->getValue());
690 if (sender == *threshIt) {
691 const SUMOReal val = (*threshIt)->getValue();
695 (*threshIt)->getRange(lo, hi);
696 (*threshIt)->setRange(lo, val);
700 if (threshIt != threshEnd) {
701 (*threshIt)->getRange(lo, hi);
702 (*threshIt)->setRange(val, hi);
707 if (sender == *scaleIt) {
708 scheme.
setColor(pos, (*scaleIt)->getValue());
711 if (sender == *buttonIt) {
713 scheme.
addColor((*scaleIt)->getValue(), (*threshIt)->getValue());
738 bool doRebuildColorMatrices =
false;
818 doRebuildColorMatrices =
true;
822 doRebuildColorMatrices =
true;
825 doRebuildColorMatrices =
true;
832 doRebuildColorMatrices =
true;
836 doRebuildColorMatrices =
true;
839 doRebuildColorMatrices =
true;
846 doRebuildColorMatrices =
true;
850 doRebuildColorMatrices =
true;
853 doRebuildColorMatrices =
true;
860 doRebuildColorMatrices =
true;
864 doRebuildColorMatrices =
true;
867 doRebuildColorMatrices =
true;
874 doRebuildColorMatrices =
true;
878 doRebuildColorMatrices =
true;
881 doRebuildColorMatrices =
true;
888 doRebuildColorMatrices =
true;
892 doRebuildColorMatrices =
true;
895 doRebuildColorMatrices =
true;
925 if (doRebuildColorMatrices) {
929 getApp()->forceRefresh();
938 if (settingsName !=
"") {
939 FXint index =
mySchemeName->appendItem(settingsName.c_str());
960 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1001 std::string name =
"";
1002 while (name.length() == 0) {
1013 if (!dialog.execute()) {
1016 name = text->getText().text();
1017 for (
int i = 0; i < (int)name.length(); ++i) {
1018 if (name[i] !=
'_' && (name[i] <
'a' || name[i] >
'z') && (name[i] <
'A' || name[i] >
'Z') && (name[i] <
'0' || name[i] >
'9')) {
1026 tmpSettings.
name = name;
1040 sender->handle(
this,
1042 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1054 std::string name =
mySchemeName->getItem(index).text();
1065 sender->handle(
this,
1067 ? FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1097 FXMessageBox::error(
this, MBOX_OK,
"Storing failed!",
"%s", e.what());
1105 sender->handle(
this,
1108 FXSEL(SEL_COMMAND, ID_DISABLE) : FXSEL(SEL_COMMAND, ID_ENABLE),
1116 FXFileDialog opendialog(
this,
"Import view settings");
1118 opendialog.setSelectMode(SELECTFILE_ANY);
1119 opendialog.setPatternList(
"*.xml");
1123 if (opendialog.execute()) {
1133 FXFileDialog opendialog(
this,
"Load Decals");
1135 opendialog.setSelectMode(SELECTFILE_ANY);
1136 opendialog.setPatternList(
"*.xml");
1140 if (opendialog.execute()) {
1161 FXMessageBox::error(
myParent, MBOX_OK,
"Storing failed!",
"%s", e.what());
1171 sender->handle(
this, FXSEL(SEL_COMMAND, ID_ENABLE), ptr);
1181 const int numRows =
MAX2((
int)10, (
int)
myDecals->size() + 1);
1192 header->setHeight(getApp()->getNormalFont()->getFontHeight() + getApp()->getNormalFont()->getFontAscent());
1194 for (k = 0; k < cols; k++) {
1196 header->setItemSize(k, 60);
1198 header->setItemSize(0, 150);
1201 std::vector<GUISUMOAbstractView::Decal>::iterator j;
1215 for (k = 0; k < 7; k++) {
1223 std::vector<FXColorWell*>& colors,
1224 std::vector<FXRealSpinDial*>& thresholds,
1225 std::vector<FXButton*>& buttons,
1226 FXCheckButton* interpolation,
1233 const bool fixed = scheme.
isFixed();
1234 std::vector<RGBColor>::const_iterator colIt = scheme.
getColors().begin();
1235 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1236 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1237 FX::FXString buttonText =
"Add";
1238 while (colIt != scheme.
getColors().end()) {
1241 new FXLabel(m, nameIt->c_str());
1246 threshDialer->setValue(*threshIt);
1247 thresholds.push_back(threshDialer);
1249 buttonText =
"Remove";
1257 interpolation->disable();
1259 if (colors.size() > 1) {
1260 interpolation->enable();
1261 if (interpolation->getCheck() != FALSE) {
1262 thresholds.front()->enable();
1264 thresholds.front()->disable();
1267 interpolation->disable();
1268 thresholds.front()->disable();
1277 std::vector<FXRealSpinDial*>& scales,
1278 std::vector<FXRealSpinDial*>& thresholds,
1279 std::vector<FXButton*>& buttons,
1280 FXCheckButton* interpolation,
1287 const bool fixed = scheme.
isFixed();
1288 std::vector<SUMOReal>::const_iterator scaleIt = scheme.
getColors().begin();
1289 std::vector<SUMOReal>::const_iterator threshIt = scheme.
getThresholds().begin();
1290 std::vector<std::string>::const_iterator nameIt = scheme.
getNames().begin();
1291 FX::FXString buttonText =
"Add";
1292 while (scaleIt != scheme.
getColors().end()) {
1294 scaleDialer->setValue(*scaleIt);
1295 scales.push_back(scaleDialer);
1297 new FXLabel(m, nameIt->c_str());
1302 threshDialer->setValue(*threshIt);
1303 thresholds.push_back(threshDialer);
1305 buttonText =
"Remove";
1313 interpolation->disable();
1315 if (scales.size() > 1) {
1316 interpolation->enable();
1317 if (interpolation->getCheck() != FALSE) {
1318 thresholds.front()->enable();
1320 thresholds.front()->disable();
1323 interpolation->disable();
1324 thresholds.front()->disable();
1341 for (
int i = 1; i <= 5; ++i) {
1391 std::string value = i->
item->getText().text();
1393 if (value.find_first_not_of(
" ") == std::string::npos) {
1399 if (row == static_cast<int>(
myDecals->size())) {
1412 }
else if (row > static_cast<int>(
myDecals->size())) {
1416 d = (*myDecals)[row];
1430 std::string msg =
"The value must be a float, is:" + value;
1431 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1438 std::string msg =
"The value must be a float, is:" + value;
1439 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1446 std::string msg =
"The value must be a float, is:" + value;
1447 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1454 std::string msg =
"The value must be a float, is:" + value;
1455 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1462 std::string msg =
"The value must be a float, is:" + value;
1463 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1470 std::string msg =
"The value must be a float, is:" + value;
1471 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1478 std::string msg =
"The value must be a bool, is:" + value;
1479 FXMessageBox::error(
this, MBOX_OK,
"Number format error",
"%s", msg.c_str());
1485 (*myDecals)[row] = d;
1505 for (
int i = 0; i <
mySchemeName->getNumItems(); ++i) {
1517 const std::string& title,
1520 myCheck->setCheck(settings.
show);
1521 new FXLabel(parent,
"");
1525 mySizeDial->setRange(10, 1000);
1526 mySizeDial->setValue(settings.
size);
1541 myCheck->setCheck(settings.
show);
1542 mySizeDial->setValue(settings.
size);
1553 new FXLabel(parent,
"");
1557 myMinSizeDial->setValue(settings.
minSize);
1561 myExaggerateDial->setRange(0, 10000);
1569 myMinSizeDial->getValue(), myExaggerateDial->getValue(), myCheck->getCheck() != FALSE);
1576 myMinSizeDial->setValue(settings.
minSize);
1583 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"x", getX());
1584 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"y", getY());
1585 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"width", getWidth());
1586 getApp()->reg().writeIntEntry(
"VIEWSETTINGS",
"height", getHeight());
void rebuildColorMatrices(bool doCreate=false)
Rebuilds color changing dialogs after choosing another coloring scheme.
GUIVisualizationSizeSettings junctionSize
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.
int getNumInitialSettings() const
Returns the number of initial settings.
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
#define GUIDesignViewSettingsMatrix5
Cancel-button was pushed.
GUIVisualizationTextSettings poiType
FXVerticalFrame * myLaneScaleSettingFrame
FXCheckButton * myShowBTRange
GUIVisualizationTextSettings streetName
#define GUIDesignViewSettingsMatrix3
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.
Informs the dialog about switching to another scheme.
For the export-to-file - button.
bool showBlinker
Information whether vehicle blinkers shall be drawn.
GUIVisualizationTextSettings addName
FXComboBox * myVehicleColorMode
GUIVisualizationTextSettings personName
#define GUIDesignViewSettingsButton5
void setThreshold(const int pos, const SUMOReal threshold)
std::vector< FXButton * > myLaneButtons
static SUMOReal _2SUMOReal(const E *const data)
converts a char-type array into the SUMOReal value described by it
SizePanel * myPOISizePanel
FXDEFMAP(GUIDialog_ViewSettings) GUIDialog_ViewSettingsMap[]
#define GUIDesignViewSettingsColorWell2
GUIVisualizationTextSettings poiName
static bool _2bool(const E *const data)
converts a 0-terminated char-type array into the boolean value described by it
FXCheckButton * myShowLinkRules
#define GUIDesignViewSettingsMFXTableJustify
GUIColorScheme & getLaneEdgeScheme()
Returns the current lane (edge) coloring schme.
bool showBTRange
Information whether the communication range shall be drawn.
#define GUIDesignButtonToolbar
little button with icon placed in navigation toolbar
GUIColorer laneColorer
The lane colorer.
SUMOReal laneWidthExaggeration
The lane exaggeration (upscale thickness)
GUIColorer containerColorer
The container colorer.
Stores the information about how to visualize structures.
The dialog to change the view (gui) settings.
SUMOReal minSize
The minimum size to draw this object.
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 *)
remove viewport
std::vector< FXRealSpinDial * > myLaneScaleThresholds
#define GUIDesignViewSettingsVerticalFrame4
std::vector< GUISUMOAbstractView::Decal > * myDecals
The parent's decals.
NamePanel * myPOINamePanel
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
FXCheckButton * myShowSublanes
bool screenRelative
Whether this image should be skipped in 2D-views.
void loadSettings(const std::string &file)
Loads a scheme from a file.
#define GUIDesignViewSettingsVerticalFrame5
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.
bool showLaneDirection
Whether to show direction indicators for lanes.
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
get grid Height
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)
SizePanel * myJunctionSizePanel
#define GUIDesignViewSettingsTextField1
textFields
bool showLinkRules
Information whether link rules (colored bars) shall be drawn.
long onCmdEditTable(FXObject *, FXSelector, void *data)
Called if the decals-table was changed.
FXCheckButton * mySaveDelay
#define GUIDesignViewSettingsSpinDial1
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.
#define GUIDesignMatrixViewSettings
FXMatrix used to pack values in Viewsettings.
long onCmdNameChange(FXObject *, FXSelector, void *)
Called if the name of the scheme was changed.
SizePanel * myPolySizePanel
void setActive(int scheme)
#define GUIDesignViewSettingsVerticalFrame1
vertical frames
#define GUIDesignViewSettingsMatrix2
GUIVisualizationSizeSettings polySize
GUIColorer vehicleColorer
The vehicle colorer.
SUMOReal getDelay() const
Returns the parsed delay.
FXCheckButton * myShowLaneDirection
#define GUIDesignViewSettingsButton2
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.
For the load-decals - button.
#define GUIDesignViewSettingsVerticalFrame2
void setNumberCellParams(int pos, double min, double max, double steps1, double steps2, double steps3, const std::string &format)
NamePanel * myInternalEdgeNamePanel
FXCheckButton * myShowMinGap
NamePanel * myEdgeNamePanel
void setCellType(int pos, CellType t)
FXCheckButton * myShowGrid
int addColor(const T &color, const SUMOReal threshold, const std::string &name="")
std::string name
The name of this setting.
#define GUIDesignHorizontalSeparator
#define GUIDesignViewSettingsButton3
void setCurrentScheme(const std::string &)
Sets the named scheme as the current.
FXCheckButton * myShowLane2Lane
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
void rebuildList()
Rebuilds the decals table.
#define GUIDesignViewSettingsHorizontalFrame2
void update(const GUIVisualizationSizeSettings &settings)
void applyViewport(GUISUMOAbstractView *view) const
Sets the viewport which has been parsed.
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
#define GUIDesignViewSettingsLabel2
NamePanel * myStreetNamePanel
#define GUIDesignCheckButton
CheckButton for Frames extended over the frame.
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
int getLaneEdgeMode() const
Returns the number of the active lane (edge) coloring schme.
std::vector< FXColorWell * > myVehicleColors
#define GUIDesignViewSettingsMatrix4
bool contains(const std::string &name) const
Returns the information whether a setting with the given name is stored.
FXRealSpinDial * myLaneWidthUpscaleDialer
void remove(const std::string &name)
Removes the setting with the given name.
#define GUIDesignViewSettingsMatrix1
Matrix.
GUIVisualizationTextSettings polyType
bool showSublanes
Whether to show sublane boundaries.
void saveWindowSize()
save window position and size to the registry
#define GUIDesignViewSettingsColorWell1
Color wells.
FXCheckButton * myShowSizeLegend
GUIVisualizationSettings & get(const std::string &name)
Returns the named scheme.
bool allowsNegativeValues() const
FXCheckButton * mySaveDecals
FXVerticalFrame * myLaneColorSettingFrame
FXComboBox & getColoringSchemesCombo()
get coloring schemes combo
FXRealSpinDial * myLaneMinWidthDialer
SUMOReal exaggeration
The size exaggeration (upscale)
bool initialised
Whether this image was initialised (inserted as a texture)
GUIVisualizationTextSettings drawLinkTLIndex
#define GUIDesignViewSettingsColorWell
ColorWell.
GUIColorer personColorer
The person colorer.
int getLaneEdgeScaleMode() const
Returns the number of the active lane (edge) scaling schme.
GUIVisualizationTextSettings internalJunctionName
#define GUIDesignComboBoxStatic
Combo box static (not editable)
const std::vector< std::string > & getNames() const
GUIColorer junctionColorer
The junction colorer.
std::string getCurrentScheme() const
Returns the name of the currently chosen scheme.
#define GUIDesignViewSettingsButton4
std::string filename
The path to the file the image is located at.
For the save-to-db - button.
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
FXCheckButton * myLaneScaleInterpolation
GUIScaler edgeScaler
The mesoscopic edge scaler.
SUMOReal getDelay() const
Returns the delay of the parent application.
FXCheckButton * myShowLaneBorders
SizePanel * myAddSizePanel
NamePanel * myAddNamePanel
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.
long onCmdOk(FXObject *, FXSelector, void *)
Called if the OK-button was pressed.
NamePanel * myCwaEdgeNamePanel
#define GUIDesignViewSettingsDialog
void setColor(const int pos, const T &color)
For the save-decals - button.
virtual bool setColorScheme(const std::string &)
set color scheme
void unlock()
release mutex lock
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)
#define GUIDesignViewSettingsHorizontalFrame1
Horizontal frames.
SUMOReal centerX
The center of the image in x-direction (net coordinates, in m)
NamePanel * myVehicleNamePanel
NamePanel * myContainerNamePanel
MFXAddEditTypedTable * myDecalsTable
FXCheckButton * myDrawJunctionShape
bool showLinkDecals
Information whether link textures (arrows) shall be drawn.
#define GUIDesignViewSettingsTabBook1
Tab books.
#define GUIDesignViewSettingsComboBox1
Combo boxs.
NamePanel(FXMatrix *parent, GUIDialog_ViewSettings *target, const std::string &title, const GUIVisualizationTextSettings &settings)
GUIVisualizationSizeSettings containerSize
FXComboBox * myLaneEdgeScaleMode
... lane scaler
void removeColor(const int pos)
static OutputDevice & getDevice(const std::string &name)
Returns the described OutputDevice.
GUIVisualizationTextSettings getSettings()
FXComboBox * myPersonShapeDetail
NamePanel * myJunctionNamePanel
void writeSettings(FXApp *app)
Writes the current scheme into the registry.
#define GUIDesignViewSettingsHorizontalFrame3
FXComboBox * myLaneEdgeColorMode
... lane colorer
void setCurrent(GUIVisualizationSettings *settings)
Sets current settings (called if reopened)
FXCheckButton * myHideMacroConnectors
#define GUIDesignViewSettingsTabItemBook1
SUMOReal getGridWidth() const
get grid width
FXCheckButton * myShowRails
GUIVisualizationSizeSettings personSize
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.
#define GUIDesignViewSettingsVerticalFrame3
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.
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
#define GUIDesignViewSettingsVerticalFrame6
#define GUIDesignViewSettingsButton1
Buttons.
#define GUIDesignSpinDial
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
SUMOReal laneMinSize
The minimum visual lane width for drawing.
std::vector< FXRealSpinDial * > myJunctionThresholds
FXCheckButton * myContainerColorInterpolation
GUIScaler laneScaler
The lane scaler.
#define GUIDesignViewSettingsSpinDial2
For the import-from-file - button.
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)
returns a icon previously defined in the enum GUIIcon
std::vector< FXButton * > myJunctionButtons
GUIVisualizationTextSettings drawLinkJunctionIndex
#define GUIDesignViewSettingsMFXTable
MFX Add/Edit Typed Table.
NamePanel * myPersonNamePanel
GUIVisualizationSettings myBackup
A backup of the settings (used if the "Cancel" button is pressed)
std::vector< FXColorWell * > myLaneColors
OutputDevice & openTag(const std::string &xmlElement)
Opens an XML tag.
FXComboBox * mySchemeName
std::vector< FXRealSpinDial * > myLaneThresholds
Informs the dialog about a value's change.
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
long onUpdImportSetting(FXObject *, FXSelector, void *data)
Called when updating the button that allows to read settings from a file.
GUIVisualizationTextSettings polyName
GUIVisualizationTextSettings containerName
#define GUIDesignViewSettingsLabel1
Label.
#define GUIDesignViewSettingsMainDialog
dialog
FXCheckButton * myShowLaneDecals