tufte layout files:
[lyx.git] / src / Box.cpp
bloba3461ef3ea56baea7109ac16b6b188a549f85724
1 /**
2 * \file Box.cpp
3 * This file is part of LyX, the document processor.
4 * Licence details can be found in the file COPYING.
6 * \author John Levon
8 * Full author contact details are available in file CREDITS.
9 */
11 // Code moved out of line and out of Box.h by Angus (7 Jan 2002)
13 #include <config.h>
15 #include "Box.h"
17 #include <ostream>
19 using namespace std;
21 namespace lyx {
24 Box::Box()
25 : x1(0), x2(0), y1(0), y2(0)
29 Box::Box(int x1_, int x2_, int y1_, int y2_)
30 : x1(x1_), x2(x2_), y1(y1_), y2(y2_)
34 bool Box::contains(int x, int y)
36 return (x1 < x && x2 > x && y1 < y && y2 > y);
40 ostream & operator<<(ostream & os, Box const & b)
42 return os << "x1,y1: " << b.x1 << ',' << b.y1
43 << " x2,y2: " << b.x2 << ',' << b.y2
44 << endl;
48 } // namespace lyx