30 StringComboBoxPtr rns =
new StringComboBox;
31 rns->name = std::move(name);
32 rns->options = std::move(options);
33 rns->defaultIndex = 0;
39 std::vector<std::string> options,
40 const std::set<std::string>& preferredSet)
43 for (std::size_t i = 0; i < rns->options.size(); ++i)
45 if (preferredSet.count(rns->options.at(i)))
47 rns->defaultIndex = i;
56 std::vector<std::string> options,
57 const std::string& mostPreferred)
60 for (std::size_t i = 0; i < rns->options.size(); ++i)
62 if (mostPreferred == rns->options.at(i))
64 rns->defaultIndex = i;
73 std::vector<std::string> options,
74 const std::set<std::string>& preferredSet,
75 const std::string& mostPreferred)
77 StringComboBoxPtr rns =
79 for (std::size_t i = 0; i < rns->options.size(); ++i)
81 if (mostPreferred == rns->options.at(i))
83 rns->defaultIndex = i;