+#include <msp/core/refptr.h>
+#include "label.h"
#include "panel.h"
#include "part.h"
+using namespace std;
+
namespace Msp {
namespace GLtk {
}
}
+
+Panel::Loader::Loader(Panel &p, map<string, Widget *> &m):
+ Widget::Loader(p),
+ panel(p),
+ wdg_map(m)
+{
+ add("label", &Loader::child<Label>);
+}
+
+template<typename T>
+void Panel::Loader::child(const string &n)
+{
+ RefPtr<T> chl=new T(panel.res);
+ load_sub(*chl);
+ panel.add(*chl.get());
+ wdg_map[n]=chl.release();
+}
+
} // namespace GLtk
} // namespace Msp