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-2019 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
15 // The application's "About" - dialog
16 /****************************************************************************/
17 
18 
19 // ===========================================================================
20 // included modules
21 // ===========================================================================
22 #include <config.h>
23 
24 #ifdef HAVE_VERSION_H
25 #include <version.h>
26 #endif
27 
28 #include "GUIDialog_AboutSUMO.h"
30 #include <utils/common/StdDefs.h>
33 
34 // ===========================================================================
35 // method definitions
36 // ===========================================================================
38  FXDialogBox(parent, "About Eclipse SUMO", GUIDesignDialogBox) {
39  // set dialog icon
41 
42  // create frame for main info
43  FXHorizontalFrame* mainInfoFrame = new FXHorizontalFrame(this, GUIDesignAuxiliarHorizontalFrame);
44 
45  // SUMO Icon
46  new FXLabel(mainInfoFrame, "", GUIIconSubSys::getIcon(ICON_SUMO_LOGO), GUIDesignLabelIcon);
47 
48  // "SUMO <VERSION>"
49  FXVerticalFrame* descriptionFrame = new FXVerticalFrame(mainInfoFrame, GUIDesignLabelAboutInfo);
50  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
51  (new FXLabel(descriptionFrame, "SUMO GUI " VERSION_STRING, nullptr, GUIDesignLabelAboutInfo))->setFont(myHeadlineFont);
52  new FXLabel(descriptionFrame, "Eclipse SUMO - Simulation of Urban MObility", nullptr, GUIDesignLabelAboutInfo);
53  new FXLabel(descriptionFrame, "Graphical user interface for the microscopic, multi-modal traffic simulation SUMO.", nullptr, GUIDesignLabelAboutInfo);
54  new FXLabel(descriptionFrame, HAVE_ENABLED, nullptr, GUIDesignLabelAboutInfo);
55 
56  // copyright notice
57  new FXLabel(this, "Copyright (C) 2001-2019 German Aerospace Center (DLR) and others.", nullptr, GUIDesignLabelAboutInfo);
58  new FXLabel(this, "This application is based on code provided by the Eclipse SUMO project.", nullptr, GUIDesignLabelAboutInfo);
59  new FXLabel(this, "These core components are available under the conditions of the Eclipse Public License v2.", nullptr, GUIDesignLabelAboutInfo);
60  (new FXLinkLabel(this, "SPDX-License-Identifier: EPL-2.0", nullptr, GUIDesignLabelAboutInfo))->setTipText("https://www.eclipse.org/legal/epl-v20.html");
61 
62  // link to homepage
63  (new FXLinkLabel(this, "https://sumo.dlr.de", nullptr, GUIDesignLabelCenter))->setTipText("https://sumo.dlr.de");
64 
65  // centered ok-button
66  FXHorizontalFrame* buttonFrame = new FXHorizontalFrame(this, GUIDesignHorizontalFrame);
67  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
68  new FXButton(buttonFrame, "OK\t\t", GUIIconSubSys::getIcon(ICON_ACCEPT), this, ID_ACCEPT, GUIDesignButtonOK);
69  new FXHorizontalFrame(buttonFrame, GUIDesignAuxiliarHorizontalFrame);
70 }
71 
72 
73 void
75  FXDialogBox::create();
76 }
77 
78 
80  delete myHeadlineFont;
81 }
82 
83 
84 
85 /****************************************************************************/
86 
GUIDesignAuxiliarHorizontalFrame
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition: GUIDesigns.h:273
ICON_ACCEPT
Definition: GUIIcons.h:386
GUIDialog_AboutSUMO::GUIDialog_AboutSUMO
GUIDialog_AboutSUMO(FXWindow *parent)
Constructor.
Definition: GUIDialog_AboutSUMO.cpp:37
GUIDialog_AboutSUMO::create
void create()
Creates the widget.
Definition: GUIDialog_AboutSUMO.cpp:74
HAVE_ENABLED
#define HAVE_ENABLED
Definition: config.h:29
GUIDesignButtonOK
#define GUIDesignButtonOK
Definition: GUIDesigns.h:98
ICON_SUMO_LOGO
Definition: GUIIcons.h:40
ICON_SUMO_MINI
Definition: GUIIcons.h:39
GUIDesigns.h
GUIIconSubSys::getIcon
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
Definition: GUIIconSubSys.cpp:609
GUIDesignLabelAboutInfo
#define GUIDesignLabelAboutInfo
label extended over frame without thick and with text justify to left
Definition: GUIDesigns.h:176
GUIDesignHorizontalFrame
#define GUIDesignHorizontalFrame
Definition: GUIDesigns.h:224
GUIDesignLabelIcon
#define GUIDesignLabelIcon
design for label with icon
Definition: GUIDesigns.h:188
GUIDesignLabelCenter
#define GUIDesignLabelCenter
label extended over frame without thick and with text justify to center and height of 23
Definition: GUIDesigns.h:155
GUIIconSubSys.h
GUIDialog_AboutSUMO::myHeadlineFont
FXFont * myHeadlineFont
Font for the widget.
Definition: GUIDialog_AboutSUMO.h:51
GUIDialog_AboutSUMO.h
GUIDialog_AboutSUMO::~GUIDialog_AboutSUMO
~GUIDialog_AboutSUMO()
Destructor.
Definition: GUIDialog_AboutSUMO.cpp:79
config.h
StdDefs.h
VERSION_STRING
#define VERSION_STRING
Definition: config.h:210
GUIDesignDialogBox
#define GUIDesignDialogBox
Definition: GUIDesigns.h:433