X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbox.C;h=3a3dc9f2ea18dbac9a5f97886cfd918b9e46f177;hb=a9c2dd92df8c538e6ab39bbd136c2da9a0315eb1;hp=afaba9c63e0a2f4f4b7ff34ba59f6786f149e98e;hpb=08bd49a344b4295698c8891572a03bc6ef4eb5d5;p=lyx.git diff --git a/src/box.C b/src/box.C index afaba9c63e..3a3dc9f2ea 100644 --- a/src/box.C +++ b/src/box.C @@ -8,25 +8,30 @@ // Code moved out of line and out of box.h by Angus (7 Jan 2002) +#include + #include "box.h" #include "support/LOstream.h" using std::ostream; + 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) { return (x1 < x && x2 > x && y1 < y && y2 > y); } - + ostream & operator<<(ostream & o, Box const & b) { return o << "x1,y1: " << b.x1 << "," << b.y1 - << " x2,y2: " << b.x2 << "," << b.y2 << std::endl; + << " x2,y2: " << b.x2 << "," << b.y2 + << std::endl; }