#include <config.h>
#ifdef HAVE_VERSION_H
#include <version.h>
#endif
#include <utils/common/MsgHandler.h>
#include <utils/common/StdDefs.h>
#include <utils/foxtools/MFXLinkLabel.h>
#include <utils/gui/images/GUIIconSubSys.h>
#include <utils/gui/div/GUIDesigns.h>
#include "GUIDialog_AboutSUMO.h"
GUIDialog_AboutSUMO::GUIDialog_AboutSUMO(FXWindow* parent) :
FXDialogBox(parent, TL("About Eclipse SUMO sumo-gui"), GUIDesignDialogBox) {
setIcon(GUIIconSubSys::getIcon(GUIIcon::SUMO_MINI));
FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
(new FXLabel(descriptionFrame, "SUMO sumo-gui " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo))->setFont(myHeadlineFont);
new FXLabel(descriptionFrame, "Eclipse SUMO - Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
new FXLabel(descriptionFrame, TL("Graphical user interface for the microscopic, multi-modal traffic simulation SUMO."), nullptr, GUIDesignLabelAboutInfo);
#ifdef JPS_VERSION
new FXLabel(descriptionFrame, TLF("Includes JuPedSim %.%.%", int(JPS_VERSION / 100), int(JPS_VERSION % 100 / 10), JPS_VERSION % 10).c_str(), nullptr, GUIDesignLabelAboutInfo);
#endif
new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
new FXLabel(descriptionFrame, std::string("SUMO_HOME: " + std::string(getenv("SUMO_HOME") ? getenv("SUMO_HOME") : "not set")).c_str(), nullptr, GUIDesignLabelAboutInfo);
new FXLabel(this, "Copyright (C) 2001-2026 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
new FXLabel(this, TL("This application is based on code provided by the Eclipse SUMO project."), nullptr, GUIDesignLabelAboutInfo);
new FXLabel(this, TL("These core components are available under the conditions of the Eclipse Public License v2."), nullptr, GUIDesignLabelAboutInfo);
(new MFXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
(new MFXLinkLabel(this, "https://eclipse.dev/sumo", nullptr, GUIDesignLabel(JUSTIFY_NORMAL)))->setTipText("https://eclipse.dev/sumo");
FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
GUIDesigns::buildFXButton(buttonFrame, TL("OK"), "", "", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), this, ID_ACCEPT, GUIDesignButtonDialog);
new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
}
void
GUIDialog_AboutSUMO::create() {
FXDialogBox::create();
}
GUIDialog_AboutSUMO::~GUIDialog_AboutSUMO() {
delete myHeadlineFont;
}