SUMO - Simulation of Urban MObility
GNEDialog_About.cpp
Go to the documentation of this file.
1 /****************************************************************************/
7 // The "About" - dialog for NETEDIT, (adapted from GUIDialog_AboutSUMO)
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
10 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software: you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation, either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 #ifdef _MSC_VER
26 #include <windows_config.h>
27 #else
28 #include <config.h>
29 #endif
30 
31 #ifdef HAVE_VERSION_H
32 #include <version.h>
33 #endif
34 
35 #include <utils/common/StdDefs.h>
38 #include "GNEDialog_About.h"
39 
40 #ifdef CHECK_MEMORY_LEAKS
41 #include <foreign/nvwa/debug_new.h>
42 #endif // CHECK_MEMORY_LEAKS
43 
44 
45 // ===========================================================================
46 // bitmap definitions
47 // ===========================================================================
48 static const char* dlr_icon[] = {
49  "40 42 3 1",
50  "# c #000000",
51  "a c #333333",
52  ". c #ffffff",
53  "........................................",
54  "........................................",
55  "...........................#............",
56  "..........................##............",
57  ".........................###............",
58  "........................####............",
59  ".......................#####............",
60  "......................###.##............",
61  ".....................###..##............",
62  "....................###...##............",
63  "...................###....##............",
64  "..................###.....##............",
65  ".........##############################.",
66  "........##############################..",
67  ".......###.....###.......###......###...",
68  "......###.....###.......###......###....",
69  ".....###.....###.......###......###.....",
70  "....###.....###.......###......###......",
71  "...###.....###.......###......###.......",
72  "..##############################........",
73  ".##############################.........",
74  "...........##.....###...................",
75  "...........##....###....................",
76  "...........##...###.....................",
77  "...........##..###......................",
78  "...........##.###.......................",
79  "...........#####........................",
80  "...........####.........................",
81  "...........###..........................",
82  "...........##...........................",
83  "...........#...#####....##.....#####....",
84  "...............######...##.....######...",
85  "...............##..###..##.....##..##...",
86  "...............##...##..##.....##..##...",
87  "...............##...##..##.....#####....",
88  "...............##...##..##.....#####....",
89  "...............##..###..##.....##.###...",
90  "...............######...#####..##..##...",
91  "...............#####....#####..##..###..",
92  "........................................",
93  "........................................",
94  "........................................"
95 };
96 
97 
98 // ===========================================================================
99 // method definitions
100 // ===========================================================================
102  FXDialogBox(parent, "About NETEDIT", DECOR_CLOSE | DECOR_TITLE) {
103  FXVerticalFrame* f1 = new FXVerticalFrame(this, LAYOUT_TOP | FRAME_NONE | LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 1, 1);
104  // build icons
105  FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_CENTER_X | FRAME_NONE, 0, 0, 0, 0, 0, 0, 1, 1);
106  myDLRIcon = new FXXPMIcon(getApp(), dlr_icon);
107  new FXButton(f2, "\tDLR\t.", myDLRIcon, 0, 0, LAYOUT_CENTER_Y | TEXT_OVER_ICON, 5, 0, 40 + 5, 0, 0, 0, 0, 0);
108  // "NETEDIT <VERSION>"
109  FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0);
110  new FXButton(f2, "", GUIIconSubSys::getIcon(ICON_NETEDIT), 0, 0, LAYOUT_CENTER_Y | TEXT_OVER_ICON, 5, 0, 40 + 5, 0, 12, 0, 0, 0);
111  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
112  FXLabel* l = new FXLabel(f4, "NETEDIT " VERSION_STRING, 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
113  l->setFont(myHeadlineFont);
114  new FXLabel(f4, "Network editor for SUMO, the Simulation of Urban MObility", 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
115  new FXLabel(f4, HAVE_ENABLED, 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
116  //
117  // additional infos
118  FXVerticalFrame* f3 = new FXVerticalFrame(f1, FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0);
119  // copyright notice
120  new FXLabel(f3, "Copyright (C) 2001-2016 DLR / Institute of Transportation Systems", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
121 
122  FXLinkLabel* link = new FXLinkLabel(f3, "http://sumo.dlr.de", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 5, 5, 5, 5);
123  link->setTipText("http://sumo.dlr.de");
124  // ok-button
125  new FXButton(f1, "OK\t\t", 0, this, ID_ACCEPT, LAYOUT_FIX_WIDTH | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | FRAME_THICK | FRAME_RAISED, 0, 0, 50, 30);
127 }
128 
129 
130 void
132  FXDialogBox::create();
133  myDLRIcon->create();
134 }
135 
136 
138  delete myDLRIcon;
139  delete myHeadlineFont;
140 }
141 
142 
143 /****************************************************************************/
void create()
Creates the widget (and the icons)
FXIcon * myDLRIcon
Icons for the widget.
FXFont * myHeadlineFont
Font for the widget.
GNEDialog_About(FXWindow *parent)
Constructor.
#define HAVE_ENABLED
Definition: config.h:32
static const char * dlr_icon[]
#define VERSION_STRING
Definition: config.h:225
~GNEDialog_About()
Destructor.
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon