Eclipse SUMO - Simulation of Urban MObility
GNEToolDialogElements.h
Go to the documentation of this file.
1/****************************************************************************/
2// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3// Copyright (C) 2001-2022 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// Elements used in GNEToolDialog
19/****************************************************************************/
20#pragma once
21#include <config.h>
22
23#include <fx.h>
24#include <string>
25#include <vector>
26
27
28// ===========================================================================
29// class declaration
30// ===========================================================================
31
32class GNEToolDialog;
33
34// ===========================================================================
35// class definitions
36// ===========================================================================
37
40
41public:
43 class Argument {
44
45 public:
47 Argument(GNEToolDialog* toolDialogParent, const std::string name, const std::string parameter_);
48
50 virtual ~Argument();
51
53 virtual std::string getArgument() const = 0;
54
56 virtual void resetValues() = 0;
57
58 protected:
61
63 const std::string argumentName;
64
66 const std::string parameter;
67
68 private:
70 Argument();
71
73 Argument(const Argument&) = delete;
74
76 Argument& operator=(const Argument&) = delete;
77 };
78
80 class FileNameArgument : protected FXVerticalFrame, protected Argument {
81
82 public:
84 FileNameArgument(FXComposite* parent, GNEToolDialog* toolDialogParent, const std::string name, const std::string parameter);
85
87 std::string getArgument() const;
88
90 void resetValues();
91
92 protected:
94 FXButton* myFilenameButton = nullptr;
95
97 FXTextField* myFilenameTextField = nullptr;
98
99 private:
102
105 };
106
107
109 class Separator : protected FXVerticalFrame {
110
111 public:
113 Separator(FXComposite* parent, const std::string name);
114
115 private:
117 Separator(const Separator&) = delete;
118
120 Separator& operator=(const Separator&) = delete;
121 };
122};
const GNEToolDialog * toolDialogParent
pointer to toolDialog parent
Argument & operator=(const Argument &)=delete
Invalidated assignment operator.
virtual std::string getArgument() const =0
get argument (parameter and value)
Argument(const Argument &)=delete
Invalidated copy constructor.
const std::string argumentName
argument name
virtual void resetValues()=0
reset argument values
const std::string parameter
parameter
FileNameArgument & operator=(const FileNameArgument &)=delete
Invalidated assignment operator.
FileNameArgument(FXComposite *parent, GNEToolDialog *toolDialogParent, const std::string name, const std::string parameter)
constructor
std::string getArgument() const
get argument (parameter and value)
FXTextField * myFilenameTextField
filename Textfield
FileNameArgument(const FileNameArgument &)=delete
Invalidated copy constructor.
Separator & operator=(const Separator &)=delete
Invalidated assignment operator.
Separator(FXComposite *parent, const std::string name)
constructor
Separator(const Separator &)=delete
Invalidated copy constructor.
elements used in Tool Dialogs
Abstract dialog for tools.
Definition: GNEToolDialog.h:40