]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/dimension.h
Jean-Marc's fix for wrong descent
[lyx.git] / src / mathed / dimension.h
index ab672568a9eee5eb03bcf884e4b5ab6dd90dfd7a..7edfcaf153eab3f28b9c6c59eeb960e1c2cffa6f 100644 (file)
@@ -1,6 +1,25 @@
+// -*- 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
@@ -12,6 +31,8 @@ public:
        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
@@ -21,7 +42,7 @@ public:
        /// get width
        int width() const { return w; }
 
-public:        
+public:
        /// width
        int w;
        /// ascent
@@ -30,4 +51,6 @@ public:
        int d;
 };
 
+std::ostream & operator<<(std::ostream & os, Dimension const & dim);
+
 #endif