Eclipse SUMO - Simulation of Urban MObility
GUIDialog_AboutSUMO.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2022 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The application's "About" - dialog
20 /****************************************************************************/
21 #include <config.h>
22 
23 #ifdef HAVE_VERSION_H
24 #include <version.h>
25 #endif
26 
27 #include "GUIDialog_AboutSUMO.h"
29 #include <utils/common/StdDefs.h>
32 
33 // ===========================================================================
34 // method definitions
35 // ===========================================================================
37  FXDialogBox(parent, "About Eclipse SUMO sumo-gui", GUIDesignDialogBox) {
38  // set dialog icon
40 
41  // create frame for main info
42  FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
43 
44  // SUMO Icon
45  new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(GUIIcon::SUMO_LOGO), GUIDesignLabelIcon);
46 
47  // "SUMO <VERSION>"
48  FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
49  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
50  (new FXLabel(descriptionFrame, "SUMO sumo-gui " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo))->setFont(myHeadlineFont);
51  new FXLabel(descriptionFrame, "Eclipse SUMO - Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
52  new FXLabel(descriptionFrame, "Graphical user interface for the microscopic, multi-modal traffic simulation SUMO.", nullptr, GUIDesignLabelAboutInfo);
53  new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
54 
55  // copyright notice
56  new FXLabel(this, "Copyright (C) 2001-2022 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
57  new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo);
58  new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo);
59  (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
60 
61  // link to homepage
62  (new FXLinkLabel(this, "https://www.eclipse.org/sumo", nullptr, GUIDesignLabelCenter))->setTipText("https://www.eclipse.org/sumo");
63 
64  // centered ok-button
65  FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
66  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
67  new FXButton(buttonFrame, "OK\t\t", GUIIconSubSys::getIcon(GUIIcon::ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
68  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
69 }
70 
71 
72 void
74  FXDialogBox::create();
75 }
76 
77 
79  delete myHeadlineFont;
80 }
81 
82 
83 /****************************************************************************/
#define GUIDesignLabelIcon
design for label with icon
Definition: GUIDesigns.h:235
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center
Definition: GUIDesigns.h:199
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to left
Definition: GUIDesigns.h:223
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:343
#define GUIDesignDialogBox
Definition: GUIDesigns.h:527
#define GUIDesignButtonOK
Definition: GUIDesigns.h:124
#define GUIDesignHorizontalFrame
Definition: GUIDesigns.h:293
~GUIDialog_AboutSUMO()
Destructor.
GUIDialog_AboutSUMO(FXWindow *parent)
Constructor.
FXFont * myHeadlineFont
Font for the widget.
void create()
Creates the widget.
static FXIcon * getIcon(const GUIIcon which)
returns a icon previously defined in the enum GUIIcon