#ifndef LENGTH_H
#define LENGTH_H
-#include "support/docstring.h"
+#include "support/strfwd.h"
namespace lyx {
/// "data" must be a decimal number, followed by a unit
explicit Length(std::string const & data);
- void swap(Length & rhs)
- {
- std::swap(val_, rhs.val_);
- std::swap(unit_, rhs.unit_);
- }
-
+ ///
+ void swap(Length & rhs);
///
double value() const;
///
std::string const asLatexString() const;
/// return the on-screen size of this length
int inPixels(int text_width, int em_width = 0) const;
- /// return the on-screen size of this length of an image
+ /// return the value in Big Postscript points.
int inBP() const;
friend bool isValidLength(std::string const & data, Length * result);
private:
///
- double val_;
+ double val_;
///
Length::UNIT unit_;
};
Length::UNIT unitFromString(std::string const & data);
-
} // namespace lyx
#endif // LENGTH_H