]> git.tdb.fi Git - libs/gltk.git/blob - source/geometry.cpp
Rework event passing system to allow for pointer grabs
[libs/gltk.git] / source / geometry.cpp
1 #include "geometry.h"
2
3 namespace Msp {
4 namespace GLtk {
5
6 bool Geometry::is_inside(int x_, int y_) const
7 {
8         return (x_>=x && x_<x+static_cast<int>(w) && y_>=y && y_<y+static_cast<int>(h));
9 }
10
11
12 Sides::Sides():
13         top(0),
14         right(0),
15         bottom(0),
16         left(0)
17 { }
18
19
20 Sides::Loader::Loader(Sides &s):
21         sides(s)
22 {
23         add("top",    &Sides::top);
24         add("right",  &Sides::right);
25         add("bottom", &Sides::bottom);
26         add("left",   &Sides::left);
27 }
28
29 } // namespace GLtk
30 } // namespace Msp