]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/panel.cpp
Add a missing colon to button.h
[libs/gltk.git] / source / panel.cpp
index efe857ec6860be568acc50b4e37134cd2f85ec44..529ec199183d20e1b31cdb3675b3025450fb4ca5 100644 (file)
@@ -1,4 +1,12 @@
+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2007  Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
 #include <msp/core/refptr.h>
+#include "button.h"
 #include "label.h"
 #include "panel.h"
 #include "part.h"
@@ -23,6 +31,11 @@ Panel::~Panel()
                delete *i;
 }
 
+void Panel::add(Widget &wdg)
+{
+       children.push_back(&wdg);
+}
+
 void Panel::button_press(int x, int y, unsigned btn)
 {
        if(pointer_grab>0)
@@ -88,11 +101,6 @@ void Panel::focus_out()
        set_input_focus(0);
 }
 
-void Panel::add(Widget &wdg)
-{
-       children.push_back(&wdg);
-}
-
 void Panel::render_part(const Part &part) const
 {
        if(part.get_name()=="children")
@@ -148,8 +156,9 @@ Panel::Loader::Loader(Panel &p, map<string, Widget *> &m):
        pnl(p),
        wdg_map(m)
 {
-       add("label", &Loader::child<Label>);
-       add("panel", &Loader::panel);
+       add("button", &Loader::child<Button>);
+       add("label",  &Loader::child<Label>);
+       add("panel",  &Loader::panel);
 }
 
 template<typename T>