/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file GUIDetectorWrapper.h14/// @author Daniel Krajzewicz15/// @author Jakob Erdmann16/// @author Michael Behrisch17/// @date Sept 200218///19// The base class for detector wrapper20/****************************************************************************/21#pragma once22#include <config.h>2324#include <utils/geom/Position.h>25#include <utils/gui/globjects/GUIGlObject_AbstractAdd.h>26#include <utils/gui/globjects/GUIGLObjectPopupMenu.h>27#include <utils/gui/windows/GUISUMOAbstractView.h>282930// ===========================================================================31// class definitions32// ===========================================================================33/**34* @class GUIDetectorWrapper35* This is the base class for detector wrapper; As detectors may have a36* position only or additionally a length, different display mechanisms are37* necessary. These must be implemented in class erived from this one,38* according to the wrapped detectors' properties.39*/40class GUIDetectorWrapper : public GUIGlObject_AbstractAdd {4142public:43/// Constructor44GUIDetectorWrapper(GUIGlObjectType type, const std::string& id, FXIcon* icon);4546/// Destructor47~GUIDetectorWrapper();4849/// @name inherited from GUIGlObject50//@{5152/** @brief Returns an own popup-menu53*54* @param[in] app The application needed to build the popup-menu55* @param[in] parent The parent window needed to build the popup-menu56* @return The built popup-menu57* @see GUIGlObject::getPopUpMenu58*/59GUIGLObjectPopupMenu* getPopUpMenu(GUIMainWindow& app, GUISUMOAbstractView& parent);6061/// @brief return exaggeration associated with this GLObject62double getExaggeration(const GUIVisualizationSettings& s) const;63/// @}6465/**66* @class GUIBaseVehiclePopupMenu67*68* A popup-menu for detectors. In comparison to the normal popup-menu, this one69* also allows to trigger virtual detector calls70*/71class PopupMenu : public GUIGLObjectPopupMenu {72FXDECLARE(PopupMenu)7374public:75PopupMenu(GUIMainWindow& app, GUISUMOAbstractView& parent, GUIGlObject* o);7677/// @brief Destructor78virtual ~PopupMenu() {};7980/// @brief called to set/reset virtual detector calls81long onCmdSetOverride(FXObject*, FXSelector, void*);828384protected:85FOX_CONSTRUCTOR(PopupMenu)86};8788protected:8990/// @brief whether this detector has an active virtual detector call91virtual bool haveOverride() const {92return false;93}9495virtual void toggleOverride() const { }9697/// @brief whether this detector supports virtual detector calls98bool mySupportsOverride;99100101};102103104