42 #ifdef CHECK_MEMORY_LEAKS 44 #endif // CHECK_MEMORY_LEAKS 65 FXIMPLEMENT(
GNEDialog_Wizard::InputBool, FXHorizontalFrame, InputBoolMap, ARRAYNUMBER(InputBoolMap))
66 FXIMPLEMENT(
GNEDialog_Wizard::InputInt, FXHorizontalFrame, InputIntMap, ARRAYNUMBER(InputIntMap))
67 FXIMPLEMENT(
GNEDialog_Wizard::InputFloat, FXHorizontalFrame, InputFloatMap, ARRAYNUMBER(InputFloatMap))
73 FXDialogBox(parent, name, DECOR_CLOSE | DECOR_TITLE, 0, 0, width, height) {
75 FXVerticalFrame* contentFrame =
new FXVerticalFrame(
this, LAYOUT_FILL_X | LAYOUT_FILL_Y);
77 FXTabBook* tabbook =
new FXTabBook(
78 contentFrame, 0, 0, TABBOOK_LEFTTABS | PACK_UNIFORM_WIDTH | PACK_UNIFORM_HEIGHT | LAYOUT_FILL_X | LAYOUT_FILL_Y | LAYOUT_RIGHT);
80 const std::vector<std::string>& topics = oc.
getSubTopics();
81 for (std::vector<std::string>::const_iterator it_topic = topics.begin(); it_topic != topics.end(); it_topic++) {
82 std::string topic = *it_topic;
83 if (topic ==
"Configuration") {
86 new FXTabItem(tabbook, topic.c_str(), NULL, TAB_LEFT_NORMAL);
87 FXScrollWindow* scrollTab =
new FXScrollWindow(tabbook, LAYOUT_FILL_X | LAYOUT_FILL_Y);
88 FXVerticalFrame* tabContent =
new FXVerticalFrame(scrollTab, FRAME_THICK | FRAME_RAISED | LAYOUT_FILL_X | LAYOUT_FILL_Y);
90 for (std::vector<std::string>::const_iterator it_opt = entries.begin(); it_opt != entries.end(); it_opt++) {
91 std::string name = *it_opt;
93 if (type ==
"STR" || type ==
"FILE") {
95 }
else if (type ==
"BOOL") {
96 new InputBool(tabContent, name);
97 }
else if (type ==
"INT") {
98 new InputInt(tabContent, name);
99 }
else if (type ==
"FLOAT") {
100 new InputFloat(tabContent, name);
107 new FXButton(contentFrame,
"OK\t\tContine with the import.", 0,
this, ID_ACCEPT, LAYOUT_FIX_WIDTH | LAYOUT_CENTER_X | JUSTIFY_CENTER_X | FRAME_THICK | FRAME_RAISED, 0, 0, 50, 30);
117 FXHorizontalFrame(parent, LAYOUT_FILL_X),
120 new FXLabel(
this, name.c_str());
121 myTextField =
new FXTextField(
this, 100,
this,
MID_GNE_SET_ATTRIBUTE, TEXTFIELD_NORMAL | LAYOUT_RIGHT, 0, 0, 0, 0, 4, 2, 0, 2);
122 myTextField->setText(oc.
getString(name).c_str());
136 FXHorizontalFrame(parent, LAYOUT_FILL_X),
139 new FXLabel(
this, name.c_str());
141 myCheck->setCheck(oc.
getBool(name));
155 FXHorizontalFrame(parent, LAYOUT_FILL_X),
158 new FXLabel(
this, name.c_str());
159 myTextField =
new FXTextField(
this, 100,
this,
MID_GNE_SET_ATTRIBUTE, TEXTFIELD_INTEGER | LAYOUT_RIGHT, 0, 0, 0, 0, 4, 2, 0, 2);
174 FXHorizontalFrame(parent, LAYOUT_FILL_X),
177 new FXLabel(
this, name.c_str());
178 myTextField =
new FXTextField(
this, 100,
this,
MID_GNE_SET_ATTRIBUTE, TEXTFIELD_REAL | LAYOUT_RIGHT, 0, 0, 0, 0, 4, 2, 0, 2);
FXDEFMAP(GNEDialog_Wizard::InputString) InputStringMap[]
int getInt(const std::string &name) const
Returns the int-value of the named option (only for Option_Integer)
void resetWritable()
Resets all options to be writeable.
const std::vector< std::string > & getSubTopics() const
return the list of subtopics
~GNEDialog_Wizard()
Destructor.
bool getBool(const std::string &name) const
Returns the boolean-value of the named option (only for Option_Bool)
static OptionsCont & getOptions()
Retrieves the options.
std::string getTypeName(const std::string name)
return the type name for the given option
std::string getString(const std::string &name) const
Returns the string-value of the named option (only for Option_String)
std::string toString(const T &t, std::streamsize accuracy=OUTPUT_ACCURACY)
bool set(const std::string &name, const std::string &value)
Sets the given value for the named option.
std::vector< std::string > getSubTopicsEntries(const std::string &subtopic) const
return the list of entries for the given subtopic
A storage for options typed value containers)
SUMOReal getFloat(const std::string &name) const
Returns the SUMOReal-value of the named option (only for Option_Float)