lyx_mirror/src/mathed/xarray.h

68 lines
1003 B
C
Raw Normal View History

// -*- C++ -*-
#ifndef MATHEDXARRAY_H
#define MATHEDXARRAY_H
#include <iosfwd>
#include "array.h"
#include "math_defs.h"
#ifdef __GNUG__
#pragma interface
#endif
class Painter;
class MathXArray
{
public:
///
MathXArray();
///
void metrics(MathStyles st) const;
///
void draw(Painter & pain, int x, int y) const;
///
int xo() const { return xo_; }
///
int yo() const { return yo_; }
///
int pos2x(int pos) const;
///
int x2pos(int pos) const;
///
int width(int pos) const;
///
int ascent() const { return ascent_; }
///
int descent() const { return descent_; }
///
int height() const { return ascent_ + descent_; }
///
int width() const { return width_; }
///
MathStyles style() const { return style_; }
///
MathArray data_;
///
mutable int width_;
///
mutable int ascent_;
///
mutable int descent_;
///
mutable int xo_;
///
mutable int yo_;
///
mutable MathStyles style_;
};
std::ostream & operator<<(std::ostream & os, MathXArray const & ar);
#endif