From 405ac4d6193635ae6ee7dacb6ecd6b098fe84c42 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Wed, 18 Sep 2019 00:03:02 +0300 Subject: [PATCH] Use a LoadableTypeRegistry to manage child types for Panel --- source/panel.cpp | 57 +++++++++++++++++++----------------------------- source/panel.h | 49 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 69 insertions(+), 37 deletions(-) diff --git a/source/panel.cpp b/source/panel.cpp index 97e13a2..11c19f3 100644 --- a/source/panel.cpp +++ b/source/panel.cpp @@ -24,6 +24,9 @@ using namespace std; namespace Msp { namespace GLtk { +DataFile::LoadableTypeRegistry Panel::widget_registry; +bool Panel::widget_registry_init_done = false; + Panel::Panel(): layout(0) { @@ -210,34 +213,33 @@ Panel::Loader::Loader(Panel &p, map &m): wdg_map(m), last_widget(0) { - add_child_type