From b8bb8c795ca166dc46103c77f51157399b3f8021 Mon Sep 17 00:00:00 2001 From: Jarod42 Date: Thu, 5 Sep 2024 00:40:06 +0200 Subject: [PATCH] Apply Guichan's changes from ac25684370f72e5e204bd994fd736e630fb8425a (Sept 15th 2008) Documentation of Widget::getChildrenArea has been enhanced. --- TODO | 2 +- include/guisan/widget.hpp | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/TODO b/TODO index 706fa88..4d6bcd8 100644 --- a/TODO +++ b/TODO @@ -1,4 +1,4 @@ -* Continue rebasing from ac25684370f72e5e204bd994fd736e630fb8425a +* Continue rebasing from 8075bee1c45ba7221ebdc127d0413628591622c6 * Add a focus listener interface. * Make focus apply synchronously. * Graphics and input objects for DirectX. diff --git a/include/guisan/widget.hpp b/include/guisan/widget.hpp index a046a0d..f1b1531 100644 --- a/include/guisan/widget.hpp +++ b/include/guisan/widget.hpp @@ -861,9 +861,23 @@ namespace gcn virtual const std::list& _getFocusListeners(); /** - * Gets the area of the widget that the widget's children occupy. - * - * @return The area of the widget that the widget's children occupy. + * Gets the area of the widget occupied by the widget's children. + * By default this method returns an empty rectangle as not all + * widgets are containers. If you want to make a container this + * method should return the area where the children resides. This + * method is used when drawing children of a widget when computing + * clip rectangles for the children. + * + * An example of a widget that overloads this method is ScrollArea. + * A ScrollArea has a view of its contant and that view is the + * children area. The size of a ScrollArea's children area might + * vary depending on if the scroll bars of the ScrollArea is shown + * or not. + * + * @return The area of the widget occupied by the widget's children. + * @see BasicContainer + * @see BasicContainer::getChildrenArea + * @see BasicContainer::drawChildren * @since 0.1.0 */ virtual Rectangle getChildrenArea();