+
+template<typename T>
+void Panel::register_child_type(const std::string &name)
+{
+ widget_registry.register_type<T>(name);
+}
+
+
+template<typename T>
+void Panel::Loader::child(const std::string &n)
+{
+ unnamed_child<T>();
+ wdg_map[n] = last_widget;
+}
+
+template<typename T>
+void Panel::Loader::unnamed_child()
+{
+ std::unique_ptr<T> chl = std::make_unique<T>();
+ load_sub(*chl);
+ obj.add(*chl.get());
+ last_widget = chl.release();
+}
+
+
+template<typename T>
+void Panel::Loader::AddChildType<T>::operator()(const std::string &kwd, Loader &ldr) const
+{
+ ldr.add(kwd, &Loader::child<T>);
+ ldr.add(kwd, &Loader::unnamed_child<T>);
+}
+