]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/label.cpp
Enable loading of entry widgets from datafiles
[libs/gltk.git] / source / label.cpp
index d0aba354c9555a86485640e6ded619463d4d1b84..0e0134d73766a4cb5f05830386d772790d6dca7d 100644 (file)
@@ -1,3 +1,10 @@
+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #include "label.h"
 #include "part.h"
 
@@ -16,12 +23,22 @@ void Label::set_text(const std::string &t)
        text=t;
 }
 
-void Label::render_part(const Part &part) const
+void Label::render_special(const Part &part) const
 {
        if(part.get_name()=="text")
                render_text(part, text);
-       else
-               Widget::render_part(part);
+}
+
+
+Label::Loader::Loader(Label &l):
+       Widget::Loader(l)
+{
+       add("text", &Label::text);
+}
+
+Label &Label::Loader::get_object()
+{
+       return static_cast<Label &>(wdg);
 }
 
 } // namespace GLtk