2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
#ifndef MATH_SUPPORT_H
|
|
|
|
#define MATH_SUPPORT_H
|
|
|
|
|
2001-07-09 16:59:57 +00:00
|
|
|
#include "math_defs.h"
|
2001-07-20 14:54:13 +00:00
|
|
|
#include "LString.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
class Painter;
|
2001-08-09 15:19:31 +00:00
|
|
|
class latexkeys;
|
2001-10-19 17:46:13 +00:00
|
|
|
class MathMetricsInfo;
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
extern char const * latex_mathspace[];
|
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
int mathed_char_height(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
unsigned char c, int & asc, int & des);
|
|
|
|
void mathed_char_dim(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
unsigned char c, int & asc, int & des, int & wid);
|
|
|
|
int mathed_char_width(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
unsigned char c);
|
|
|
|
int mathed_char_ascent(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
unsigned char c);
|
|
|
|
int mathed_char_descent(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
unsigned char c);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-09-12 15:56:09 +00:00
|
|
|
void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
|
|
|
|
string const & name);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
void mathed_string_dim(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
string const & s, int & asc, int & des, int & wid);
|
|
|
|
int mathed_string_height(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
string const & s, int & asc, int & des);
|
2001-08-03 17:55:10 +00:00
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
int mathed_string_width(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
string const & s);
|
|
|
|
int mathed_string_ascent(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
string const & s);
|
|
|
|
int mathed_string_descent(MathTextCodes type, MathMetricsInfo const & size,
|
|
|
|
string const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
|
2001-06-25 00:06:33 +00:00
|
|
|
int x, int y, string const & s);
|
2001-10-19 17:46:13 +00:00
|
|
|
void drawChar(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
|
2001-06-25 00:06:33 +00:00
|
|
|
int x, int y, char c);
|
2001-07-13 09:10:59 +00:00
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
void math_font_max_dim(MathTextCodes code, MathMetricsInfo const & siz,
|
|
|
|
int & asc, int & desc);
|
2001-07-20 14:54:13 +00:00
|
|
|
|
2001-08-30 22:42:26 +00:00
|
|
|
bool math_font_available(MathTextCodes code);
|
|
|
|
|
2001-10-19 17:46:13 +00:00
|
|
|
// decrease math size for super- and subscripts
|
|
|
|
void smallerStyleScript(MathMetricsInfo &);
|
|
|
|
|
|
|
|
// decrease math size for fractions
|
|
|
|
void smallerStyleFrac(MathMetricsInfo & st);
|
|
|
|
|
2001-11-05 17:08:45 +00:00
|
|
|
char const * math_font_name(MathTextCodes type);
|
2001-10-19 17:46:13 +00:00
|
|
|
|
|
|
|
|
2001-02-13 13:28:32 +00:00
|
|
|
#endif
|