From 75668f13e61ef137d1835b3d60e6de9a7a9ecb42 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sun, 19 Dec 2004 00:06:24 +0000 Subject: Implemented setLocationRelativeTo method on Window allowing the dialogs to be centered on screen. --- src/gui/window.h | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'src/gui/window.h') diff --git a/src/gui/window.h b/src/gui/window.h index 8b9f983e..a51a150c 100644 --- a/src/gui/window.h +++ b/src/gui/window.h @@ -68,10 +68,30 @@ class Window : public gcn::Container, public gcn::MouseListener void add(gcn::Widget *w, int x, int y); /** - * Set the dimension of the window contents. + * Sets the dimension of the window contents. */ void setDimension(const gcn::Rectangle& dimension); + /** + * Sets the width of the window contents. + */ + void setWidth(int width); + + /** + * Sets the height of the window contents. + */ + void setHeight(int height); + + /** + * Sets the location relative to the given widget. + */ + void setLocationRelativeTo(gcn::Widget* widget); + + /** + * Sets the size of this window. + */ + void setSize(int width, int height); + // Mouse handling void mousePress(int mx, int my, int button); -- cgit v1.2.3-70-g09d2