namespace Msp {
namespace GLtk {
-Dialog::Dialog():
- stale(false)
-{ }
-
void Dialog::add_button(Button &button, int code)
{
add(button);
void Dialog::button_release(int x, int y, unsigned button)
{
Panel::button_release(x, y, button);
- if(stale)
- delete this;
+ check_stale();
}
bool Dialog::key_release(unsigned key, unsigned mod)
{
bool result = Panel::key_release(key, mod);
- if(stale)
- delete this;
+ check_stale();
+ return result;
+}
+
+bool Dialog::navigate(Navigation nav)
+{
+ bool result = Panel::navigate(nav);
+ check_stale();
return result;
}
stale = true;
}
+void Dialog::check_stale()
+{
+ if(stale)
+ delete this;
+}
+
Dialog::Loader::Loader(Dialog &d, WidgetMap &wm):
DerivedObjectLoader<Dialog, Panel::Loader>(d, wm)