From b520ccf825f5076994131c441915fbd3c812426a Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Fri, 23 Nov 2012 20:53:35 +0100 Subject: menu/container: add window_coords_change The children container of a container have to be notified if the window coordinates of the parent changed. The children have to recalculate their own window coordinates. --- src/menu/container.hpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/menu/container.hpp') diff --git a/src/menu/container.hpp b/src/menu/container.hpp index ac7d6129..f9eeacd5 100644 --- a/src/menu/container.hpp +++ b/src/menu/container.hpp @@ -26,6 +26,7 @@ #define CONTAINER_HPP #include +#include #include #include "drawable_control.hpp" @@ -51,6 +52,14 @@ namespace usdx Point window_coords; void recalculate_window_coords(void); + /** + * Connection to recieve window coordinate changes from parent + * container. + */ + boost::signals2::connection window_coords_connection; + + void init(Container* parent); + protected: Container(Container*, const ContainerHelper&); @@ -95,6 +104,11 @@ namespace usdx * @see window_coords */ virtual void set_size(int width, int height); + + /** + * This signal gets emitted, if the window coordinates are changed. + */ + boost::signals2::signal window_coords_change; }; }; -- cgit v1.2.3