Eclipse SUMO - Simulation of Urban MObility
GUIDialog_Options.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 // A Dialog for setting options (see OptionsCont)
19 /****************************************************************************/
20 #pragma once
21 #include <config.h>
22 
24 
25 
26 // ===========================================================================
27 // class definitions
28 // ===========================================================================
33 class GUIDialog_Options : public FXDialogBox {
34 public:
42  GUIDialog_Options(FXWindow* parent, const char* titleName, int width, int height);
43 
46 
47  // ===========================================================================
48  // Option input classes
49  // ===========================================================================
50 
51  class InputString : public FXHorizontalFrame {
54 
55  public:
57  InputString(FXComposite* parent, const std::string& name);
58 
60  long onCmdSetOption(FXObject*, FXSelector, void*);
61 
62  protected:
63  FOX_CONSTRUCTOR(InputString)
64 
65  private:
67  std::string myName;
68 
70  FXTextField* myTextField;
71  };
72 
73  class InputStringVector : public FXHorizontalFrame {
76 
77  public:
79  InputStringVector(FXComposite* parent, const std::string& name);
80 
82  long onCmdSetOption(FXObject*, FXSelector, void*);
83 
84  protected:
85  FOX_CONSTRUCTOR(InputStringVector)
86 
87  private:
89  std::string myName;
90 
92  FXTextField* myTextField;
93  };
94 
95  class InputBool : public FXHorizontalFrame {
98 
99  public:
101  InputBool(FXComposite* parent, const std::string& name);
102 
104  long onCmdSetOption(FXObject*, FXSelector, void*);
105 
106  protected:
107  FOX_CONSTRUCTOR(InputBool)
108 
109  private:
111  std::string myName;
112 
114  FXMenuCheck* myCheck;
115  };
116 
117 
118  class InputInt : public FXHorizontalFrame {
120  FXDECLARE(GUIDialog_Options::InputInt)
121 
122  public:
124  InputInt(FXComposite* parent, const std::string& name);
125 
127  long onCmdSetOption(FXObject*, FXSelector, void*);
128 
129  protected:
130  FOX_CONSTRUCTOR(InputInt)
131 
132  private:
134  std::string myName;
135 
137  FXTextField* myTextField;
138  };
139 
140  class InputIntVector : public FXHorizontalFrame {
143 
144  public:
146  InputIntVector(FXComposite* parent, const std::string& name);
147 
149  long onCmdSetOption(FXObject*, FXSelector, void*);
150 
151  protected:
152  FOX_CONSTRUCTOR(InputIntVector)
153 
154  private:
156  std::string myName;
157 
159  FXTextField* myTextField;
160  };
161 
162  class InputFloat : public FXHorizontalFrame {
165 
166  public:
168  InputFloat(FXComposite* parent, const std::string& name);
169 
171  long onCmdSetOption(FXObject*, FXSelector, void*);
172 
173  protected:
174  FOX_CONSTRUCTOR(InputFloat)
175 
176  private:
178  std::string myName;
179 
181  FXTextField* myTextField;
182  };
183 
184  class InputFilename : public FXHorizontalFrame {
187 
188  public:
190  InputFilename(FXComposite* parent, const std::string& name);
191 
193  long onCmdSetOption(FXObject*, FXSelector, void*);
194 
195  protected:
196  FOX_CONSTRUCTOR(InputFilename)
197 
198  private:
200  std::string myName;
201 
203  FXTextField* myTextField;
204  };
205 };
InputBool(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
FXMenuCheck * myCheck
menu check
InputFilename(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
FXTextField * myTextField
text field
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
InputFloat(FXComposite *parent, const std::string &name)
FOX-declaration.
FXTextField * myTextField
text field
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
FXTextField * myTextField
text field
InputInt(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
FXTextField * myTextField
text field
InputIntVector(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
InputString(FXComposite *parent, const std::string &name)
FOX-declaration.
FXTextField * myTextField
text field
InputStringVector(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
GUIDialog_Options(FXWindow *parent, const char *titleName, int width, int height)
Constructor.
~GUIDialog_Options()
Destructor.