X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbox.C;h=aae0bf10ea47193dca8f736446c127b4df117c7a;hb=e28331ed63062dea10d0a21b9ec12034b4b17b9a;hp=3a3dc9f2ea18dbac9a5f97886cfd918b9e46f177;hpb=dd9b8de435497ce405d5dd1615dc2dc2d3ab3e63;p=lyx.git diff --git a/src/box.C b/src/box.C index 3a3dc9f2ea..aae0bf10ea 100644 --- a/src/box.C +++ b/src/box.C @@ -1,9 +1,11 @@ /** * \file box.C - * Copyright 2001 the LyX Team - * Read the file COPYING + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. * - * \author John Levon + * \author John Levon + * + * Full author contact details are available in file CREDITS. */ // Code moved out of line and out of box.h by Angus (7 Jan 2002) @@ -12,26 +14,36 @@ #include "box.h" -#include "support/LOstream.h" +#include "support/std_ostream.h" + + +namespace lyx { using std::ostream; -Box::Box(int x1_, int x2_, int y1_, int y2_) : - x1(x1_), x2(x2_), y1(y1_), y2(y2_) +Box::Box() + : x1(0), x2(0), y1(0), y2(0) +{} + + +Box::Box(int x1_, int x2_, int y1_, int y2_) + : x1(x1_), x2(x2_), y1(y1_), y2(y2_) {} -bool Box::contained(int x, int y) +bool Box::contains(int x, int y) { - return (x1 < x && x2 > x && - y1 < y && y2 > y); + return (x1 < x && x2 > x && y1 < y && y2 > y); } -ostream & operator<<(ostream & o, Box const & b) +ostream & operator<<(ostream & os, Box const & b) { - return o << "x1,y1: " << b.x1 << "," << b.y1 - << " x2,y2: " << b.x2 << "," << b.y2 + return os << "x1,y1: " << b.x1 << ',' << b.y1 + << " x2,y2: " << b.x2 << ',' << b.y2 << std::endl; } + + +} // namespace lyx