From 8673c5ac28028c39328ae1c08c16dbc2f8089a4a Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Tue, 24 Nov 2020 21:20:25 +0100 Subject: [PATCH] Forgot this. --- src/frontends/CaretGeometry.h | 52 +++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 src/frontends/CaretGeometry.h diff --git a/src/frontends/CaretGeometry.h b/src/frontends/CaretGeometry.h new file mode 100644 index 0000000000..86786e14be --- /dev/null +++ b/src/frontends/CaretGeometry.h @@ -0,0 +1,52 @@ +// -*- C++ -*- +/** + * \file CaretGeometry.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Jean-Marc Lasgouttes + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef CARETGEOMETRY_H +#define CARETGEOMETRY_H + +#include "Dimension.h" + +#include +#include + +namespace lyx { + +namespace frontend { + +/** + * CaretGeometry - Data for painting the caret + */ +struct CaretGeometry { + /// + int height() const { return bottom - top; } + /// + int width() const { return right - left; } + + // A polygon + typedef std::vector Shape; + // several polygons + typedef std::list Shapes; + // data for pointer + Shapes shapes; + // left-most abcissa + int left = 0; + // right-most abcissa + int right = 0; + // top value + int top = 0; + // bottom value + int bottom = 0; +}; + +} // namespace frontend +} // namespace lyx + +#endif // CARETGEOMETRY_H