]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/dimension.h
Fix.
[lyx.git] / src / mathed / dimension.h
index a65893aef6b654750f3f45473c9026fde149a4f2..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,14 +31,18 @@ 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
        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
@@ -28,4 +51,6 @@ public:
        int d;
 };
 
+std::ostream & operator<<(std::ostream & os, Dimension const & dim);
+
 #endif