summaryrefslogtreecommitdiffstats
path: root/include/ui/Rect.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/ui/Rect.h')
-rw-r--r--include/ui/Rect.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/ui/Rect.h b/include/ui/Rect.h
index da72944..a213c09 100644
--- a/include/ui/Rect.h
+++ b/include/ui/Rect.h
@@ -30,6 +30,8 @@ public:
int right;
int bottom;
+ typedef int value_type;
+
// we don't provide copy-ctor and operator= on purpose
// because we want the compiler generated versions
@@ -46,7 +48,11 @@ public:
}
void makeInvalid();
-
+
+ inline void clear() {
+ left = top = right = bottom = 0;
+ }
+
// a valid rectangle has a non negative width and height
inline bool isValid() const {
return (width()>=0) && (height()>=0);