Eclipse SUMO - Simulation of Urban MObility
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
GNEOverlappedInspection.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-2025 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// Frame for overlapped elements
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
25#include <utils/geom/Position.h>
26
27// ===========================================================================
28// class declaration
29// ===========================================================================
30
31class GNEFrame;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
40
41public:
43 GNEOverlappedInspection(GNEFrame* frameParent, const bool onlyJunctions);
44
47
49 void showOverlappedInspection(GNEViewNetHelper::ViewObjectsSelector& viewObjects, const Position& clickedPosition, const bool shiftKeyPressed);
50
53
56
59
61 bool overlappedInspectionShown() const;
62
64 int getNumberOfOverlappedACs() const;
65
68
71
73 long onCmdInspectNextElement(FXObject*, FXSelector, void*);
74
76 long onCmdInspectPreviousElement(FXObject*, FXSelector, void*);
77
79 long onCmdShowList(FXObject*, FXSelector, void*);
80
82 long onCmdListItemSelected(FXObject*, FXSelector, void*);
83
85 long onCmdOverlappingHelp(FXObject*, FXSelector, void*);
87
88protected:
91
92private:
95
97 FXButton* myPreviousElement = nullptr;
98
100 FXButton* myCurrentIndexButton = nullptr;
101
103 FXButton* myNextElement = nullptr;
104
106 FXList* myOverlappedElementList = nullptr;
107
109 FXButton* myHelpButton = nullptr;
110
113
115 bool myShiftKeyPressed = false;
116
118 const bool myOnlyJunctions = false;
119
121 std::vector<GNEAttributeCarrier*> myOverlappedACs;
122
124 int myItemIndex = 0;
125};
void clearOverlappedInspection()
clear overlapped inspection
GNEAttributeCarrier * getCurrentAC() const
get current AC
void refreshOverlappedInspection()
show template editor
FXButton * myCurrentIndexButton
Button for current index.
FXButton * myPreviousElement
Previous element button.
Position myClickedPosition
clicked position
std::vector< GNEAttributeCarrier * > myOverlappedACs
objects under cursor
long onCmdShowList(FXObject *, FXSelector, void *)
show list of overlapped elements
void hiderOverlappedInspection()
hide overlapped inspection
void showOverlappedInspection(GNEViewNetHelper::ViewObjectsSelector &viewObjects, const Position &clickedPosition, const bool shiftKeyPressed)
show overlapped inspection
long onCmdOverlappingHelp(FXObject *, FXSelector, void *)
Called when user press the help button.
bool overlappedInspectionShown() const
check if overlappedInspection modul is shown
long onCmdListItemSelected(FXObject *, FXSelector, void *)
called when a list item is selected
long onCmdInspectPreviousElement(FXObject *, FXSelector, void *)
Inspect previous element (from top to bot)
int myItemIndex
current index item
GNEFrame * myFrameParent
current frame parent
FXButton * myHelpButton
button for help
FXButton * myNextElement
Next element button.
long onCmdInspectNextElement(FXObject *, FXSelector, void *)
Inspect next Element (from top to bot)
FXList * myOverlappedElementList
list of overlapped elements
bool myShiftKeyPressed
shift key pressed
int getNumberOfOverlappedACs() const
get number of overlapped ACs
const bool myOnlyJunctions
flag to indicate that this modul is only for junctions
class used to group all variables related with objects under cursor after a click over view
MFXGroupBoxModule (based on FXGroupBox)
A point in 2D or 3D with translation and scaling methods.
Definition Position.h:37
static const Position INVALID
used to indicate that a position is valid
Definition Position.h:319