Eclipse 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-2020 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>
26
#include <fx.h>
27
#include <
utils/geom/Position.h
>
28
29
30
// ===========================================================================
31
// class declarations
32
// ===========================================================================
33
class
GUISUMOAbstractView
;
34
class
GUIGlObject
;
35
class
GUIMainWindow
;
36
37
38
// ===========================================================================
39
// class definitions
40
// ===========================================================================
45
class
GUIGLObjectPopupMenu
:
public
FXMenuPane {
46
// FOX-declarations
47
FXDECLARE(
GUIGLObjectPopupMenu
)
48
49
public
:
55
GUIGLObjectPopupMenu
(
GUIMainWindow
& app,
GUISUMOAbstractView
& parent,
GUIGlObject
& o);
56
58
virtual
~GUIGLObjectPopupMenu
();
59
61
void
insertMenuPaneChild
(FXMenuPane* child);
62
64
inline
GUISUMOAbstractView
*
getParentView
() {
65
return
myParent
;
66
}
67
71
long
onCmdCenter
(FXObject*, FXSelector,
void
*);
72
74
long
onCmdCopyName
(FXObject*, FXSelector,
void
*);
75
77
long
onCmdCopyTypedName
(FXObject*, FXSelector,
void
*);
78
80
long
onCmdCopyEdgeName
(FXObject*, FXSelector,
void
*);
81
83
long
onCmdCopyCursorPosition
(FXObject*, FXSelector,
void
*);
84
86
long
onCmdCopyCursorGeoPosition
(FXObject*, FXSelector,
void
*);
87
89
long
onCmdShowPars
(FXObject*, FXSelector,
void
*);
90
92
long
onCmdShowTypePars
(FXObject*, FXSelector,
void
*);
93
95
long
onCmdAddSelected
(FXObject*, FXSelector,
void
*);
96
98
long
onCmdRemoveSelected
(FXObject*, FXSelector,
void
*);
99
101
102
protected
:
103
FOX_CONSTRUCTOR(
GUIGLObjectPopupMenu
)
104
105
106
GUISUMOAbstractView
*
myParent
;
107
109
GUIGlObject
*
myObject
;
110
112
GUIMainWindow
*
myApplication
;
113
115
Position
myNetworkPosition
;
116
118
std::vector<FXMenuPane*>
myMenuPanes
;
119
};
Position.h
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition:
GUIGLObjectPopupMenu.h:45
GUIGLObjectPopupMenu::myObject
GUIGlObject * myObject
The object that belongs to this popup-menu.
Definition:
GUIGLObjectPopupMenu.h:109
GUIGLObjectPopupMenu::onCmdCopyName
long onCmdCopyName(FXObject *, FXSelector, void *)
Called if the name shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:104
GUIGLObjectPopupMenu::myParent
GUISUMOAbstractView * myParent
The parent window.
Definition:
GUIGLObjectPopupMenu.h:106
GUIGLObjectPopupMenu::onCmdCopyCursorPosition
long onCmdCopyCursorPosition(FXObject *, FXSelector, void *)
Called if the cursor position shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:126
GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition
long onCmdCopyCursorGeoPosition(FXObject *, FXSelector, void *)
Called if the cursor geo-position shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:133
GUIGLObjectPopupMenu::onCmdAddSelected
long onCmdAddSelected(FXObject *, FXSelector, void *)
Called if the object shall be added to the list of selected objects.
Definition:
GUIGLObjectPopupMenu.cpp:159
GUIGLObjectPopupMenu::onCmdShowTypePars
long onCmdShowTypePars(FXObject *, FXSelector, void *)
Called if the type parameter of this object shall be shown.
Definition:
GUIGLObjectPopupMenu.cpp:152
GUIGLObjectPopupMenu::onCmdShowPars
long onCmdShowPars(FXObject *, FXSelector, void *)
Called if the parameter of this object shall be shown.
Definition:
GUIGLObjectPopupMenu.cpp:144
GUIGLObjectPopupMenu::myApplication
GUIMainWindow * myApplication
The main application.
Definition:
GUIGLObjectPopupMenu.h:112
GUIGLObjectPopupMenu::onCmdCopyEdgeName
long onCmdCopyEdgeName(FXObject *, FXSelector, void *)
Called if the edge name shall be copied to clipboard (for lanes only)
Definition:
GUIGLObjectPopupMenu.cpp:118
GUIGLObjectPopupMenu::getParentView
GUISUMOAbstractView * getParentView()
return the real owner of this popup
Definition:
GUIGLObjectPopupMenu.h:64
GUIGLObjectPopupMenu::onCmdCenter
long onCmdCenter(FXObject *, FXSelector, void *)
Definition:
GUIGLObjectPopupMenu.cpp:96
GUIGLObjectPopupMenu::GUIGLObjectPopupMenu
GUIGLObjectPopupMenu(GUIMainWindow &app, GUISUMOAbstractView &parent, GUIGlObject &o)
Constructor.
Definition:
GUIGLObjectPopupMenu.cpp:60
GUIGLObjectPopupMenu::myNetworkPosition
Position myNetworkPosition
The position within the network the cursor was above when instanting the popup.
Definition:
GUIGLObjectPopupMenu.h:115
GUIGLObjectPopupMenu::insertMenuPaneChild
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
Definition:
GUIGLObjectPopupMenu.cpp:79
GUIGLObjectPopupMenu::onCmdRemoveSelected
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
Called if the object shall be removed from the list of selected objects.
Definition:
GUIGLObjectPopupMenu.cpp:167
GUIGLObjectPopupMenu::myMenuPanes
std::vector< FXMenuPane * > myMenuPanes
vector mit Sub-MenuPanes
Definition:
GUIGLObjectPopupMenu.h:118
GUIGLObjectPopupMenu::~GUIGLObjectPopupMenu
virtual ~GUIGLObjectPopupMenu()
Destructor.
Definition:
GUIGLObjectPopupMenu.cpp:69
GUIGLObjectPopupMenu::onCmdCopyTypedName
long onCmdCopyTypedName(FXObject *, FXSelector, void *)
Called if the typed name shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:111
GUIGlObject
Definition:
GUIGlObject.h:63
GUIMainWindow
Definition:
GUIMainWindow.h:44
GUISUMOAbstractView
Definition:
GUISUMOAbstractView.h:70
Position
A point in 2D or 3D with translation and scaling methods.
Definition:
Position.h:36
src
utils
gui
globjects
GUIGLObjectPopupMenu.h
Generated on Thu Dec 9 2021 00:34:12 for Eclipse SUMO - Simulation of Urban MObility by
1.9.1