Path: blob/main/src/netedit/dialogs/elements/GNEAttributeCarrierDialog.h
169684 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 GNEAttributeCarrierDialog.h14/// @author Pablo Alvarez Lopez15/// @date Aug 202516///17// Dialog for edit attribute carriers18/****************************************************************************/19#pragma once20#include <config.h>2122#include "GNETemplateElementDialog.h"2324// ===========================================================================25// class declaration26// ===========================================================================2728class GNEAttributeCarrier;29class MFXTextFieldIcon;3031// ===========================================================================32// class definitions33// ===========================================================================3435class GNEAttributeCarrierDialog : public GNETemplateElementDialog<GNEAttributeCarrier> {3637public:38/// @brief attribute text field39class AttributeTextField : public FXHorizontalFrame {40// FOX-declarations41FXDECLARE(AttributeTextField)4243public:44/// @brief constructor45AttributeTextField(GNEAttributeCarrierDialog* ACDialog, FXVerticalFrame* verticalFrame,46const GNEAttributeProperties* attrProperty);4748/// @name FOX-callbacks49/// @{5051/// @brief event after edit text field52long onCmdSetAttribute(FXObject* obj, FXSelector, void*);5354/// @brief called when user press "edit color" dialog55long onCmdOpenColorDialog(FXObject* sender, FXSelector, void* arg);5657/// @brief called when user press vClass dialog58long onCmdOpenVClassDialog(FXObject*, FXSelector, void*);5960/// @}6162protected:63/// @brief FOX needs this64FOX_CONSTRUCTOR(AttributeTextField)6566/// @brief pointer to ACDialog parent67GNEAttributeCarrierDialog* myACDialogParent = nullptr;6869/// @brief attribute property70const GNEAttributeProperties* myAttrProperty = nullptr;7172/// @brief attribute button (color or allow)73MFXButtonTooltip* myAttributeButton = nullptr;7475/// @brief text field for attribute76MFXTextFieldIcon* myTextField = nullptr;7778/// @brief check button for true/false79FXCheckButton* myCheckButton = nullptr;8081private:82/// @brief Invalidated copy constructor.83AttributeTextField(const AttributeTextField&) = delete;8485/// @brief Invalidated assignment operator.86AttributeTextField& operator=(const AttributeTextField&) = delete;87};8889/// @brief constructor90GNEAttributeCarrierDialog(GNEAttributeCarrier* AC);9192/// @brief destructor93~GNEAttributeCarrierDialog();9495/// @brief run internal test96void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);9798/// @name FOX-callbacks99/// @{100101/// @brief event after press accept button102long onCmdAccept(FXObject*, FXSelector, void*);103104/// @brief event after press reset button105long onCmdReset(FXObject*, FXSelector, void*);106107/// @}108109protected:110/// @brief list of attribute text fields111std::vector<AttributeTextField*> myAttributeTextFields;112113private:114/// @brief Invalidated copy constructor.115GNEAttributeCarrierDialog(const GNEAttributeCarrierDialog&) = delete;116117/// @brief Invalidated assignment operator.118GNEAttributeCarrierDialog& operator=(const GNEAttributeCarrierDialog&) = delete;119};120121122