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
|
|
|
|
|
2006-10-17 16:23:27 +00:00
|
|
|
|
#include <string>
|
2006-10-21 11:15:37 +00:00
|
|
|
|
#include <vector>
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
|
|
|
|
|
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-21 00:16:43 +00:00
|
|
|
|
int mathed_char_width(LyXFont const &, 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,
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring const & name);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
|
2006-10-21 11:15:37 +00:00
|
|
|
|
void mathed_string_dim(LyXFont const & font,
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring const & s,
|
2006-10-21 11:15:37 +00:00
|
|
|
|
Dimension & dim);
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int mathed_string_width(LyXFont const &, docstring const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void drawStrRed(PainterInfo & pi, int x, int y, docstring const & s);
|
|
|
|
|
void drawStrBlack(PainterInfo & pi, int x, int y, 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
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
void augmentFont(LyXFont & f, docstring const & cmd);
|
2002-05-30 07:09:54 +00:00
|
|
|
|
|
2006-10-22 10:15:23 +00:00
|
|
|
|
bool isFontName(docstring const & name);
|
2002-03-19 16:55:58 +00:00
|
|
|
|
|
2003-06-02 10:03:27 +00:00
|
|
|
|
// converts single cell to string
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring asString(MathArray const & ar);
|
2004-01-07 18:28:50 +00:00
|
|
|
|
// converts single inset to string
|
2006-10-22 10:15:23 +00:00
|
|
|
|
docstring asString(InsetMath const &);
|
|
|
|
|
docstring asString(MathAtom const &);
|
2003-06-02 10:03:27 +00:00
|
|
|
|
// converts string to single cell
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void asArray(docstring const & str, MathArray & ar);
|
|
|
|
|
|
|
|
|
|
} // namespace lyx
|
2003-06-02 10:03:27 +00:00
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
|
#endif
|