]> git.lyx.org Git - lyx.git/blob - src/box.C
go through horrendous contortions to work around font breakage in every
[lyx.git] / src / box.C
1 /**
2  * \file box.C
3  * Copyright 2001 the LyX Team
4  * Read the file COPYING
5  *
6  * \author John Levon <moz@compsoc.man.ac.uk>
7  */
8
9 // Code moved out of line and out of box.h by Angus (7 Jan 2002)
10
11 #include <config.h>
12
13 #include "box.h"
14
15 #include "support/LOstream.h"
16
17 using std::ostream;
18
19
20 Box::Box(int x1_, int x2_, int y1_, int y2_) :
21         x1(x1_), x2(x2_), y1(y1_), y2(y2_)
22 {}
23
24
25 bool Box::contained(int x, int y)
26 {
27         return (x1 < x && x2 > x &&
28                 y1 < y && y2 > y);
29 }
30
31
32 ostream & operator<<(ostream & o, Box const & b)
33 {
34         return o << "x1,y1: " << b.x1 << ',' << b.y1
35                  << " x2,y2: " << b.x2 << ',' << b.y2
36                  << std::endl;
37 }