|
SUMO - Simulation of Urban MObility
|
00001 /****************************************************************************/ 00008 // The application's "About" - dialog 00009 /****************************************************************************/ 00010 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00011 // Copyright (C) 2001-2012 DLR (http://www.dlr.de/) and contributors 00012 /****************************************************************************/ 00013 // 00014 // This file is part of SUMO. 00015 // SUMO is free software: you can redistribute it and/or modify 00016 // it under the terms of the GNU General Public License as published by 00017 // the Free Software Foundation, either version 3 of the License, or 00018 // (at your option) any later version. 00019 // 00020 /****************************************************************************/ 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #ifdef HAVE_VERSION_H 00033 #include <version.h> 00034 #endif 00035 00036 #include "GUIDialog_AboutSUMO.h" 00037 #include <utils/gui/windows/GUIAppGlobals.h> 00038 #include <utils/foxtools/FXLinkLabel.h> 00039 #include <utils/gui/images/GUIIconSubSys.h> 00040 00041 #ifdef CHECK_MEMORY_LEAKS 00042 #include <foreign/nvwa/debug_new.h> 00043 #endif // CHECK_MEMORY_LEAKS 00044 00045 00046 // =========================================================================== 00047 // bitmap definitions 00048 // =========================================================================== 00049 static const char* dlr_icon[] = { 00050 "40 42 3 1", 00051 "# c #000000", 00052 "a c #333333", 00053 ". c #ffffff", 00054 "........................................", 00055 "........................................", 00056 "...........................#............", 00057 "..........................##............", 00058 ".........................###............", 00059 "........................####............", 00060 ".......................#####............", 00061 "......................###.##............", 00062 ".....................###..##............", 00063 "....................###...##............", 00064 "...................###....##............", 00065 "..................###.....##............", 00066 ".........##############################.", 00067 "........##############################..", 00068 ".......###.....###.......###......###...", 00069 "......###.....###.......###......###....", 00070 ".....###.....###.......###......###.....", 00071 "....###.....###.......###......###......", 00072 "...###.....###.......###......###.......", 00073 "..##############################........", 00074 ".##############################.........", 00075 "...........##.....###...................", 00076 "...........##....###....................", 00077 "...........##...###.....................", 00078 "...........##..###......................", 00079 "...........##.###.......................", 00080 "...........#####........................", 00081 "...........####.........................", 00082 "...........###..........................", 00083 "...........##...........................", 00084 "...........#...#####....##.....#####....", 00085 "...............######...##.....######...", 00086 "...............##..###..##.....##..##...", 00087 "...............##...##..##.....##..##...", 00088 "...............##...##..##.....#####....", 00089 "...............##...##..##.....#####....", 00090 "...............##..###..##.....##.###...", 00091 "...............######...#####..##..##...", 00092 "...............#####....#####..##..###..", 00093 "........................................", 00094 "........................................", 00095 "........................................" 00096 }; 00097 00098 00099 // =========================================================================== 00100 // method definitions 00101 // =========================================================================== 00102 GUIDialog_AboutSUMO::GUIDialog_AboutSUMO(FXWindow* parent, const char* name, int x, int y) 00103 : FXDialogBox(parent, name, DECOR_CLOSE | DECOR_TITLE, x, y, 0, 0) { 00104 FXVerticalFrame* f1 = new FXVerticalFrame(this, LAYOUT_TOP | FRAME_NONE | LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 1, 1); 00105 // build icons 00106 FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_CENTER_X | FRAME_NONE, 0, 0, 0, 0, 0, 0, 1, 1); 00107 myDLRIcon = new FXXPMIcon(getApp(), dlr_icon); 00108 new FXButton(f2, "\tDLR\t.", myDLRIcon, 0, 0, LAYOUT_CENTER_Y | TEXT_OVER_ICON, 5, 0, 40 + 5, 0, 0, 0, 0, 0); 00109 // "SUMO <VERSION>" 00110 FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0); 00111 myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold); 00112 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); 00113 l->setFont(myHeadlineFont); 00114 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); 00115 // 00116 // additional infos 00117 FXVerticalFrame* f3 = new FXVerticalFrame(f1, FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0); 00118 // copyright notice 00119 new FXLabel(f3, "A microscopic, multi-modal, open source", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); 00120 new FXLabel(f3, "road traffic simulation.", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); 00121 new FXLabel(f3, "Copyright (C) 2001-2012 DLR / Institute of Transportation Systems", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); 00122 00123 FXLinkLabel* link = new FXLinkLabel(f3, "http://sumo.sourceforge.net", 0, LAYOUT_CENTER_X | JUSTIFY_CENTER_X | LABEL_NORMAL, 0, 0, 0, 0, 5, 5, 5, 5); 00124 link->setTipText("http://sumo.sourceforge.net"); 00125 // ok-button 00126 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); 00127 setIcon(GUIIconSubSys::getIcon(ICON_APP)); 00128 } 00129 00130 00131 void 00132 GUIDialog_AboutSUMO::create() { 00133 FXDialogBox::create(); 00134 myDLRIcon->create(); 00135 } 00136 00137 00138 GUIDialog_AboutSUMO::~GUIDialog_AboutSUMO() { 00139 delete myDLRIcon; 00140 delete myHeadlineFont; 00141 } 00142 00143 00144 00145 /****************************************************************************/ 00146