Path: blob/main/src/netedit/frames/GNEOverlappedInspection.h
169678 views
/****************************************************************************/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 GNEOverlappedInspection.h14/// @author Pablo Alvarez Lopez15/// @date Mar 202216///17// Frame for overlapped elements18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/GNEViewNetHelper.h>23#include <utils/foxtools/MFXGroupBoxModule.h>24#include <utils/geom/Position.h>2526// ===========================================================================27// class declaration28// ===========================================================================2930class GNEFrame;3132// ===========================================================================33// class definitions34// ===========================================================================3536class GNEOverlappedInspection : public MFXGroupBoxModule {37/// @brief FOX-declaration38FXDECLARE(GNEOverlappedInspection)3940public:41/// @brief constructor (used for filter objects under cusor42GNEOverlappedInspection(GNEFrame* frameParent, const bool onlyJunctions);4344/// @brief destructor45~GNEOverlappedInspection();4647/// @brief show overlapped inspection48void showOverlappedInspection(GNEViewNetHelper::ViewObjectsSelector& viewObjects, const Position& clickedPosition, const bool shiftKeyPressed);4950/// @brief show template editor51void refreshOverlappedInspection();5253/// @brief clear overlapped inspection54void clearOverlappedInspection();5556/// @brief hide overlapped inspection57void hiderOverlappedInspection();5859/// @brief check if overlappedInspection modul is shown60bool overlappedInspectionShown() const;6162/// @brief get number of overlapped ACs63int getNumberOfOverlappedACs() const;6465/// @brief get current AC66GNEAttributeCarrier* getCurrentAC() const;6768/// @name FOX-callbacks69/// @{7071/// @brief Inspect next Element (from top to bot)72long onCmdInspectNextElement(FXObject*, FXSelector, void*);7374/// @brief Inspect previous element (from top to bot)75long onCmdInspectPreviousElement(FXObject*, FXSelector, void*);7677/// @brief show list of overlapped elements78long onCmdShowList(FXObject*, FXSelector, void*);7980/// @brief called when a list item is selected81long onCmdListItemSelected(FXObject*, FXSelector, void*);8283/// @brief Called when user press the help button84long onCmdOverlappingHelp(FXObject*, FXSelector, void*);85/// @}8687protected:88/// @brief FOX needs this89GNEOverlappedInspection();9091private:92/// @brief current frame parent93GNEFrame* myFrameParent = nullptr;9495/// @brief Previous element button96FXButton* myPreviousElement = nullptr;9798/// @brief Button for current index99FXButton* myCurrentIndexButton = nullptr;100101/// @brief Next element button102FXButton* myNextElement = nullptr;103104/// @brief list of overlapped elements105FXList* myOverlappedElementList = nullptr;106107/// @brief button for help108FXButton* myHelpButton = nullptr;109110/// @brief clicked position111Position myClickedPosition = Position::INVALID;112113/// @brief shift key pressed114bool myShiftKeyPressed = false;115116/// @brief flag to indicate that this modul is only for junctions117const bool myOnlyJunctions = false;118119/// @brief objects under cursor120std::vector<GNEAttributeCarrier*> myOverlappedACs;121122/// @brief current index item123int myItemIndex = 0;124};125126127