2001-02-13 13:28:32 +00:00
|
|
|
// -*- C++ -*-
|
|
|
|
|
|
|
|
#ifndef MATH_SUPPORT_H
|
|
|
|
#define MATH_SUPPORT_H
|
|
|
|
|
|
|
|
#include "lyxfont.h"
|
2001-07-09 16:59:57 +00:00
|
|
|
#include "math_defs.h"
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
#ifndef byte
|
|
|
|
#define byte unsigned char
|
|
|
|
#endif
|
|
|
|
|
|
|
|
class Painter;
|
2001-06-25 00:06:33 +00:00
|
|
|
class MathArray;
|
|
|
|
class MathMatrixInset;
|
2001-02-13 13:28:32 +00:00
|
|
|
|
|
|
|
struct math_deco_struct {
|
|
|
|
int code;
|
2001-02-16 09:25:43 +00:00
|
|
|
float const * data;
|
2001-02-13 13:28:32 +00:00
|
|
|
int angle;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern char const * math_font_name[];
|
|
|
|
extern char const * latex_mathspace[];
|
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
int mathed_char_height(short type, int size, byte c, int & asc, int & des);
|
|
|
|
int mathed_char_width(short type, int size, byte c);
|
|
|
|
void mathed_char_dim(short type, int size, byte c, int & asc, int & des, int & wid);
|
2001-02-13 13:28:32 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, int code);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
LyXFont mathed_get_font(short type, int size);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void mathed_string_dim(short type, int size, string const & s,
|
|
|
|
int & asc, int & des, int & wid);
|
|
|
|
int mathed_string_height(short type, int size, string const & s,
|
|
|
|
int & asc, int & des);
|
|
|
|
int mathed_string_width(short type, int size, string const & s);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
math_deco_struct const * search_deco(int code);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
bool MathIsInset(short x);
|
2001-02-13 19:10:18 +00:00
|
|
|
bool MathIsAlphaFont(short x);
|
|
|
|
bool MathIsBOPS(short x);
|
|
|
|
bool MathIsBinary(short x);
|
|
|
|
bool MathIsSymbol(short x);
|
2001-07-09 16:59:57 +00:00
|
|
|
bool MathIsRelOp(byte c, MathTextCodes f);
|
2001-02-13 19:10:18 +00:00
|
|
|
|
2001-06-25 00:06:33 +00:00
|
|
|
void drawStr(Painter & pain, short type, int siz,
|
|
|
|
int x, int y, string const & s);
|
|
|
|
void drawChar(Painter & pain, short type, int siz,
|
|
|
|
int x, int y, char c);
|
2001-02-13 13:28:32 +00:00
|
|
|
#endif
|