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-2019 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
// ===========================================================================
36
class
GUISUMOAbstractView
;
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
:
58
GUIGLObjectPopupMenu
(
GUIMainWindow
& app,
GUISUMOAbstractView
& parent,
GUIGlObject
& o);
59
61
virtual
~GUIGLObjectPopupMenu
();
62
64
void
insertMenuPaneChild
(FXMenuPane* child);
65
67
inline
GUISUMOAbstractView
*
getParentView
() {
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
:
107
GUIGLObjectPopupMenu
() { }
108
110
GUISUMOAbstractView
*
myParent
;
111
113
GUIGlObject
*
myObject
;
114
116
GUIMainWindow
*
myApplication
;
117
119
Position
myNetworkPosition
;
120
122
std::vector<FXMenuPane*>
myMenuPanes
;
123
};
124
125
126
#endif
127
128
/****************************************************************************/
129
GUIGLObjectPopupMenu::onCmdRemoveSelected
long onCmdRemoveSelected(FXObject *, FXSelector, void *)
Called if the object shall be removed from the list of selected objects.
Definition:
GUIGLObjectPopupMenu.cpp:168
GUISUMOAbstractView
Definition:
GUISUMOAbstractView.h:73
GUIGLObjectPopupMenu::onCmdCopyName
long onCmdCopyName(FXObject *, FXSelector, void *)
Called if the name shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:105
GUIGLObjectPopupMenu::GUIGLObjectPopupMenu
GUIGLObjectPopupMenu()
FOX needs this.
Definition:
GUIGLObjectPopupMenu.h:107
GUIGLObjectPopupMenu::insertMenuPaneChild
void insertMenuPaneChild(FXMenuPane *child)
Insert a sub-menu pane in this GUIGLObjectPopupMenu.
Definition:
GUIGLObjectPopupMenu.cpp:80
GUIGLObjectPopupMenu::onCmdCopyEdgeName
long onCmdCopyEdgeName(FXObject *, FXSelector, void *)
Called if the edge name shall be copied to clipboard (for lanes only)
Definition:
GUIGLObjectPopupMenu.cpp:119
GUIGLObjectPopupMenu::~GUIGLObjectPopupMenu
virtual ~GUIGLObjectPopupMenu()
Destructor.
Definition:
GUIGLObjectPopupMenu.cpp:71
GUIGLObjectPopupMenu::myNetworkPosition
Position myNetworkPosition
The position within the network the cursor was above when instanting the popup.
Definition:
GUIGLObjectPopupMenu.h:119
GUIGLObjectPopupMenu::myParent
GUISUMOAbstractView * myParent
The parent window.
Definition:
GUIGLObjectPopupMenu.h:110
GUIGLObjectPopupMenu::onCmdCopyCursorPosition
long onCmdCopyCursorPosition(FXObject *, FXSelector, void *)
Called if the cursor position shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:127
GUIGLObjectPopupMenu
The popup menu of a globject.
Definition:
GUIGLObjectPopupMenu.h:48
GUIGLObjectPopupMenu::getParentView
GUISUMOAbstractView * getParentView()
return the real owner of this popup
Definition:
GUIGLObjectPopupMenu.h:67
GUIGLObjectPopupMenu::onCmdCopyCursorGeoPosition
long onCmdCopyCursorGeoPosition(FXObject *, FXSelector, void *)
Called if the cursor geo-position shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:134
Position
A point in 2D or 3D with translation and scaling methods.
Definition:
Position.h:39
GUIGLObjectPopupMenu::onCmdShowPars
long onCmdShowPars(FXObject *, FXSelector, void *)
Called if the parameter of this object shall be shown.
Definition:
GUIGLObjectPopupMenu.cpp:145
GUIGLObjectPopupMenu::onCmdShowTypePars
long onCmdShowTypePars(FXObject *, FXSelector, void *)
Called if the type parameter of this object shall be shown.
Definition:
GUIGLObjectPopupMenu.cpp:153
GUIGlObject
Definition:
GUIGlObject.h:66
GUIGLObjectPopupMenu::onCmdCopyTypedName
long onCmdCopyTypedName(FXObject *, FXSelector, void *)
Called if the typed name shall be copied to clipboard.
Definition:
GUIGLObjectPopupMenu.cpp:112
GUIGLObjectPopupMenu::myMenuPanes
std::vector< FXMenuPane * > myMenuPanes
vector mit Sub-MenuPanes
Definition:
GUIGLObjectPopupMenu.h:122
GUIGLObjectPopupMenu::myObject
GUIGlObject * myObject
The object that belongs to this popup-menu.
Definition:
GUIGLObjectPopupMenu.h:113
Position.h
GUIMainWindow
Definition:
GUIMainWindow.h:47
GUIGLObjectPopupMenu::myApplication
GUIMainWindow * myApplication
The main application.
Definition:
GUIGLObjectPopupMenu.h:116
GUIGLObjectPopupMenu::onCmdAddSelected
long onCmdAddSelected(FXObject *, FXSelector, void *)
Called if the object shall be added to the list of selected objects.
Definition:
GUIGLObjectPopupMenu.cpp:160
config.h
GUIGLObjectPopupMenu::onCmdCenter
long onCmdCenter(FXObject *, FXSelector, void *)
Definition:
GUIGLObjectPopupMenu.cpp:97
src
utils
gui
globjects
GUIGLObjectPopupMenu.h
Generated on Wed Jan 15 2020 15:04:13 for Eclipse SUMO - Simulation of Urban MObility by
1.8.16