Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNENeteditOptionsDialog.cpp
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo
3// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.
4// This program and the accompanying materials are made available under the
5// terms of the Eclipse Public License 2.0 which is available at
6// https://www.eclipse.org/legal/epl-2.0/
7// This Source Code may also be made available under the following Secondary
8// Licenses when the conditions for such availability set forth in the Eclipse
9// Public License 2.0 are satisfied: GNU General Public License, version 2
10// or later which is available at
11// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13/****************************************************************************/
18// A Dialog for setting options (see OptionsCont)
19/****************************************************************************/
20
22#include <netedit/GNEViewNet.h>
27#include <xercesc/parsers/SAXParser.hpp>
29
31#include "GNEOptionsEditor.h"
32
33// ===========================================================================
34// Defines
35// ===========================================================================
36
37#define TREELISTWIDTH 200
38
39// ===========================================================================
40// method definitions
41// ===========================================================================
42
44 const OptionsCont& originalOptionsContainer) :
45 GNEDialog(applicationWindow, TL("Edit netedit options"), GUIIcon::OPTIONS, GNEDialog::Buttons::ACCEPT_CANCEL_RESET,
46 OpenType::MODAL, GNEDialog::ResizeMode::RESIZABLE, 800, 600) {
47 // build options editor
48 myOptionsEditor = new GNEOptionsEditor(this, "Netedit", optionsContainer, originalOptionsContainer);
49 // open modal dialog
50 openDialog();
51}
52
53
55
56
57void
61
62
63bool
67
68
69long
70GNENeteditOptionsDialog::onCmdCancel(FXObject*, FXSelector, void*) {
71 // reset options
73 // close dialog canceling
74 return closeDialogCanceling();
75}
76
77
78long
79GNENeteditOptionsDialog::onCmdReset(FXObject*, FXSelector, void*) {
80 // reset options
82 return 1;
83}
84
85/****************************************************************************/
GUIIcon
An enumeration of icons used by the gui applications.
Definition GUIIcons.h:33
#define TL(string)
Definition MsgHandler.h:305
The main window of Netedit.
void openDialog(FXWindow *focusableElement=nullptr)
open dialog
OpenType
Open dialog type.
Definition GNEDialog.h:55
long closeDialogCanceling()
close dialog declining the changes
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
GNENeteditOptionsDialog(GNEApplicationWindow *applicationWindow, OptionsCont &optionsContainer, const OptionsCont &originalOptionsContainer)
Constructor.
bool isOptionModified() const
check if option was modified
GNEOptionsEditor * myOptionsEditor
the options editor
long onCmdReset(FXObject *, FXSelector, void *)
called when user press reset button
long onCmdCancel(FXObject *, FXSelector, void *)
called when cancel button is pressed (or dialog is closed)
void resetAllOptions()
reset options
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
bool isOptionModified() const
check if option was modified
dialog arguments, used for certain modal dialogs that can not be edited using tab
A storage for options typed value containers)
Definition OptionsCont.h:89