#ifndef DIMENSION_H
#define DIMENSION_H
-#include "support/types.h"
-
namespace lyx {
-class LyXFont;
-
/// Simple wrapper around three ints
class Dimension {
public:
/// initialize data
Dimension(int w, int a, int d) : wid(w), asc(a), des(d) {}
- Dimension(LyXFont const & font, char_type c) { set(font, c); }
-
Dimension & operator=(Dimension const & dim) {
wid = dim.wid;
asc = dim.asc;
void operator+=(Dimension const & dim);
/// set to empty box
void clear() { wid = asc = des = 0; }
- /// set to empty box suitble for given font.
- void clear(LyXFont const & font);
- /// set to a char dimensions for a given font.
- void set(LyXFont const & font, char_type c);
-
/// get height
int height() const { return asc + des; }
/// get ascent