aboutsummaryrefslogtreecommitdiffstats
path: root/src/menu/container.hpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/menu/container.hpp37
1 files changed, 36 insertions, 1 deletions
diff --git a/src/menu/container.hpp b/src/menu/container.hpp
index 147a0d92..0fa4803e 100644
--- a/src/menu/container.hpp
+++ b/src/menu/container.hpp
@@ -45,11 +45,18 @@ namespace usdx
Frame* frame;
std::list<DrawableControl*> controls;
+ /**
+ * Left bottom corner of the container in window coordinats. This is
+ * used for calculating the window coordinates of the containing
+ * controls for clipping, that only works with window coordinates.
+ */
+ Point<int> window_coords;
+ void recalculate_window_coords(void);
+
protected:
Container(Container*, const ContainerHelper&);
virtual void draw(void);
- Point<int> window_coords;
public:
Container(Container*);
@@ -62,6 +69,34 @@ namespace usdx
virtual void removeFrame(void);
const Point<int>& get_window_coords(void) const;
+
+ /**
+ * Overwritten here to be able to recalculate the window coordinates.
+ *
+ * @see window_coords
+ */
+ virtual void set_position(const Point<int>& position);
+
+ /**
+ * Overwritten here to be able to recalculate the window coordinates.
+ *
+ * @see window_coords
+ */
+ virtual void set_position(int left, int top);
+
+ /**
+ * Overwritten here to be able to recalculate the window coordinates.
+ *
+ * @see window_coords
+ */
+ virtual void set_size(const Dimension<int>& size);
+
+ /**
+ * Overwritten here to be able to recalculate the window coordinates.
+ *
+ * @see window_coords
+ */
+ virtual void set_size(int width, int height);
};
};