]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/dialog.cpp
Minor style fixes
[libs/gltk.git] / source / dialog.cpp
index 5a03102f463dd8b551e5606253c2b0426aa683a4..2342e8483786b6ce5eba91f1a6c497290a70f7da 100644 (file)
@@ -1,13 +1,8 @@
-/* $Id$
-
-This file is part of libmspgltk
-Copyright © 2010  Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
 #include "button.h"
 #include "dialog.h"
 
+using namespace std;
+
 namespace Msp {
 namespace GLtk {
 
@@ -42,5 +37,20 @@ void Dialog::response(int code)
        stale = true;
 }
 
+
+Dialog::Loader::Loader(Dialog &d, WidgetMap &wm):
+       DerivedObjectLoader<Dialog, Panel::Loader>(d, wm)
+{
+       add("action_button", &Loader::action_button);
+}
+
+void Dialog::Loader::action_button(const string &n, int c)
+{
+       RefPtr<Button> btn = new Button();
+       load_sub(*btn);
+       obj.add_button(*btn.get(), c);
+       last_widget = wdg_map[n] = btn.release();
+}
+
 } // namespace GLtk
 } // namespace Msp