SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GUIDialog_AppSettings.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 // The application-settings dialog
9 /****************************************************************************/
10 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
11 // Copyright (C) 2001-2013 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 #include "GUIDialog_AppSettings.h"
34 #include <gui/GUIGlobals.h>
37 
38 #ifdef CHECK_MEMORY_LEAKS
39 #include <foreign/nvwa/debug_new.h>
40 #endif // CHECK_MEMORY_LEAKS
41 
42 
43 // ===========================================================================
44 // FOX callback mapping
45 // ===========================================================================
46 FXDEFMAP(GUIDialog_AppSettings) GUIDialog_AppSettingsMap[] = {
49  FXMAPFUNC(SEL_COMMAND, MID_SETTINGS_OK, GUIDialog_AppSettings::onCmdOk),
51 };
52 
53 FXIMPLEMENT(GUIDialog_AppSettings, FXDialogBox, GUIDialog_AppSettingsMap, ARRAYNUMBER(GUIDialog_AppSettingsMap))
54 
55 
56 // ===========================================================================
57 // method definitions
58 // ===========================================================================
60  : FXDialogBox(parent, "Application Settings"),
61  myAppQuitOnEnd(GUIGlobals::gQuitOnEnd),
62  myAllowTextures(GUITexturesHelper::texturesAllowed()) {
63  FXCheckButton* b = 0;
64  FXVerticalFrame* f1 = new FXVerticalFrame(this, LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 0, 0, 0, 0);
65  b = new FXCheckButton(f1, "Quit on Simulation End", this , MID_QUITONSIMEND);
66  b->setCheck(myAppQuitOnEnd);
67  new FXHorizontalSeparator(f1, SEPARATOR_GROOVE | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X);
68  b = new FXCheckButton(f1, "Allow Textures", this , MID_ALLOWTEXTURES);
69  b->setCheck(myAllowTextures);
70  b->disable();
71  FXHorizontalFrame* f2 = new FXHorizontalFrame(f1, LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | PACK_UNIFORM_WIDTH, 0, 0, 0, 0, 10, 10, 5, 5);
72  FXButton* initial = new FXButton(f2, "&OK", NULL, this, MID_SETTINGS_OK, BUTTON_INITIAL | BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
73  new FXButton(f2, "&Cancel", NULL, this, MID_SETTINGS_CANCEL, BUTTON_DEFAULT | FRAME_RAISED | FRAME_THICK | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_CENTER_X, 0, 0, 0, 0, 30, 30, 4, 4);
74  initial->setFocus();
76 }
77 
78 
80 
81 
82 long
86  destroy();
87  return 1;
88 }
89 
90 
91 long
93  destroy();
94  return 1;
95 }
96 
97 
98 long
101  return 1;
102 }
103 
104 
105 long
108  return 1;
109 }
110 
111 
112 
113 /****************************************************************************/
114