summaryrefslogtreecommitdiff
path: root/src/gui/window.h
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-10 11:50:27 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 11:50:27 -0600
commit58ee835c3763e7bf088fa6c7e31dda1d687589cc (patch)
tree2eb06f7ee3fa05af68fb536284497a9967222ad9 /src/gui/window.h
parent5bbf8219bffbb587cf9a23561734c917bb23f42f (diff)
downloadMana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.gz
Mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.bz2
Mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.xz
Mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.zip
Extended window layout to take relative positions, as well as offsets to
that position. This makes it so that when resolutions are changed, the default locations stay relative to the window's position, and not the 800x600 screen resolution. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/window.h')
-rw-r--r--src/gui/window.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/gui/window.h b/src/gui/window.h
index bf15dedb..c24bde76 100644
--- a/src/gui/window.h
+++ b/src/gui/window.h
@@ -34,7 +34,6 @@ class ConfigListener;
class GCContainer;
class ContainerPlacer;
class Image;
-class ImageRect;
class Layout;
class LayoutCell;
class ResizeGrip;
@@ -91,6 +90,11 @@ class Window : public gcn::Window, gcn::WidgetListener
void setLocationRelativeTo(gcn::Widget *widget);
/**
+ * Sets the location relative to the given enumerated position.
+ */
+ void setLocationRelativeTo(ImageRect::ImagePosition position);
+
+ /**
* Sets whether or not the window can be resized.
*/
void setResizable(bool resize);
@@ -247,6 +251,16 @@ class Window : public gcn::Window, gcn::WidgetListener
int defaultWidth, int defaultHeight);
/**
+ * Set the default win pos and size.
+ * (which can be different of the actual ones.)
+ * This version of setDefaultSize sets the window's position based
+ * on a relative enumerated position, rather than a coordinate position.
+ */
+ void setDefaultSize(int defaultWidth, int defaultHeight,
+ ImageRect::ImagePosition position,
+ int offsetx = 0, int offsetY = 0);
+
+ /**
* Reset the win pos and size to default. Don't forget to set defaults
* first.
*/