SUMO - Simulation of Urban MObility

GUIDialog_AboutSUMO.cpp

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