Eclipse SUMO - Simulation of Urban MObility
Loading...
Searching...
No Matches
GNEDistributionRefDialog.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// Dialog for edit attribute carriers
19/****************************************************************************/
20
22#include <netedit/GNENet.h>
27
29
30// ===========================================================================
31// FOX callback mapping
32// ===========================================================================
33
38
39// Object implementation
40FXIMPLEMENT(GNEDistributionRefDialog, GNEDialog, GNEDistributionRefDialogMap, ARRAYNUMBER(GNEDistributionRefDialogMap))
41
42// ===========================================================================
43// member method definitions
44// ===========================================================================
45
47 GNEDialog(distributionParent->getNet()->getViewNet()->getViewParent()->getGNEAppWindows(),
48 TLF("Add % reference", distributionParent->getTagStr()), distributionParent->getTagProperty()->getGUIIcon(),
50 auto tooltipMenu = distributionParent->getNet()->getViewNet()->getViewParent()->getGNEAppWindows()->getStaticTooltipMenu();
51 // create elements
52 FXHorizontalFrame* referenceFrames = new FXHorizontalFrame(myContentFrame, GUIDesignAuxiliarHorizontalFrame);
53 myReferencesComboBox = new MFXComboBoxIcon(referenceFrames, tooltipMenu, true, GUIDesignComboBoxVisibleItems,
55
56 FXHorizontalFrame* probabilityFrame = new FXHorizontalFrame(myContentFrame, GUIDesignAuxiliarHorizontalFrame);
57 myProbabilityTextField = new MFXTextFieldIcon(probabilityFrame, tooltipMenu, GUIIcon::EMPTY, this, MID_GNE_ATTRIBUTESEDITORROW_SETATTRIBUTE, GUIDesignTextField);
58 // open dialog
59 openDialog();
60}
61
62
64
65
66void
68 // nothing to do
69}
70
71
72long
73GNEDistributionRefDialog::onCmdAccept(FXObject*, FXSelector, void*) {
74 return 1;
75}
76
77
78long
79GNEDistributionRefDialog::onCmdSetReference(FXObject*, FXSelector, void*) {
80 return 1;
81}
82
83
84long
85GNEDistributionRefDialog::onCmdSetProbability(FXObject*, FXSelector, void*) {
86 return 1;
87}
88
89/****************************************************************************/
DialogType
FXDEFMAP(GNEDistributionRefDialog) GNEDistributionRefDialogMap[]
@ MID_GNE_ATTRIBUTESEDITORROW_SETATTRIBUTE
set attribute (string, bool, etc.) in attributes editor row
@ MID_GNE_DISTRIBUTIOND_PROBABILITY
change probability
@ MID_GNE_DISTRIBUTIOND_REFERENCE
change reference
#define GUIDesignComboBox
Definition GUIDesigns.h:295
#define GUIDesignTextField
Definition GUIDesigns.h:74
#define GUIDesignAuxiliarHorizontalFrame
design for auxiliar (Without borders) horizontal frame used to pack another frames
Definition GUIDesigns.h:430
#define GUIDesignComboBoxVisibleItems
Definition GUIDesigns.h:64
#define TLF(string,...)
Definition MsgHandler.h:306
OpenType
Open dialog type.
Definition GNEDialog.h:58
long onCmdSetReference(FXObject *, FXSelector, void *)
event after choose a reference in the comboBox
long onCmdSetProbability(FXObject *, FXSelector, void *)
event after choose a reference in the probability
void runInternalTest(const InternalTestStep::DialogArgument *dialogArgument)
run internal test
long onCmdAccept(FXObject *, FXSelector, void *)
event after press accept button
dialog arguments, used for certain modal dialogs that can not be edited using tab