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/foxtools/FXLinkLabel.h> 00038 #include <utils/gui/images/GUIIconSubSys.h> 00039 00040 #ifdef CHECK_MEMORY_LEAKS 00041 #include <foreign/nvwa/debug_new.h> 00042 #endif // CHECK_MEMORY_LEAKS 00043 00044 00045 // =========================================================================== 00046 // bitmap definitions 00047 // =========================================================================== 00048 static const char* dlr_icon[] = { 00049 "40 42 3 1", 00050 "# c #000000", 00051 "a c #333333", 00052 ". c #ffffff", 00053 "........................................", 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 // method definitions 00100 // =========================================================================== 00101 GUIDialog_AboutSUMO::GUIDialog_AboutSUMO(FXWindow* parent, const char* name, int x, int y) 00102 : FXDialogBox(parent, name, DECOR_CLOSE | DECOR_TITLE, x, y, 0, 0) { 00103 FXVerticalFrame* f1 = new FXVerticalFrame(this, LAYOUT_TOP | FRAME_NONE | LAYOUT_FILL_X, 0, 0, 0, 0, 0, 0, 1, 1); 00104 // build icons 00105 FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_CENTER_X | FRAME_NONE, 0, 0, 0, 0, 0, 0, 1, 1); 00106 myDLRIcon = new FXXPMIcon(getApp(), dlr_icon); 00107 new FXButton(f2, "\tDLR\t.", myDLRIcon, 0, 0, LAYOUT_CENTER_Y | TEXT_OVER_ICON, 5, 0, 40 + 5, 0, 0, 0, 0, 0); 00108 // "SUMO <VERSION>" 00109 FXVerticalFrame* f4 = new FXVerticalFrame(f2, FRAME_NONE, 0, 0, 0, 0, 20, 0, 0, 0); 00110 myHeadlineFont = new FXFont(getApp(), "Arial", 18, FXFont::Bold); 00111 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); 00112 l->setFont(myHeadlineFont); 00113 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); 00114 // 00115 // additional infos 00116 FXVerticalFrame* f3 = new FXVerticalFrame(f1, FRAME_NONE, 0, 0, 0, 0, 0, 0, 0, 0); 00117 // copyright notice 00118 new FXLabel(f3, "A microscopic, multi-modal, open source", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); 00119 new FXLabel(f3, "road traffic simulation.", 0, LABEL_NORMAL, 0, 0, 0, 0, 0, 0, 0, 0); 00120 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); 00121 00122 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); 00123 link->setTipText("http://sumo.sourceforge.net"); 00124 // ok-button 00125 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); 00126 setIcon(GUIIconSubSys::getIcon(ICON_APP)); 00127 } 00128 00129 00130 void 00131 GUIDialog_AboutSUMO::create() { 00132 FXDialogBox::create(); 00133 myDLRIcon->create(); 00134 } 00135 00136 00137 GUIDialog_AboutSUMO::~GUIDialog_AboutSUMO() { 00138 delete myDLRIcon; 00139 delete myHeadlineFont; 00140 } 00141 00142 00143 00144 /****************************************************************************/ 00145