SUMO - Simulation of Urban MObility
GUIGLObjectPopupMenu.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-2018 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials
5 // are made available under the terms of the Eclipse Public License v2.0
6 // which accompanies this distribution, and is available at
7 // http://www.eclipse.org/legal/epl-v20.html
8 // SPDX-License-Identifier: EPL-2.0
9 /****************************************************************************/
17 // The popup menu of a globject.
18 /****************************************************************************/
19 #ifndef GUIGLObjectPopupMenu_h
20 #define GUIGLObjectPopupMenu_h
21 
22 
23 // ===========================================================================
24 // included modules
25 // ===========================================================================
26 #include <config.h>
27 
28 #include <vector>
29 #include <fx.h>
30 #include <utils/geom/Position.h>
31 
32 
33 // ===========================================================================
34 // class declarations
35 // ===========================================================================
37 class GUIGlObject;
38 class GUIMainWindow;
39 
40 
41 // ===========================================================================
42 // class definitions
43 // ===========================================================================
48 class GUIGLObjectPopupMenu : public FXMenuPane {
49  // FOX-declarations
50  FXDECLARE(GUIGLObjectPopupMenu)
51 
52 public:
59 
61  virtual ~GUIGLObjectPopupMenu();
62 
64  void insertMenuPaneChild(FXMenuPane* child);
65 
68  return myParent;
69  }
70 
74  long onCmdCenter(FXObject*, FXSelector, void*);
75 
77  long onCmdCopyName(FXObject*, FXSelector, void*);
78 
80  long onCmdCopyTypedName(FXObject*, FXSelector, void*);
81 
83  long onCmdCopyEdgeName(FXObject*, FXSelector, void*);
84 
86  long onCmdCopyCursorPosition(FXObject*, FXSelector, void*);
87 
89  long onCmdCopyCursorGeoPosition(FXObject*, FXSelector, void*);
90 
92  long onCmdShowPars(FXObject*, FXSelector, void*);
93 
95  long onCmdShowTypePars(FXObject*, FXSelector, void*);
96 
98  long onCmdAddSelected(FXObject*, FXSelector, void*);
99 
101  long onCmdRemoveSelected(FXObject*, FXSelector, void*);
102 
104 
105 protected:
108 
111 
114 
117 
120 
122  std::vector<FXMenuPane*> myMenuPanes;
123 };
124 
125 
126 #endif
127 
128 /****************************************************************************/
129 
GUISUMOAbstractView * getParentView()
return the real owner of this popup
long onCmdCenter(FXObject *, FXSelector, void *)
Position myNetworkPosition
The position within the network the cursor was above when instanting the popup.
long onCmdCopyName(FXObject *, FXSelector, void *)
Called if the name shall be copied to clipboard.
GUIGLObjectPopupMenu()
FOX needs this.
long onCmdAddSelected(FXObject *, FXSelector, void *)
Called if the object shall be added to the list of selected objects.
long onCmdCopyCursorPosition(FXObject *, FXSelector, void *)
Called if the cursor position shall be copied to clipboard.
long onCmdCopyCursorGeoPosition(FXObject *, FXSelector, void *)
Called if the cursor geo-position shall be copied to clipboard.
GUISUMOAbstractView * myParent
The parent window.
long onCmdShowTypePars(FXObject *, FXSelector, void *)
Called if the type parameter of this object shall be shown.
long onCmdCopyEdgeName(FXObject *, FXSelector, void *)
Called if the edge name shall be copied to clipboard (for lanes only)
virtual ~GUIGLObjectPopupMenu()
Destructor.
A point in 2D or 3D with translation and scaling methods.
Definition: Position.h:39
std::vector< FXMenuPane * > myMenuPanes
vector mit Sub-MenuPanes
long onCmdCopyTypedName(FXObject *, FXSelector, void *)
Called if the typed name shall be copied to clipboard.
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
Called if the object shall be removed from the list of selected objects.
The popup menu of a globject.
long onCmdShowPars(FXObject *, FXSelector, void *)
Called if the parameter of this object shall be shown.
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
GUIMainWindow * myApplication
The main application.
GUIGlObject * myObject
The object that belongs to this popup-menu.