-protected:
- ///
- float val;
- ///
- LyXLength::UNIT uni;
-};
-
-extern LyXLength::UNIT unitFromString (string const & data);
-extern bool isValidLength(string const & data, LyXLength * result);
-
-/// LyXGlueLength class
-class LyXGlueLength : public LyXLength {
-public:
- //@Man: constructors
- //@{
- ///
- LyXGlueLength(float v, LyXLength::UNIT u,
- float pv= 0.0, LyXLength::UNIT pu= LyXLength::UNIT_NONE,
- float mv= 0.0, LyXLength::UNIT mu= LyXLength::UNIT_NONE)
- : LyXLength (v, u),
- plus_val(pv), minus_val(mv),
- plus_uni(pu), minus_uni(mu) {}
-
- /** "data" must be a decimal number, followed by a unit, and
- optional "glue" indicated by "+" and "-". You may abbreviate
- reasonably. Examples:
- 1.2 cm // 4mm +2pt // 2cm -4mm +2mm // 4+0.1-0.2cm
- The traditional Latex format is also accepted, like
- 4cm plus 10pt minus 10pt */
- LyXGlueLength(string const & data);
- //@}
-
- //@Man: selectors
- //@{
- ///
- float plusValue() const { return plus_val; };
- ///
- LyXLength::UNIT plusUnit() const { return plus_uni; };
- ///
- float minusValue() const { return minus_val; };
- ///
- LyXLength::UNIT minusUnit() const { return minus_uni; };
- //@}
-
- ///
- bool operator == (LyXGlueLength const &) const;
+ /// return the type of vertical space
+ vspace_kind kind() const;
+ /// return the length of this space
+ LyXGlueLength const & length() const;