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