From a918292547cfb154dec26eeabdf70b4ff026f6be Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Fri, 28 Oct 2022 17:37:18 +0200 Subject: Fix removal and deletion of the resizable() of Fl_Group If the resizable() of an Fl_Group is deleted it is automatically removed from the group. New: to avoid dangling resizable() pointers the resizable widget is set to the group itself. --- FL/Fl_Group.H | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Group.H b/FL/Fl_Group.H index 9f394c833..1f6240070 100644 --- a/FL/Fl_Group.H +++ b/FL/Fl_Group.H @@ -1,7 +1,7 @@ // // Group header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2021 by Bill Spitzak and others. +// Copyright 1998-2022 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -152,6 +152,14 @@ public: dimensions of the box are scaled to the new size. Widgets outside the box are moved. + \note The resizable of a group \b must be one of + - NULL + - the group itself + - a direct child of the group. + \note If you set any other widget that is not a direct child of the group as + its resizable then the behavior is undefined. This is \b not checked by + Fl_Group for historical reasons. + In these examples the gray area is the resizable: \image html resizebox1.png -- cgit v1.2.3