]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.h
Adjust things to conform to changes in other libraries
[libs/gltk.git] / source / panel.h
index 9d969ff4e5f6ddc7d4cd62ac01e9a67e5f17fb92..09096f75c0b06855d3879f517702cde14245b4a2 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef MSP_GLTK_PANEL_H_
 #define MSP_GLTK_PANEL_H_
 
-#include <msp/datafile/loadabletyperegistry.h>
+#include <msp/core/typeregistry.h>
 #include "container.h"
 #include "layout.h"
 
@@ -25,7 +25,7 @@ public:
                template<typename T>
                struct AddChildType
                {
-                       static void add(Loader &, const std::string &);
+                       void operator()(const std::string &, Loader &) const;
                };
 
                WidgetMap &wdg_map;
@@ -68,7 +68,7 @@ protected:
        std::vector<Widget *> nav_order;
        Layout *layout;
 
-       static DataFile::LoadableTypeRegistry<Loader, Loader::AddChildType> widget_registry;
+       static TypeRegistry<Loader::AddChildType, Loader &> widget_registry;
        static bool widget_registry_init_done;
 
        Panel(const Panel &);
@@ -126,7 +126,7 @@ void Panel::Loader::unnamed_child()
 
 
 template<typename T>
-void Panel::Loader::AddChildType<T>::add(Loader &ldr, const std::string &kwd)
+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>);