Hi all,
I seem to be having some memory management issue
involved with exit processing, which has led me
to the question in the comment below. Basically,
I'm wondering if I can assume that a window must be
in a consistent state when it's callback is run.
TIA,
Stan
class Window : public Fl_Double_Window {
// lots of internal state here
public:
Window(int x, int y, int w, int h, char const* label = 0)
: Fl_Double_Window(x, y, w, h, label)
{ callback(exit_cb, this); }
Window(int w, int h, char const* label = 0)
: Fl_Double_Window(w, h, label)
{ callback(exit_cb, this); }
static void exit_cb(Fl_Widget*, void* self)
{ static_cast<Window*>(self)->do_exit(); }
private:
void do_exit()
{
// What is the condition of 'this' here?
// Has it been deleted? Does it matter if
// we got here because the user pressed the 'x'
// on the window border?
}
};
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk