X-Git-Url: http://git.tdb.fi/?p=libs%2Fgltk.git;a=blobdiff_plain;f=source%2Fpanel.h;h=09096f75c0b06855d3879f517702cde14245b4a2;hp=9d969ff4e5f6ddc7d4cd62ac01e9a67e5f17fb92;hb=6deafc9f236b90175a303944815f7c0eac1c95c1;hpb=999cd0294889e5eecd61df18a697d2c55ed6c0d6 diff --git a/source/panel.h b/source/panel.h index 9d969ff..09096f7 100644 --- a/source/panel.h +++ b/source/panel.h @@ -1,7 +1,7 @@ #ifndef MSP_GLTK_PANEL_H_ #define MSP_GLTK_PANEL_H_ -#include +#include #include "container.h" #include "layout.h" @@ -25,7 +25,7 @@ public: template 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 nav_order; Layout *layout; - static DataFile::LoadableTypeRegistry widget_registry; + static TypeRegistry widget_registry; static bool widget_registry_init_done; Panel(const Panel &); @@ -126,7 +126,7 @@ void Panel::Loader::unnamed_child() template -void Panel::Loader::AddChildType::add(Loader &ldr, const std::string &kwd) +void Panel::Loader::AddChildType::operator()(const std::string &kwd, Loader &ldr) const { ldr.add(kwd, &Loader::child); ldr.add(kwd, &Loader::unnamed_child);