Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEViewObjectSelector.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// NetworkElement selector module
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
24
25// ===========================================================================
26// class declaration
27// ===========================================================================
28
30class GNEFrame;
32
33// ===========================================================================
34// class definitions
35// ===========================================================================
36
39 FXDECLARE(GNEViewObjectSelector)
40
41public:
43 GNEViewObjectSelector(GNEFrame* frameParent);
44
47
49 SumoXMLTag getTag() const;
50
53
55 void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute);
56
59
62
64 bool toggleSelectedLane(const GNELane* lane);
65
67 void clearSelection();
68
71
75 long onCmdUseSelectedElements(FXObject*, FXSelector, void*);
76
78 long onCmdClearSelection(FXObject*, FXSelector, void*);
80
81protected:
84
85private:
88
90 FXButton* myUseSelected = nullptr;
91
93 FXList* myList = nullptr;
94
96 FXLabel* myLabel = nullptr;
97
99 FXButton* myClearSelection = nullptr;
100
102 std::vector<const GNEAttributeCarrier*> mySelectedACs;
103
106
109};
SumoXMLTag
Numbers representing SUMO-XML - element names.
@ SUMO_TAG_NOTHING
invalid tag, must be the last one
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_NOTHING
invalid attribute, must be the last one
This lane is powered by an underlying GNEEdge and basically knows how to draw itself.
Definition GNELane.h:46
std::vector< const GNEAttributeCarrier * > mySelectedACs
selected ACs
long onCmdUseSelectedElements(FXObject *, FXSelector, void *)
bool fillSumoBaseObject(CommonXMLStructure::SumoBaseObject *baseObject) const
@brie fill SUMO base object
FXButton * myUseSelected
button for use selected edges
void showNetworkElementsSelector(const SumoXMLTag tag, const SumoXMLAttr attribute)
show GNEViewObjectSelector Module
void clearSelection()
clear selection
bool toggleSelectedLane(const GNELane *lane)
toggle selected lane
long onCmdClearSelection(FXObject *, FXSelector, void *)
called when clear selection button is pressed
SumoXMLTag myTag
network element type
FXList * myList
List of GNEViewObjectSelector.
bool isNetworkElementSelected(const GNEAttributeCarrier *AC) const
check if the given AC is selected
FXLabel * myLabel
info label
GNEFrame * myFrameParent
pointer to frame parent
SumoXMLAttr myAttribute
attribute vinculated
void hideNetworkElementsSelector()
hide GNEViewObjectSelector Module
FXButton * myClearSelection
button for clear selection
SumoXMLTag getTag() const
get tag with selected element type
bool toggleSelectedElement(const GNEAttributeCarrier *AC)
toggle selected element
MFXGroupBoxModule (based on FXGroupBox)