X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fbox.h;h=6ba0997205e7893af0c5b290059b917a7dd0c857;hb=98c966c64594611e469313314abd1e59524adb4a;hp=8a53c737a76757919b9759a1dc357234f5fa93ab;hpb=22c088071d45822551069b9b616e3d87f66666e3;p=lyx.git diff --git a/src/box.h b/src/box.h index 8a53c737a7..6ba0997205 100644 --- a/src/box.h +++ b/src/box.h @@ -1,3 +1,4 @@ +// -*- C++ -*- /** * \file box.h * Copyright 2001 the LyX Team @@ -9,7 +10,7 @@ #ifndef BOX_H #define BOX_H -#include "support/LOstream.h" +#include /** * A simple class representing rectangular regions. @@ -25,27 +26,18 @@ struct Box { int y1; int y2; - Box(int x1_, int x2_, - int y1_, int y2_) : - x1(x1_), x2(x2_), y1(y1_), y2(y2_) {} + /// Initialise the member variables. + Box(int x1_, int x2_, int y1_, int y2_); /** * Returns true if the given co-ordinates are within * the box. Check is exclusive (point on a border * returns false). */ - bool contained(int x, int y) { - return (x1 < x && x2 > x && - y1 < y && y2 > y); - } - - + bool contained(int x, int y); }; - -inline std::ostream & operator<<(std::ostream & o, Box & b) -{ - return o << "x1,y1: " << b.x1 << "," << b.y1 - << " x2,y2: " << b.x2 << "," << b.y2 << std::endl; -} - + + +std::ostream & operator<<(std::ostream &, Box const &); + #endif // BOX_H