SUMO - Simulation of Urban MObility
GNEAdditionalDialog.h
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2001-2017 German Aerospace Center (DLR) and others.
4 /****************************************************************************/
5 //
6 // This program and the accompanying materials
7 // are made available under the terms of the Eclipse Public License v2.0
8 // which accompanies this distribution, and is available at
9 // http://www.eclipse.org/legal/epl-v20.html
10 //
11 /****************************************************************************/
17 // A abstract class for editing additional elements
18 /****************************************************************************/
19 #ifndef GNEAdditionalDialog_h
20 #define GNEAdditionalDialog_h
21 
22 // ===========================================================================
23 // included modules
24 // ===========================================================================
25 
26 #ifdef _MSC_VER
27 #include <windows_config.h>
28 #else
29 #include <config.h>
30 #endif
31 
32 #include <fx.h>
33 #include <vector>
35 
36 // ===========================================================================
37 // class declarations
38 // ===========================================================================
39 
40 class GNEAdditional;
41 class GNEUndoList;
42 
43 // ===========================================================================
44 // class definitions
45 // ===========================================================================
46 
51 class GNEAdditionalDialog : protected FXTopWindow {
53  FXDECLARE_ABSTRACT(GNEAdditionalDialog)
54 
55 public:
57  GNEAdditionalDialog(GNEAdditional* parent, int width, int height);
58 
61 
65  virtual long onCmdAccept(FXObject* sender, FXSelector sel, void* ptr) = 0;
66 
68  virtual long onCmdCancel(FXObject* sender, FXSelector sel, void* ptr) = 0;
69 
71  virtual long onCmdReset(FXObject*, FXSelector, void*) = 0;
72 
74  long onKeyPress(FXObject* sender, FXSelector sel, void* ptr);
75 
77  long onKeyRelease(FXObject* sender, FXSelector sel, void* ptr);
78 
80 
81 protected:
84 
86  FXVerticalFrame* myContentFrame;
87 
89  FXint openAsModalDialog(FXuint placement = PLACEMENT_CURSOR);
90 
92  void changeAdditionalDialogHeader(const std::string& newHeader);
93 
95  void initChanges();
96 
98  void acceptChanges();
99 
101  void cancelChanges();
102 
104  void resetChanges();
105 
106 private:
108  FXButton* myAcceptButton;
109 
111  FXButton* myCancelButton;
112 
114  FXButton* myResetButton;
115 
117  std::string myChangesDescription;
118 
121 
124 
126  GNEAdditionalDialog(const GNEAdditionalDialog&) = delete;
127 
130 };
131 
132 #endif
long onKeyRelease(FXObject *sender, FXSelector sel, void *ptr)
event after release a key
void resetChanges()
reset changes did in this dialog.
virtual long onCmdReset(FXObject *, FXSelector, void *)=0
event after press cancel button
~GNEAdditionalDialog()
destructor
FXButton * myResetButton
cancel button
Dialog to edit sequences, parameters, etc.. of Additionals.
FXButton * myCancelButton
cancel button
GNEAdditionalDialog & operator=(const GNEAdditionalDialog &)=delete
Invalidated assignment operator.
virtual long onCmdCancel(FXObject *sender, FXSelector sel, void *ptr)=0
event after press cancel button
FXVerticalFrame * myContentFrame
frame for contents
GNEUndoList * myUndoList
pointer to UndoList
virtual long onCmdAccept(FXObject *sender, FXSelector sel, void *ptr)=0
std::string myChangesDescription
description of changes did in this additional dialog
void acceptChanges()
Accept changes did in this dialog.
void initChanges()
init a new group of changes that will be do it in dialog
An Element which don&#39;t belongs to GNENet but has influency in the simulation.
Definition: GNEAdditional.h:59
long onKeyPress(FXObject *sender, FXSelector sel, void *ptr)
event after press a key
void cancelChanges()
Cancel changes did in this dialog.
GNEAdditionalDialog()
FOX needs this.
int myNumberOfChanges
number of GNEChanges_... in dialog
FXint openAsModalDialog(FXuint placement=PLACEMENT_CURSOR)
execute dialog as modal
FXButton * myAcceptButton
accept button
void changeAdditionalDialogHeader(const std::string &newHeader)
change additional dialog header