3 * Copyright 2001 the LyX Team
4 * Read the file COPYING
6 * \author John Levon <moz@compsoc.man.ac.uk>
13 * A simple class representing rectangular regions.
14 * It is expected that the box be constructed in
15 * normalised form, that is to say : x1,y1 is top-left,
16 * x2,y2 is bottom-right.
24 Box(unsigned int x1_, unsigned int x2_,
25 unsigned int y1_, unsigned int y2_) :
26 x1(x1_), x2(x2_), y1(y1_), y2(y2_) {}
29 * Returns true if the given co-ordinates are within
30 * the box. Check is exclusive (point on a border
33 bool contained(unsigned int x, unsigned int y) {
34 return (x1 < x && x2 > x &&