SUMO - Simulation of Urban MObility
GUIDialog_AboutSUMO.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 // The application's "About" - dialog
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
11 // Copyright (C) 2001-2016 DLR (http://www.dlr.de/) and contributors
12 /****************************************************************************/
13 //
14 // This file is part of SUMO.
15 // SUMO is free software: you can redistribute it and/or modify
16 // it under the terms of the GNU General Public License as published by
17 // the Free Software Foundation, either version 3 of the License, or
18 // (at your option) any later version.
19 //
20 /****************************************************************************/
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #ifdef HAVE_VERSION_H
33 #include <version.h>
34 #endif
35 
36 #include "GUIDialog_AboutSUMO.h"
38 #include <utils/common/StdDefs.h>
40 
41 #ifdef CHECK_MEMORY_LEAKS
42 #include <foreign/nvwa/debug_new.h>
43 #endif // CHECK_MEMORY_LEAKS
44 
45 
46 // ===========================================================================
47 // bitmap definitions
48 // ===========================================================================
49 static const char* dlr_icon[] = {
50  "40 42 3 1",
51  "# c #000000",
52  "a c #333333",
53  ". c #ffffff",
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 // ===========================================================================
100 // method definitions
101 // ===========================================================================
102 GUIDialog_AboutSUMO::GUIDialog_AboutSUMO(FXWindow* parent, const char* name, int x, int y)
103  : FXDialogBox(parent, name, DECOR_CLOSE | DECOR_TITLE, x, y, 0, 0) {
104  FXVerticalFrame* f1 = new FXVerticalFrame(this, LAYOUT_TOP | FRAME_NONE | LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 1, 1);
105  // build icons
106  FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_CENTER_X | FRAME_NONE, 0, 0, 0, 0, 0, 0, 1, 1);
107  myDLRIcon = new FXXPMIcon(getApp(), dlr_icon);
108  new FXButton(f2, "\tDLR\t.", myDLRIcon, 0, 0, LAYOUT_CENTER_Y | TEXT_OVER_ICON, 5, 0, 40 + 5, 0, 0, 0, 0, 0);
109  // "SUMO <VERSION>"
110  FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0);
111  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
112  FXLabel* l = new FXLabel(f4, "SUMO " 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, "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, "A microscopic, multi-modal, open source", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
121  new FXLabel(f3, "road traffic simulation.", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
122  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);
123 
124  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);
125  link->setTipText("http://sumo.dlr.de");
126  // ok-button
127  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);
129 }
130 
131 
132 void
134  FXDialogBox::create();
135  myDLRIcon->create();
136 }
137 
138 
140  delete myDLRIcon;
141  delete myHeadlineFont;
142 }
143 
144 
145 
146 /****************************************************************************/
147 
~GUIDialog_AboutSUMO()
Destructor.
FXFont * myHeadlineFont
Font for the widget.
static const char * dlr_icon[]
#define HAVE_ENABLED
Definition: config.h:32
GUIDialog_AboutSUMO(FXWindow *parent, const char *name, int x, int y)
Constructor.
#define VERSION_STRING
Definition: config.h:225
void create()
Creates the widget (and the icons)
static FXIcon * getIcon(GUIIcon which)
returns a icon previously defined in the enum GUIIcon
FXIcon * myDLRIcon
Icons for the widget.