mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-11 13:46:43 +00:00
02ec9422d0
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2761 a592a061-630c-0410-9148-cb99ea01b6c8
71 lines
1.0 KiB
C++
71 lines
1.0 KiB
C++
// -*- 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:
|
|
///
|
|
typedef MathArray::size_type size_type;
|
|
|
|
///
|
|
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(size_type pos) const;
|
|
///
|
|
size_type x2pos(int pos) const;
|
|
///
|
|
int width(size_type 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
|