]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dropdown.cpp
Enable loading dropdown items from datafile
[libs/gltk.git] / source / dropdown.cpp
index bc44f27c3ec774a4b982ea9ab72c5dbf5bf40e71..5f49b9ef33396dea8cd8141d92dcfe52386f9cfd 100644 (file)
@@ -116,5 +116,17 @@ void Dropdown::list_item_selected(unsigned index, const std::string &item)
        signal_item_selected.emit(index, item);
 }
 
+
+Dropdown::Loader::Loader(Dropdown &d):
+       Widget::Loader(d)
+{
+       add("item", &Loader::item);
+}
+
+void Dropdown::Loader::item(const string &str)
+{
+       static_cast<Dropdown &>(wdg).append(str);
+}
+
 } // namespace GLtk
 } // namespace Msp