3 This file is part of R²C²
4 Copyright © 2009 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
15 add(*(btn_ok=new GLtk::Button("OK")));
16 btn_ok->set_style("green");
17 btn_ok->set_geometry(GLtk::Geometry(geom.w-40, 10, 30, 25));
18 btn_ok->signal_clicked.connect(sigc::mem_fun(this, &Dialog::on_ok_clicked));
19 btn_ok->signal_clicked.connect(signal_ok);
20 btn_ok->signal_clicked.connect(sigc::mem_fun(this, &Dialog::dismiss));
22 add(*(btn_cancel=new GLtk::Button("Cncl")));
23 btn_cancel->set_style("red");
24 btn_cancel->set_geometry(GLtk::Geometry(geom.w-80, 10, 30, 25));
25 btn_cancel->signal_clicked.connect(signal_cancel);
26 btn_cancel->signal_clicked.connect(sigc::mem_fun(this, &Dialog::dismiss));
29 void Dialog::button_release(int x, int y, unsigned btn)
31 Panel::button_release(x, y, btn);
36 void Dialog::on_geometry_change()
38 btn_ok->set_geometry(GLtk::Geometry(geom.w-40, 10, 30, 25));
39 btn_cancel->set_geometry(GLtk::Geometry(geom.w-80, 10, 30, 25));
42 void Dialog::dismiss()