projects
/
winnie
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
*in progress*
[winnie]
/
src
/
window.cc
diff --git
a/src/window.cc
b/src/window.cc
index
880a6ed
..
84d1004
100644
(file)
--- a/
src/window.cc
+++ b/
src/window.cc
@@
-22,6
+22,17
@@
const Rect &Window::get_rect() const
return rect;
}
return rect;
}
+bool Window::contains_point(int ptr_x, int ptr_y)
+{
+ if((rect.x <= ptr_x) && ((rect.x + rect.width) >= ptr_x)) {
+ if((rect.y <= ptr_y) && (ptr_y <= (rect.y + rect.height))) {
+ return true;
+ }
+ }
+
+ return false;
+}
+
void Window::move(int x, int y)
{
invalidate(); // moved, should redraw, MUST BE CALLED FIRST
void Window::move(int x, int y)
{
invalidate(); // moved, should redraw, MUST BE CALLED FIRST