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-2020 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 
23 #include <fx.h>
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  class InputString : public FXHorizontalFrame {
53 
54  public:
56  InputString(FXComposite* parent, const std::string& name);
57 
59  long onCmdSetOption(FXObject*, FXSelector, void*);
60 
61  protected:
62  FOX_CONSTRUCTOR(InputString)
63 
64  private:
66  std::string myName;
67 
69  FXTextField* myTextField;
70  };
71 
72  class InputBool : public FXHorizontalFrame {
75 
76  public:
78  InputBool(FXComposite* parent, const std::string& name);
79 
81  long onCmdSetOption(FXObject*, FXSelector, void*);
82 
83  protected:
84  FOX_CONSTRUCTOR(InputBool)
85 
86  private:
88  std::string myName;
89 
91  FXMenuCheck* myCheck;
92  };
93 
94 
95  class InputInt : public FXHorizontalFrame {
98 
99  public:
101  InputInt(FXComposite* parent, const std::string& name);
102 
104  long onCmdSetOption(FXObject*, FXSelector, void*);
105 
106  protected:
107  FOX_CONSTRUCTOR(InputInt)
108 
109  private:
111  std::string myName;
112 
114  FXTextField* myTextField;
115  };
116 
117  class InputFloat : public FXHorizontalFrame {
120 
121  public:
123  InputFloat(FXComposite* parent, const std::string& name);
124 
126  long onCmdSetOption(FXObject*, FXSelector, void*);
127 
128  protected:
129  FOX_CONSTRUCTOR(InputFloat)
130 
131  private:
133  std::string myName;
134 
136  FXTextField* myTextField;
137  };
138 };
InputBool(FXComposite *parent, const std::string &name)
FOX-declaration.
long onCmdSetOption(FXObject *, FXSelector, void *)
try to set new attribute value
FXMenuCheck * myCheck
menu check
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
InputString(FXComposite *parent, const std::string &name)
FOX-declaration.
FXTextField * myTextField
text field
GUIDialog_Options(FXWindow *parent, const char *titleName, int width, int height)
Constructor.
~GUIDialog_Options()
Destructor.