2001-02-13 13:28:32 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
|
|
|
|
* \file math_support.h
|
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
|
|
|
|
*
|
|
|
|
|
* \author Alejandro Aguilar Sierra
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
*
|
|
|
|
|
* Full author contact details are available in file CREDITS.
|
|
|
|
|
*/
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
|
|
#ifndef MATH_SUPPORT_H
|
|
|
|
|
#define MATH_SUPPORT_H
|
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
#include <string>
|
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
|
class PainterInfo;
|
2002-03-19 16:55:58 +00:00
|
|
|
|
class LyXFont;
|
2002-07-11 11:27:24 +00:00
|
|
|
|
class Dimension;
|
2003-06-02 10:03:27 +00:00
|
|
|
|
class MathArray;
|
2004-01-07 18:28:50 +00:00
|
|
|
|
class MathAtom;
|
|
|
|
|
class MathInset;
|
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
2002-07-11 11:27:24 +00:00
|
|
|
|
void mathed_char_dim(LyXFont const &, unsigned char c, Dimension & dim);
|
2002-03-19 16:55:58 +00:00
|
|
|
|
int mathed_char_width(LyXFont const &, unsigned char c);
|
|
|
|
|
int mathed_char_ascent(LyXFont const &, unsigned char c);
|
|
|
|
|
int mathed_char_descent(LyXFont const &, unsigned char c);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
2003-03-21 14:20:48 +00:00
|
|
|
|
void mathed_draw_deco(PainterInfo & pi, int x, int y, int w, int h,
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const & name);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void mathed_string_dim(LyXFont const & font, std::string const & s, Dimension & dim);
|
|
|
|
|
int mathed_string_width(LyXFont const &, std::string const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void drawStrRed(PainterInfo & pi, int x, int y, std::string const & s);
|
|
|
|
|
void drawStrBlack(PainterInfo & pi, int x, int y, std::string const & s);
|
2001-07-13 09:10:59 +00:00
|
|
|
|
|
2002-03-19 16:55:58 +00:00
|
|
|
|
void math_font_max_dim(LyXFont const &, int & asc, int & desc);
|
2001-07-20 14:54:13 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void augmentFont(LyXFont & f, std::string const & cmd);
|
2002-05-30 07:09:54 +00:00
|
|
|
|
|
2003-10-06 15:43:21 +00:00
|
|
|
|
bool isFontName(std::string const & name);
|
2002-03-19 16:55:58 +00:00
|
|
|
|
|
2003-06-02 10:03:27 +00:00
|
|
|
|
// converts single cell to string
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string asString(MathArray const & ar);
|
2004-01-07 18:28:50 +00:00
|
|
|
|
// converts single inset to string
|
|
|
|
|
std::string asString(MathInset const &);
|
|
|
|
|
std::string asString(MathAtom const &);
|
2003-06-02 10:03:27 +00:00
|
|
|
|
// converts string to single cell
|
2003-10-06 15:43:21 +00:00
|
|
|
|
void asArray(std::string const & str, MathArray & ar);
|
2003-06-02 10:03:27 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
#endif
|