From 8c24649c40829dd1ce78ca4bbcae0913574ab292 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 16 Jun 2013 00:00:30 +0300 Subject: [PATCH] Support loading dialog action buttons --- source/dialog.cpp | 17 +++++++++++++++++ source/dialog.h | 8 ++++++++ source/panel.h | 2 +- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/source/dialog.cpp b/source/dialog.cpp index cc4c1bf..dba276d 100644 --- a/source/dialog.cpp +++ b/source/dialog.cpp @@ -1,6 +1,8 @@ #include "button.h" #include "dialog.h" +using namespace std; + namespace Msp { namespace GLtk { @@ -35,5 +37,20 @@ void Dialog::response(int code) stale = true; } + +Dialog::Loader::Loader(Dialog &d, WidgetMap &wm): + DerivedObjectLoader(d, wm) +{ + add("action_button", &Loader::action_button); +} + +void Dialog::Loader::action_button(const string &n, int c) +{ + RefPtr