3 This file is part of the MSP Märklin suite
4 Copyright © 2009 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
12 Dialog::Dialog(const GLtk::Resources &r):
17 add(*(btn_ok=new GLtk::Button(res, "OK")));
18 btn_ok->set_style("green");
19 btn_ok->set_geometry(GLtk::Geometry(geom.w-40, 10, 30, 25));
20 btn_ok->signal_clicked.connect(sigc::mem_fun(this, &Dialog::on_ok_clicked));
21 btn_ok->signal_clicked.connect(signal_ok);
22 btn_ok->signal_clicked.connect(sigc::mem_fun(this, &Dialog::dismiss));
24 add(*(btn_cancel=new GLtk::Button(res, "Cncl")));
25 btn_cancel->set_style("red");
26 btn_cancel->set_geometry(GLtk::Geometry(geom.w-80, 10, 30, 25));
27 btn_cancel->signal_clicked.connect(signal_cancel);
28 btn_cancel->signal_clicked.connect(sigc::mem_fun(this, &Dialog::dismiss));
31 void Dialog::button_release(int x, int y, unsigned btn)
33 Panel::button_release(x, y, btn);
38 void Dialog::on_geometry_change()
40 btn_ok->set_geometry(GLtk::Geometry(geom.w-40, 10, 30, 25));
41 btn_cancel->set_geometry(GLtk::Geometry(geom.w-80, 10, 30, 25));
44 void Dialog::dismiss()