]> git.lyx.org Git - features.git/blobdiff - src/mathed/support.h
write \mathrm{x}\mathrm{y} as \mathrm{xy} again
[features.git] / src / mathed / support.h
index e4a4e3598d3f2896dd8eb3fcbf60f7b175c7769d..2b219a39a55eee2cda3612dd830deb3aab717a22 100644 (file)
 #ifndef MATH_SUPPORT_H
 #define MATH_SUPPORT_H
 
-#include "lyxfont.h"
-
-#ifndef byte
-#define byte unsigned char
-#endif
+#include "math_defs.h"
+#include "LString.h"
 
 class Painter;
-class MathedArray;
-class MathParInset;
+class latexkeys;
+class MathMetricsInfo;
 
-struct math_deco_struct {
-       int code;
-       float const * data;
-       int angle;
-};
-
-extern char const * math_font_name[];
 extern char const * latex_mathspace[];
 
-extern int mathed_char_height(short type, int size, byte c,
-                             int & asc, int & des);
-extern int mathed_char_width(short type, int size, byte c);
-extern void mathed_draw_deco(Painter & pain, int x, int y,
-                            int w, int h, int code);
-
-extern LyXFont mathed_get_font(short type, int size);
-extern int mathed_string_height(short type, int size, string const & s,
-                               int & asc, int & des);
-extern int mathed_string_width(short type, int size, string const & s);
-extern math_deco_struct const * search_deco(int code);
-
-/// math_parser.C
-extern
-MathedArray * mathed_parse(unsigned flags, MathedArray * data,
-                           MathParInset ** mt);
-
-/// math_parser.C
-extern
-void mathed_parser_file(std::istream &, int);
-/// math_parser.C
-extern
-int mathed_parser_lineno();
-
-extern
-bool MathIsInset(short x);
-
-extern
-bool MathIsFont(short x);
-
-extern
-bool MathIsAlphaFont(short x);
-
-extern
-bool MathIsActive(short x);
-
-extern
-bool MathIsUp(short x);
-
-extern
-bool MathIsDown(short x);
-
-extern
-bool MathIsScript(short x);
-
-extern
-bool MathIsBOPS(short x);
+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);
 
-extern
-bool MathIsBinary(short x);
+void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
+       string const & name);
 
-extern
-bool MathIsSymbol(short x);
+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);
 
-extern
-bool is_eqn_type(short int type);
+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);
 
-extern
-bool is_matrix_type(short int type);
+void drawStr(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
+       int x, int y, string const & s);
+void drawChar(Painter & pain, MathTextCodes type, MathMetricsInfo const & siz,
+       int x, int y, char c);
 
-extern
-bool is_multiline(short int type);
+void math_font_max_dim(MathTextCodes code, MathMetricsInfo const & siz,
+       int & asc, int & desc);
 
-extern
-bool is_ams(short int type);
+bool math_font_available(MathTextCodes code);
 
-extern
-bool is_singlely_numbered(short int type);
+// decrease math size for super- and subscripts
+void smallerStyleScript(MathMetricsInfo &);
 
-extern
-bool is_multi_numbered(short int type);
+// decrease math size for fractions
+void smallerStyleFrac(MathMetricsInfo & st);
 
-extern
-bool is_numbered(short int type);
+char const * math_font_name(MathTextCodes type);
 
-extern
-bool is_multicolumn(short int type);
 
 #endif