-#ifdef __GNUG__
-#pragma interface
-#endif
-
-#include "LString.h"
-
-/// LyXLength Class
-class LyXLength {
-public:
- /// length units
- enum UNIT {
- /// Scaled point (65536sp = 1pt) TeX's smallest unit.
- SP,
- /// Point = 1/72.27in = 0.351mm
- PT,
- /// Big point (72bp = 1in), also PostScript point
- BP,
- /// Didot point = 1/72 of a French inch, = 0.376mm
- DD,
- /// Millimeter = 2.845pt
- MM,
- /// Pica = 12pt = 4.218mm
- PC,
- /// Cicero = 12dd = 4.531mm
- CC,
- /// Centimeter = 10mm = 2.371pc
- CM,
- /// Inch = 25.4mm = 72.27pt = 6.022pc
- IN,
- /// Height of a small "x" for the current font.
- EX,
- /// Width of capital "M" in current font.
- EM,
- /// Math unit (18mu = 1em) for positioning in math mode
- MU,
- /// no unit
- UNIT_NONE
- };
-
- //@Man: constructors
- //@{
- ///
- LyXLength() : val(0), uni(LyXLength::PT) {}
- LyXLength(float v, LyXLength::UNIT u) : val(v), uni(u) {}
-
- /** "data" must be a decimal number, followed by a unit. */
- LyXLength(string const & data);
- //@}
-
- //@Man: selectors
- //@{
- ///
- float value() const { return val; };
- ///
- LyXLength::UNIT unit() const { return uni; };
- //@}
-
- ///
- bool operator== (LyXLength const &) const;