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-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 /****************************************************************************/
19 // The popup menu of a globject.
20 /****************************************************************************/
21 #ifndef GUIGLObjectPopupMenu_h
22 #define GUIGLObjectPopupMenu_h
23 
24 
25 // ===========================================================================
26 // included modules
27 // ===========================================================================
28 #ifdef _MSC_VER
29 #include <windows_config.h>
30 #else
31 #include <config.h>
32 #endif
33 
34 #include <vector>
35 #include <fx.h>
36 #include <utils/geom/Position.h>
37 
38 
39 // ===========================================================================
40 // class declarations
41 // ===========================================================================
43 class GUIGlObject;
44 class GUIMainWindow;
45 
46 
47 // ===========================================================================
48 // class definitions
49 // ===========================================================================
54 class GUIGLObjectPopupMenu : public FXMenuPane {
55  // FOX-declarations
56  FXDECLARE(GUIGLObjectPopupMenu)
57 
58 public:
65 
67  virtual ~GUIGLObjectPopupMenu();
68 
70  void insertMenuPaneChild(FXMenuPane* child);
71 
74  return myParent;
75  }
76 
80  long onCmdCenter(FXObject*, FXSelector, void*);
81 
83  long onCmdCopyName(FXObject*, FXSelector, void*);
84 
86  long onCmdCopyTypedName(FXObject*, FXSelector, void*);
87 
89  long onCmdCopyEdgeName(FXObject*, FXSelector, void*);
90 
92  long onCmdCopyCursorPosition(FXObject*, FXSelector, void*);
93 
95  long onCmdCopyCursorGeoPosition(FXObject*, FXSelector, void*);
96 
98  long onCmdShowPars(FXObject*, FXSelector, void*);
99 
101  long onCmdShowTypePars(FXObject*, FXSelector, void*);
102 
104  long onCmdAddSelected(FXObject*, FXSelector, void*);
105 
107  long onCmdRemoveSelected(FXObject*, FXSelector, void*);
108 
110 
111 protected:
114 
117 
120 
123 
126 
128  std::vector<FXMenuPane*> myMenuPanes;
129 };
130 
131 
132 #endif
133 
134 /****************************************************************************/
135 
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:45
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.