Prepare ANNOUNCE and NEWS for rc2
[lyx.git] / src / Box.h
blobc362fa6a387e3deb2f14b42025ed9a07fa131e65
1 // -*- C++ -*-
2 /**
3 * \file Box.h
4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author John Levon
9 * Full author contact details are available in file CREDITS.
12 #ifndef BOX_H
13 #define BOX_H
15 #include "support/strfwd.h"
18 namespace lyx {
20 /**
21 * A simple class representing rectangular regions.
22 * It is expected that the box be constructed in
23 * normalised form, that is to say : x1,y1 is top-left,
24 * x2,y2 is bottom-right.
26 * Negative values are allowed.
28 class Box {
29 public:
30 int x1;
31 int x2;
32 int y1;
33 int y2;
35 /// Zero-initialise the member variables.
36 Box();
37 /// Initialise the member variables.
38 Box(int x1_, int x2_, int y1_, int y2_);
40 /**
41 * Returns true if the given co-ordinates are within
42 * the box. Check is exclusive (point on a border
43 * returns false).
45 bool contains(int x, int y);
49 std::ostream & operator<<(std::ostream &, Box const &);
52 } // namespace lyx
54 #endif // BOX_H