Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
eclipse
GitHub Repository: eclipse/sumo
Path: blob/main/src/netedit/dialogs/GNEGeometryPointDialog.h
169678 views
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
/****************************************************************************/
14
/// @file GNEGeometryPointDialog.h
15
/// @author Pablo Alvarez Lopez
16
/// @date Jan 2021
17
///
18
// A dialog for set Geometry Points
19
/****************************************************************************/
20
#pragma once
21
#include <config.h>
22
23
#include "GNEDialog.h"
24
25
// ===========================================================================
26
// class definitions
27
// ===========================================================================
28
29
class GNEGeometryPointDialog : public GNEDialog {
30
/// @brief FOX-declaration abstract
31
FXDECLARE_ABSTRACT(GNEGeometryPointDialog)
32
33
public:
34
/// @brief constructor
35
GNEGeometryPointDialog(GNEApplicationWindow* applicationWindow, const Position& pos);
36
37
/// @brief destructor
38
~GNEGeometryPointDialog();
39
40
/// @brief get edited position
41
const Position& getEditedPosition() const;
42
43
/// @brief run internal test
44
void runInternalTest(const InternalTestStep::DialogArgument* dialogArgument);
45
46
/// @name FOX-callbacks
47
/// @{
48
49
/// @brief event after change position in TextFields
50
long onCmdChangeGeometryPoint(FXObject* sender, FXSelector sel, void* ptr);
51
52
/// @brief event after press accept button
53
long onCmdAccept(FXObject* sender, FXSelector sel, void* ptr);
54
55
/// @brief event after press cancel button
56
long onCmdCancel(FXObject* sender, FXSelector sel, void* ptr);
57
58
/// @brief event after press cancel button
59
long onCmdReset(FXObject*, FXSelector, void*);
60
61
/// @}
62
63
protected:
64
/// @brief FOX need this
65
GNEGeometryPointDialog();
66
67
/// @brief viewNet
68
GNEViewNet* myViewNet;
69
70
/// @brief text field for X, Y
71
FXTextField* myTextFieldXY = nullptr;
72
73
/// @brief text field for lon, Lat
74
FXTextField* myTextFieldLonLat = nullptr;
75
76
/// @brief edited position
77
Position myEditedPosition;
78
79
/// @brief original position (used for reset)
80
const Position myOriginalPos;
81
82
/// @brief flag for geo
83
const bool myGeo;
84
85
private:
86
/// @brief accept button
87
FXButton* myKeepOldButton = nullptr;
88
89
/// @brief cancel button
90
FXButton* myCancelButton = nullptr;
91
92
/// @brief cancel button
93
FXButton* myResetButton = nullptr;
94
95
/// @brief Invalidated copy constructor
96
GNEGeometryPointDialog(const GNEGeometryPointDialog&) = delete;
97
98
/// @brief Invalidated assignment operator
99
GNEGeometryPointDialog& operator=(const GNEGeometryPointDialog&) = delete;
100
};
101
102