SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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-sim.org/
11 // Copyright (C) 2001-2014 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"
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 // ===========================================================================
101 GUIDialog_AboutSUMO::GUIDialog_AboutSUMO(FXWindow* parent, const char* name, int x, int y)
102  : FXDialogBox(parent, name, DECOR_CLOSE | DECOR_TITLE, x, y, 0, 0) {
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  // "SUMO <VERSION>"
109  FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0);
110  myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold);
111  FXLabel* l = new FXLabel(f4, (FXString)"SUMO " + VERSION_STRING, 0, LAYOUT_CENTER_Y | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
112  l->setFont(myHeadlineFont);
113  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);
114  //
115  // additional infos
116  FXVerticalFrame* f3 = new FXVerticalFrame(f1, FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0);
117  // copyright notice
118  new FXLabel(f3, "A microscopic, multi-modal, open source", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
119  new FXLabel(f3, "road traffic simulation.", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0);
120  new FXLabel(f3, "Copyright (C) 2001-2014 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-sim.org", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 5, 5, 5, 5);
123  link->setTipText("http://sumo-sim.org");
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
133  myDLRIcon->create();
134 }
135 
136 
138  delete myDLRIcon;
139  delete myHeadlineFont;
140 }
141 
142 
143 
144 /****************************************************************************/
145