Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GUICursorDialog.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/****************************************************************************/
18// Dialog for edit element under cursor
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25
27
28
29// ===========================================================================
30// class definitions
31// ===========================================================================
32
40 FXDECLARE(GUICursorDialog)
41
42public:
44 GUICursorDialog(GUIGLObjectPopupMenu::PopupType type, GUISUMOAbstractView* view, const std::vector<GUIGlObject*>& objects);
45
48
51
53 long onCmdSetFrontElement(FXObject*, FXSelector, void*);
54
56 long onCmdDeleteElement(FXObject*, FXSelector, void*);
57
59 long onCmdSelectElement(FXObject*, FXSelector, void*);
60
62 long onCmdOpenPropertiesPopUp(FXObject*, FXSelector, void*);
63
65 long onCmdMoveListUp(FXObject*, FXSelector, void*);
66
68 long onCmdMoveListDown(FXObject*, FXSelector, void*);
69
71 long onCmdProcessFront(FXObject*, FXSelector, void*);
72
74 long onCmdUnpost(FXObject*, FXSelector, void* ptr);
75
77
78protected:
80 FOX_CONSTRUCTOR(GUICursorDialog)
81
82
84
87
90
92 FXMenuCommand* myMoveUpMenuCommand = nullptr;
93
95 FXMenuCommand* myMoveDownMenuCommand = nullptr;
96
98 std::vector<std::pair<FXMenuCommand*, GUIGlObject*> > myMenuCommandGLObjects;
99
101 int myListIndex = 0;
102
104 void updateList();
105
106private:
108 void buildDialogElements(GUISUMOAbstractView* view, const FXString text, GUIIcon icon,
109 FXSelector sel, const std::vector<GUIGlObject*>& objects);
110
113
115 GUICursorDialog& operator=(const GUICursorDialog&) = delete;
116};
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
Dialog for edit rerouter intervals.
void updateList()
update list
long onCmdMoveListDown(FXObject *, FXSelector, void *)
move list down
FXMenuCommand * myMoveUpMenuCommand
menu command for move up list
~GUICursorDialog()
destructor
long onCmdMoveListUp(FXObject *, FXSelector, void *)
move list up
long onCmdSelectElement(FXObject *, FXSelector, void *)
select element
long onCmdProcessFront(FXObject *, FXSelector, void *)
move list down
long onCmdUnpost(FXObject *, FXSelector, void *ptr)
unpost
std::vector< std::pair< FXMenuCommand *, GUIGlObject * > > myMenuCommandGLObjects
container for menu commands and GLObjects
int myListIndex
list index
long onCmdDeleteElement(FXObject *, FXSelector, void *)
delete element
GUIGLObjectPopupMenu::PopupType myType
FOX need this.
GUISUMOAbstractView * myView
pointer to view
void buildDialogElements(GUISUMOAbstractView *view, const FXString text, GUIIcon icon, FXSelector sel, const std::vector< GUIGlObject * > &objects)
build dialog elements
FXMenuCommand * myMoveDownMenuCommand
menu command for move down list
MFXMenuHeader * myMenuHeader
header
long onCmdOpenPropertiesPopUp(FXObject *, FXSelector, void *)
open properties popUp
long onCmdSetFrontElement(FXObject *, FXSelector, void *)
set front element
The popup menu of a globject.
Definition json.hpp:4471