/****************************************************************************/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 GNEFrame.h14/// @author Pablo Alvarez Lopez15/// @date Jun 201616///17// Abstract class for lateral frames in NetEdit18/****************************************************************************/19#pragma once20#include <config.h>2122#include <netedit/frames/GNEAttributesEditorType.h>2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEViewParent;29class GNEViewNet;3031// ===========================================================================32// class definitions33// ===========================================================================3435/**36* @class GNEFrame37* Abstract class for lateral frames in NetEdit38*/39class GNEFrame : public FXVerticalFrame {4041public:42/**@brief Constructor43* @brief viewParent GNEViewParent in which this GNEFrame is placed44* @brief viewNet viewNet that uses this GNEFrame45* @brief frameLabel label of the frame46*/47GNEFrame(GNEViewParent* viewParent, GNEViewNet* viewNet, const std::string& frameLabel);4849/// @brief destructor50~GNEFrame();5152/// @brief focus upper element of frame53void focusUpperElement();5455/**@brief show Frame56* @note some GNEFrames needs a re-implementation57*/58virtual void show();5960/**@brief hide Frame61* @note some GNEFrames needs a re-implementation62*/63virtual void hide();6465/// @brief set width of GNEFrame66void setFrameWidth(const int newWidth);6768/// @brief get view net69GNEViewNet* getViewNet() const;7071/// @brief get vertical frame that holds all widgets of frame72FXVerticalFrame* getContentFrame() const;7374/// @brief get the label for the frame's header75FXLabel* getFrameHeaderLabel() const;7677/// @brief get font of the header's frame78FXFont* getFrameHeaderFont() const;7980/// @brief get scrollBar width (zero if is hidden)81int getScrollBarWidth() const;8283/// @brief Open help attributes dialog84void openHelpAttributesDialog(const GNEAttributeCarrier* AC) const;8586/// @brief function called after undo/redo in the current frame (can be reimplemented in frame children)87virtual void updateFrameAfterUndoRedo();8889/// @brief function called after setting new width in current frame (can be reimplemented in frame children)90virtual void frameWidthUpdated();9192/// @name functions called by moduls that can be reimplemented in frame children (note: reimplement as protected, just for safety)93/// @{9495/// @brief Tag selected in GNETagSelector96virtual void tagSelected();9798/// @brief selected demand element in DemandElementSelector99virtual void demandElementSelected();100101/// @brief build a shaped element using the drawed shape102virtual bool shapeDrawed();103104/// @brief function called after set a valid attribute in AttributeCreator/AttributeEditor/ParametersEditor/...105virtual void attributeUpdated(SumoXMLAttr attribute);106107/// @brief open GNEAttributesCreator extended dialog108virtual void selectedOverlappedElement(GNEAttributeCarrier* AC);109110/// @brief create path between two elements111virtual bool createPath(const bool useLastRoute);112113/// @}114115protected:116/// @brief FOX need this117FOX_CONSTRUCTOR(GNEFrame)118119/// @brief View Net120GNEViewNet* myViewNet = nullptr;121122/// @brief Vertical frame that holds all widgets of frame123FXVerticalFrame* myContentFrame = nullptr;124125/// @brief fame for header elements126FXHorizontalFrame* myHeaderFrame = nullptr;127128/// @brief fame for left header elements129FXHorizontalFrame* myHeaderLeftFrame = nullptr;130131/// @brief fame for right header elements132FXHorizontalFrame* myHeaderRightFrame = nullptr;133134/// @brief get predefinedTagsMML135const std::vector<std::string>& getPredefinedTagsMML() const;136137/// @brief build rainbow in frame modul138static FXLabel* buildRainbow(FXComposite* parent);139140private:141/// @brief scroll windows that holds the content frame142FXScrollWindow* myScrollWindowsContents = nullptr;143144/// @brief static Font for the Header (it's common for all headers, then create only one time)145static FXFont* myFrameHeaderFont;146147/// @brief the label for the frame's header148FXLabel* myFrameHeaderLabel = nullptr;149150/// @brief Map of attribute ids to their (readable) string-representation (needed for SUMOSAXAttributesImpl_Cached)151std::vector<std::string> myPredefinedTagsMML;152153/// @brief Invalidated copy constructor.154GNEFrame(const GNEFrame&) = delete;155156/// @brief Invalidated assignment operator.157GNEFrame& operator=(const GNEFrame&) = delete;158};159160161