Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2009-04-14 20:16:08 +0000
committerStijn Buys <ingar@osirion.org>2009-04-14 20:16:08 +0000
commit3c28f22ae9aabf72a0776daada4fa64ec74104dc (patch)
tree437cb8d9d0b55bcf61e880c8243072115a2d0fb1 /src/ui/widget.h
parent7aa5596ed61b96e356c47e5a7028b62d165df825 (diff)
added widget.bottom() and widget.right() geometry inspectors
Diffstat (limited to 'src/ui/widget.h')
-rw-r--r--src/ui/widget.h26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/ui/widget.h b/src/ui/widget.h
index acee725..d8969cc 100644
--- a/src/ui/widget.h
+++ b/src/ui/widget.h
@@ -50,21 +50,39 @@ public:
return widget_size;
}
- /// left coordinate of location()
+ /// x coordinate of the left of the widget
/**
- * @see location
+ * @see location()
*/
inline float left() const {
return widget_location.x;
}
+
+ /// x coordinate of the right of the widget
+ /**
+ * @see location()
+ * @see size()
+ */
+ inline float right() const {
+ return widget_location.x + widget_size.x;
+ }
- /// top coordinate of location()
+ /// y coordinate of the top of the widget
/**
- * @see location
+ * @see location()
*/
inline float top() const {
return widget_location.y;
}
+
+ /// y coordinate of the bottom of the widget
+ /**
+ * @see location()
+ * @see size()
+ */
+ inline float bottom() const {
+ return widget_location.y + widget_size.y;
+ }
/// width of the widget in pixels
/**