]> 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 79248d90a7d946794943a90476482f312c8be86e..2b219a39a55eee2cda3612dd830deb3aab717a22 100644 (file)
@@ -8,36 +8,53 @@
 
 class Painter;
 class latexkeys;
+class MathMetricsInfo;
 
-extern char const * math_font_name[];
 extern char const * latex_mathspace[];
 
-int mathed_char_height(MathTextCodes type, MathStyles size, unsigned char c,
-       int & asc, int & des);
-void mathed_char_dim(MathTextCodes type, MathStyles size, unsigned char c,
-       int & asc, int & des, int & wid);
-int mathed_char_width(MathTextCodes type, MathStyles size, unsigned char c);
-int mathed_char_ascent(MathTextCodes type, MathStyles size, unsigned char c);
-int mathed_char_descent(MathTextCodes type, MathStyles size, unsigned char c);
+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);
+
+void mathed_draw_deco(Painter & pain, int x, int y, int w, int h,
+       string const & name);
+
+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);
+
+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);
+
+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);
 
-void mathed_draw_deco
-       (Painter & pain, int x, int y, int w, int h, latexkeys const * l);
+void math_font_max_dim(MathTextCodes code, MathMetricsInfo const & siz,
+       int & asc, int & desc);
 
-void mathed_string_dim(MathTextCodes type, MathStyles size, string const & s,
-  int & asc, int & des, int & wid);
-int mathed_string_height(MathTextCodes type, MathStyles size, string const & s,
-  int & asc, int & des);
+bool math_font_available(MathTextCodes code);
 
-int mathed_string_width(MathTextCodes type, MathStyles size, string const & s);
-int mathed_string_ascent(MathTextCodes type, MathStyles size, string const & s);
-int mathed_string_descent(MathTextCodes type, MathStyles size, string const & s);
+// decrease math size for super- and subscripts
+void smallerStyleScript(MathMetricsInfo &);
 
-void drawStr(Painter & pain, MathTextCodes type, MathStyles siz,
-       int x, int y, string const & s);
-void drawChar(Painter & pain, MathTextCodes type, MathStyles siz,
-       int x, int y, char c);
+// decrease math size for fractions
+void smallerStyleFrac(MathMetricsInfo & st);
+
+char const * math_font_name(MathTextCodes type);
 
-void math_font_max_dim
-       (MathTextCodes code, MathStyles siz, int & asc, int & desc);
 
 #endif