Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUIGLObjectPopupMenu.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2024 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
20// The popup menu of a globject.
21/****************************************************************************/
22#pragma once
23#include <config.h>
24
25#include <vector>
27#include <utils/geom/Position.h>
28
29
30// ===========================================================================
31// class declarations
32// ===========================================================================
34class GUIGlObject;
35class GUIMainWindow;
36
37
38// ===========================================================================
39// class definitions
40// ===========================================================================
45class GUIGLObjectPopupMenu : public FXMenuPane {
46 // FOX-declarations
47 FXDECLARE(GUIGLObjectPopupMenu)
48
49public:
50
59
66
72
74 virtual ~GUIGLObjectPopupMenu();
75
77 void insertMenuPaneChild(FXMenuPane* child);
78
79 // @brief remove popup menu from objects
81
84
86 PopupType getPopupType() const;
87
91 long onCmdCenter(FXObject*, FXSelector, void*);
92
94 long onCmdCopyName(FXObject*, FXSelector, void*);
95
97 long onCmdCopyTypedName(FXObject*, FXSelector, void*);
98
100 long onCmdCopyEdgeName(FXObject*, FXSelector, void*);
101
103 long onCmdCopyTestCoordinates(FXObject*, FXSelector, void*);
104
106 long onCmdCopyCursorPosition(FXObject*, FXSelector, void*);
107
109 long onCmdCopyCursorGeoPosition(FXObject*, FXSelector, void*);
110
112 long onCmdCopyViewGeoBoundary(FXObject*, FXSelector, void*);
113
115 long onCmdShowCursorGeoPositionOnline(FXObject*, FXSelector, void*);
116
118 long onCmdShowPars(FXObject*, FXSelector, void*);
119
121 long onCmdShowTypePars(FXObject*, FXSelector, void*);
122
124 long onCmdAddSelected(FXObject*, FXSelector, void*);
125
127 long onCmdRemoveSelected(FXObject*, FXSelector, void*);
128
130
131protected:
134
137
140
143
146
149
151 const std::string myTestCoordinates;
152
154 std::vector<FXMenuPane*> myMenuPanes;
155};
The popup menu of a globject.
GUIGlObject * myObject
The object that belongs to this popup-menu.
long onCmdCopyViewGeoBoundary(FXObject *, FXSelector, void *)
Called if the current geo-boundary shall be copied to clipboard.
const 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.
GUISUMOAbstractView * myParent
The parent window.
long onCmdCopyCursorPosition(FXObject *, FXSelector, void *)
Called if the cursor position shall be copied to clipboard.
const std::string myTestCoordinates
The test coordinates position when instanting the popup.
GUISUMOAbstractView * getParentView()
return the real owner of this popup
long onCmdCopyCursorGeoPosition(FXObject *, FXSelector, void *)
Called if the cursor geo-position shall be copied to clipboard.
long onCmdAddSelected(FXObject *, FXSelector, void *)
Called if the object shall be added to the list of selected objects.
long onCmdShowTypePars(FXObject *, FXSelector, void *)
Called if the type parameter of this object shall be shown.
long onCmdShowPars(FXObject *, FXSelector, void *)
Called if the parameter of this object shall be shown.
GUIMainWindow * myApplication
The main application.
long onCmdCopyEdgeName(FXObject *, FXSelector, void *)
Called if the edge name shall be copied to clipboard (for lanes only)
PopupType getPopupType() const
popup type;
const PopupType myPopupType
popup type;
long onCmdShowCursorGeoPositionOnline(FXObject *, FXSelector, void *)
Called if the cursor geo-position shall be shown online.
long onCmdCenter(FXObject *, FXSelector, void *)
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
Called if the object shall be removed from the list of selected objects.
GUIGLObjectPopupMenu()
FOX needs this.
long onCmdCopyTestCoordinates(FXObject *, FXSelector, void *)
Called if the test coordinates shall be copied to clipboard (only if gui-testing option is enabled)
std::vector< FXMenuPane * > myMenuPanes
vector mit Sub-MenuPanes
virtual ~GUIGLObjectPopupMenu()
Destructor.
long onCmdCopyTypedName(FXObject *, FXSelector, void *)
Called if the typed name shall be copied to clipboard.
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37