+// -*- C++ -*-
+
+/**
+ * \file dimension.h
+ *
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
+
#ifndef DIMENSION_H
#define DIMENSION_H
+
+#include <iosfwd>
+
+class LyXFont;
+
+/// Simple wrapper around three ints
class Dimension {
public:
/// constructor
void operator+=(Dimension const & dim);
/// set to empty box
void clear() { w = a = d = 0; }
+ /// set to empty box suitble for given font
+ void clear(LyXFont const & font);
/// get height
int height() const { return a + d; }
/// get ascent
int ascent() const { return a; }
+ /// get descent
+ int descent() const { return d; }
/// get width
int width() const { return w; }
-public:
+public:
/// width
int w;
/// ascent
int d;
};
+std::ostream & operator<<(std::ostream & os, Dimension const & dim);
+
#endif