Managing a bunch of resizable windows

18 views
Skip to first unread message

Norman Goldstein

unread,
Jun 28, 2014, 11:35:38 PM6/28/14
to fltkg...@googlegroups.com
I have a bunch of resizeable windows that I would like to close programmatically, and have tried two approaches:

1. Keep a list of the window pointers, and then call delete_widget() for each one, when asked to close the lot.  However, this is problematic, since the user may have closed one already, and then I would end up calling delete_widget() on a dangling pointer.

2. Add all the windows to a group.  However, the windows do not resize properly, and I have since read that at most one member of a group can be resizeable.

??  Thanks for any suggestions ...

Norman Goldstein

unread,
Jun 29, 2014, 12:30:03 AM6/29/14
to fltkg...@googlegroups.com
As a follow-up, I have gone further with option #1 (the list) by using Fl:first_window() and Fl::next_window() to check that a pointer in the list is valid, before calling delete_widget() on it.  But, would prefer a solution along the lines of #2 i.e. fltk does all the book-keeping.


Reply all
Reply to author
Forward
0 new messages