Path: blob/main/src/utils/gui/globjects/GUICursorDialog.h
169685 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 GUICursorDialog.h14/// @author Pablo Alvarez Lopez15/// @date Sep 202216///17// Dialog for edit element under cursor18/****************************************************************************/19#pragma once20#include <config.h>2122#include <utils/foxtools/MFXMenuHeader.h>23#include <utils/gui/images/GUIIconSubSys.h>2425#include "GUIGLObjectPopupMenu.h"262728// ===========================================================================29// class definitions30// ===========================================================================3132/**33* @class GUICursorDialog34* @brief Dialog for edit rerouter intervals35*/3637class GUICursorDialog : public GUIGLObjectPopupMenu {38/// @brief FOX-declaration39FXDECLARE(GUICursorDialog)4041public:42/// @brief constructor used for Pop-up dialogs43GUICursorDialog(GUIGLObjectPopupMenu::PopupType type, GUISUMOAbstractView* view, const std::vector<GUIGlObject*>& objects);4445/// @brief destructor46~GUICursorDialog();4748/// @name FOX-callbacks49/// @{5051/// @brief set front element52long onCmdSetFrontElement(FXObject*, FXSelector, void*);5354/// @brief delete element55long onCmdDeleteElement(FXObject*, FXSelector, void*);5657/// @brief select element58long onCmdSelectElement(FXObject*, FXSelector, void*);5960/// @brief open properties popUp61long onCmdOpenPropertiesPopUp(FXObject*, FXSelector, void*);6263/// @brief move list up64long onCmdMoveListUp(FXObject*, FXSelector, void*);6566/// @brief move list down67long onCmdMoveListDown(FXObject*, FXSelector, void*);6869/// @brief move list down70long onCmdProcessFront(FXObject*, FXSelector, void*);7172/// @brief unpost73long onCmdUnpost(FXObject*, FXSelector, void* ptr);7475/// @}7677protected:78/// @brief FOX need this79FOX_CONSTRUCTOR(GUICursorDialog)8081/// @brief PopupType82GUIGLObjectPopupMenu::PopupType myType;8384/// @brief pointer to view85GUISUMOAbstractView* myView;8687/// @brief header88MFXMenuHeader* myMenuHeader = nullptr;8990/// @brief menu command for move up list91FXMenuCommand* myMoveUpMenuCommand = nullptr;9293/// @brief menu command for move down list94FXMenuCommand* myMoveDownMenuCommand = nullptr;9596/// @brief container for menu commands and GLObjects97std::vector<std::pair<FXMenuCommand*, GUIGlObject*> > myMenuCommandGLObjects;9899/// @brief list index100int myListIndex = 0;101102/// @brief update list103void updateList();104105private:106/// @brief build dialog elements107void buildDialogElements(GUISUMOAbstractView* view, const FXString text, GUIIcon icon,108FXSelector sel, const std::vector<GUIGlObject*>& objects);109110/// @brief Invalidated copy constructor.111GUICursorDialog(const GUICursorDialog&) = delete;112113/// @brief Invalidated assignment operator.114GUICursorDialog& operator=(const GUICursorDialog&) = delete;115};116117118