SUMO - Simulation of Urban MObility
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
GNEAdditionalDialog.cpp
Go to the documentation of this file.
1 /****************************************************************************/
8 /****************************************************************************/
9 // SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
10 // Copyright (C) 2001-2013 DLR (http://www.dlr.de/) and contributors
11 /****************************************************************************/
12 //
13 // This file is part of SUMO.
14 // SUMO is free software; you can redistribute it and/or modify
15 // it under the terms of the GNU General Public License as published by
16 // the Free Software Foundation; either version 3 of the License, or
17 // (at your option) any later version.
18 //
19 /****************************************************************************/
20 
21 // ===========================================================================
22 // included modules
23 // ===========================================================================
24 #ifdef _MSC_VER
25 #include <windows_config.h>
26 #else
27 #include <config.h>
28 #endif
29 
30 #include <iostream>
32 #include "GNEAdditionalDialog.h"
33 #include "GNEAdditional.h"
34 #include "GNEViewNet.h"
35 
36 #ifdef CHECK_MEMORY_LEAKS
37 #include <foreign/nvwa/debug_new.h>
38 #endif
39 
40 
41 // ===========================================================================
42 // FOX callback mapping
43 // ===========================================================================
44 
45 FXDEFMAP(GNEAdditionalDialog) GNEAdditionalDialogMap[] = {
49 };
50 
51 // Object abstract implementation
52 FXIMPLEMENT_ABSTRACT(GNEAdditionalDialog, FXDialogBox, GNEAdditionalDialogMap, ARRAYNUMBER(GNEAdditionalDialogMap))
53 
54 // ===========================================================================
55 // member method definitions
56 // ===========================================================================
57 
58 GNEAdditionalDialog::GNEAdditionalDialog(GNEAdditional* parent, int width, int height) :
59  FXDialogBox(parent->getViewNet(), ("Edit '" + parent->getID() + "' data").c_str(), LAYOUT_EXPLICIT | DECOR_TITLE | DECOR_BORDER, 0, 0, width, height) {
60  // Create frames
61  myContentFrame = new FXVerticalFrame(this, LAYOUT_EXPLICIT, 0, 0, width, height - 30);
62  myButtonFrame = new FXHorizontalFrame(this, LAYOUT_EXPLICIT, 0, height - 30, width, 30);
63  // create buttons
64  new FXHorizontalFrame(myButtonFrame, LAYOUT_FILL_X);
65  myAcceptButton = new FXButton(myButtonFrame, "accept\t\tclose", 0, this, MID_GNE_MODE_ADDITIONALDIALOG_ACCEPT, ICON_BEFORE_TEXT | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | FRAME_THICK | FRAME_RAISED, 0, 0, 75, 23, 2, 2, 2, 2);
66  myCancelButton = new FXButton(myButtonFrame, "cancel\t\tclose", 0, this, MID_GNE_MODE_ADDITIONALDIALOG_CANCEL, ICON_BEFORE_TEXT | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | FRAME_THICK | FRAME_RAISED, 0, 0, 75, 23, 2, 2, 2, 2);
67  myResetButton = new FXButton(myButtonFrame, "reset\t\tclose", 0, this, MID_GNE_MODE_ADDITIONALDIALOG_RESET, ICON_BEFORE_TEXT | LAYOUT_FIX_WIDTH | LAYOUT_FIX_HEIGHT | FRAME_THICK | FRAME_RAISED, 0, 0, 75, 23, 2, 2, 2, 2);
68  new FXHorizontalFrame(myButtonFrame, LAYOUT_FILL_X);
69 }
70 
71 
73 }
74 
75 
76 /****************************************************************************/
virtual long onCmdReset(FXObject *, FXSelector, void *)=0
event after press cancel button
Dialog to edit sequences, parameters, etc.. of Additionals.
FXDEFMAP(GNEAdditionalDialog) GNEAdditionalDialogMap[]
virtual long onCmdCancel(FXObject *sender, FXSelector sel, void *ptr)=0
event after press cancel button
virtual long onCmdAccept(FXObject *sender, FXSelector sel, void *ptr)=0
An Element which don't belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:63