Path: blob/main/src/netedit/dialogs/basic/GNEBasicDialog.cpp
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 GNEBasicDialog.cpp14/// @author Pablo Alvarez Lopez15/// @date Jul 202516///17// A basic dialog with simple buttons (ok, accept, cancel, etc.)18/****************************************************************************/19#include <config.h>2021#include <utils/gui/images/GUIIconSubSys.h>2223#include "GNEBasicDialog.h"2425// ===========================================================================26// method definitions27// ===========================================================================2829GNEBasicDialog::GNEBasicDialog(GNEApplicationWindow* applicationWindow, const std::string& title,30const std::string& info, GUIIcon titleIcon, DialogType type,31GNEDialog::Buttons buttons, GUIIcon largeIcon) :32GNEDialog(applicationWindow, title.c_str(), titleIcon, type, buttons, OpenType::MODAL, ResizeMode::STATIC) {33// create dialog layout (obtained from FXMessageBox)34auto infoFrame = new FXVerticalFrame(myContentFrame, LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | LAYOUT_FILL_Y, 0, 0, 0, 0, 10, 10, 10, 10);35// add icon label (only if large icon is defined)36if (largeIcon != GUIIcon::EMPTY) {37new FXLabel(infoFrame, FXString::null, GUIIconSubSys::getIcon(largeIcon), ICON_BEFORE_TEXT | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | LAYOUT_FILL_Y);38}39// add information label40new FXLabel(infoFrame, info.c_str(), NULL, JUSTIFY_LEFT | ICON_BEFORE_TEXT | LAYOUT_TOP | LAYOUT_LEFT | LAYOUT_FILL_X | LAYOUT_FILL_Y);41// open modal dialog42openDialog();43}444546GNEBasicDialog::~GNEBasicDialog() {47}484950void51GNEBasicDialog::runInternalTest(const InternalTestStep::DialogArgument* /*dialogArgument*/) {52// nothing to do53}5455/****************************************************************************/565758