#include "button.h"
#include "dialog.h"
+using namespace std;
+
namespace Msp {
namespace GLtk {
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);
+ wdg_map[n] = btn.release();
+}
+
} // namespace GLtk
} // namespace Msp
class Dialog: public Panel
{
public:
+ class Loader: public DataFile::DerivedObjectLoader<Dialog, Panel::Loader>
+ {
+ public:
+ Loader(Dialog &, WidgetMap &);
+ private:
+ void action_button(const std::string &, int);
+ };
+
sigc::signal<void, int> signal_response;
private: