+
+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()
+{
+ RefPtr<T> chl = new T();
+ load_sub(*chl);
+ obj.add(*chl.get());
+ last_widget = chl.release();
+}
+
+
+template<typename T>
+void Panel::Loader::AddChildType<T>::add(Loader &ldr, const std::string &kwd)
+{
+ ldr.add(kwd, &Loader::child<T>);
+ ldr.add(kwd, &Loader::unnamed_child<T>);
+}
+