2001-02-13 13:28:32 +00:00
|
|
|
|
// -*- C++ -*-
|
2003-08-19 13:00:56 +00:00
|
|
|
|
/**
|
2006-09-17 09:14:18 +00:00
|
|
|
|
* \file MathSupport.h
|
2003-08-19 13:00:56 +00:00
|
|
|
|
* 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
|
|
|
|
|
|
2006-10-17 14:46:45 +00:00
|
|
|
|
#include "support/docstring.h"
|
2003-10-06 15:43:21 +00:00
|
|
|
|
|
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;
|
2006-09-16 18:11:38 +00:00
|
|
|
|
class InsetMath;
|
2004-01-07 18:28:50 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
2006-10-17 14:46:45 +00:00
|
|
|
|
void mathed_char_dim(LyXFont const &, lyx::char_type c, Dimension & dim);
|
|
|
|
|
int mathed_char_width(LyXFont const &, lyx::char_type 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
|
|
|
|
|
2006-10-17 14:46:45 +00:00
|
|
|
|
void mathed_string_dim(LyXFont const & font, lyx::docstring const & s, Dimension & dim);
|
|
|
|
|
int mathed_string_width(LyXFont const &, lyx::docstring const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
|
2006-10-17 14:46:45 +00:00
|
|
|
|
void drawStrRed(PainterInfo & pi, int x, int y, lyx::docstring const & s);
|
|
|
|
|
void drawStrBlack(PainterInfo & pi, int x, int y, lyx::docstring 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
|
2006-09-16 18:11:38 +00:00
|
|
|
|
std::string asString(InsetMath const &);
|
2004-01-07 18:28:50 +00:00
|
|
|
|
std::string asString(MathAtom const &);
|
2003-06-02 10:03:27 +00:00
|
|
|
|
// converts string to single cell
|
2006-10-17 14:46:45 +00:00
|
|
|
|
void asArray(lyx::docstring const & str, MathArray & ar);
|
2003-06-02 10:03:27 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
#endif
|