From ff13a3e736303114134238f6dbcfdfc9489c1a1a Mon Sep 17 00:00:00 2001 From: =?utf8?q?Andr=C3=A9=20P=C3=B6nitz?= Date: Mon, 3 Sep 2001 15:22:55 +0000 Subject: [PATCH] remove symbol_def.h git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2666 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/ChangeLog | 4 +- src/mathed/math_binominset.C | 7 +- src/mathed/math_decorationinset.C | 41 +++----- src/mathed/math_decorationinset.h | 7 +- src/mathed/math_deliminset.C | 4 +- src/mathed/math_dotsinset.C | 28 +++--- src/mathed/math_dotsinset.h | 8 +- src/mathed/math_factory.C | 4 +- src/mathed/math_hash.C | 47 +++++---- src/mathed/math_inset.h | 1 - src/mathed/math_notinset.h | 2 - src/mathed/math_parser.h | 2 - src/mathed/math_rootinset.h | 1 - src/mathed/support.C | 159 ++++++++++++++---------------- src/mathed/support.h | 2 +- src/mathed/symbol_def.h | 68 ------------- 16 files changed, 140 insertions(+), 245 deletions(-) delete mode 100644 src/mathed/symbol_def.h diff --git a/src/mathed/ChangeLog b/src/mathed/ChangeLog index 197da34ce1..cf59a573ba 100644 --- a/src/mathed/ChangeLog +++ b/src/mathed/ChangeLog @@ -2,7 +2,9 @@ * math_hash.C: Use std::map instead of faking it - * symbol_def.C: remove unneded symbol definitions + * symbol_def.h: remove unneeded symbol definitions + + * support.C: use the decorations' name for drawing 2001-09-02 Dekel Tsur diff --git a/src/mathed/math_binominset.C b/src/mathed/math_binominset.C index c9d0edd735..5785777615 100644 --- a/src/mathed/math_binominset.C +++ b/src/mathed/math_binominset.C @@ -3,7 +3,6 @@ #endif #include "math_binominset.h" -#include "math_parser.h" #include "support.h" #include "support/LOstream.h" @@ -47,10 +46,8 @@ void MathBinomInset::draw(Painter & pain, int x, int y) const int m = x + width() / 2; xcell(0).draw(pain, m - xcell(0).width() / 2, y - xcell(0).descent() - 3 - 5); xcell(1).draw(pain, m - xcell(1).width() / 2, y + xcell(1).ascent() + 3 - 5); - mathed_draw_deco(pain, x, y - ascent_, - dw(), height(), in_word_set("(")); - mathed_draw_deco(pain, x + width() - dw(), y - ascent_, - dw(), height(), in_word_set(")")); + mathed_draw_deco(pain, x, y - ascent_, dw(), height(), "("); + mathed_draw_deco(pain, x + width() - dw(), y - ascent_, dw(), height(), ")"); } diff --git a/src/mathed/math_decorationinset.C b/src/mathed/math_decorationinset.C index 11d5ff0f34..8d3d3501e8 100644 --- a/src/mathed/math_decorationinset.C +++ b/src/mathed/math_decorationinset.C @@ -11,10 +11,9 @@ using std::ostream; -MathDecorationInset::MathDecorationInset(latexkeys const * key) - : MathNestInset(1), key_(key) -{ -} +MathDecorationInset::MathDecorationInset(string const & name) + : MathNestInset(1), name_(name) +{} MathInset * MathDecorationInset::clone() const @@ -25,17 +24,17 @@ MathInset * MathDecorationInset::clone() const bool MathDecorationInset::upper() const { - return key_->id != LM_underline && key_->id != LM_underbrace; + return name_ != "underline" && name_ != "underbrace"; } bool MathDecorationInset::protect() const { return - key_->name == "overbrace" || - key_->name == "underbrace" || - key_->name == "overleftarrow" || - key_->name == "overrightarrow"; + name_ == "overbrace" || + name_ == "underbrace" || + name_ == "overleftarrow" || + name_ == "overrightarrow"; } @@ -56,21 +55,15 @@ void MathDecorationInset::metrics(MathStyles st) const dy_ = descent_ + 1; descent_ += dh_ + 2; } - - if (key_->id == LM_not) { - ascent_ += dh_; - descent_ += dh_; - dh_ = height(); - dy_ = - ascent_; - } } + void MathDecorationInset::draw(Painter & pain, int x, int y) const { xo(x); yo(x); xcell(0).draw(pain, x, y); - mathed_draw_deco(pain, x, y + dy_, width_, dh_, key_); + mathed_draw_deco(pain, x, y + dy_, width_, dh_, name_); } @@ -78,23 +71,15 @@ void MathDecorationInset::write(ostream & os, bool fragile) const { if (fragile && protect()) os << "\\protect"; - os << '\\' << key_->name; - - if (key_->id == LM_not) - os << ' '; - else - os << '{'; - + os << '\\' << name_ << '{'; cell(0).write(os, fragile); - - if (key_->id != LM_not) - os << '}'; + os << '}'; } void MathDecorationInset::writeNormal(ostream & os) const { - os << "[" << key_->name << " "; + os << "[" << name_ << " "; cell(0).writeNormal(os); os << "] "; } diff --git a/src/mathed/math_decorationinset.h b/src/mathed/math_decorationinset.h index 54024c14d8..58f74cca21 100644 --- a/src/mathed/math_decorationinset.h +++ b/src/mathed/math_decorationinset.h @@ -3,6 +3,7 @@ #define MATH_DECORATIONINSET_H #include "math_nestinset.h" +#include "LString.h" #ifdef __GNUG__ #pragma interface @@ -12,12 +13,10 @@ \author Alejandro Aguilar Sierra */ -struct latexkeys; - class MathDecorationInset : public MathNestInset { public: /// - explicit MathDecorationInset(latexkeys const *); + explicit MathDecorationInset(string const & name); /// MathInset * clone() const; /// @@ -36,7 +35,7 @@ private: bool protect() const; /// - latexkeys const * key_; + string const name_; /// height cache of deco mutable int dh_; /// vertical offset cache of deco diff --git a/src/mathed/math_deliminset.C b/src/mathed/math_deliminset.C index 9fc14cad78..d42bbf79d3 100644 --- a/src/mathed/math_deliminset.C +++ b/src/mathed/math_deliminset.C @@ -86,6 +86,6 @@ void MathDelimInset::draw(Painter & pain, int x, int y) const int const w = dw(); int const b = y - ascent_ - 2; xcell(0).draw(pain, x + w + 2, y); - mathed_draw_deco(pain, x + 1, b, w, height() + 4, left_); - mathed_draw_deco(pain, x + width() - w - 1, b, w, height() + 4, right_); + mathed_draw_deco(pain, x + 1, b, w, height() + 4, left_->name); + mathed_draw_deco(pain, x + width() - w - 1, b, w, height() + 4, right_->name); } diff --git a/src/mathed/math_dotsinset.C b/src/mathed/math_dotsinset.C index 04478bd0ed..f7b6238dc0 100644 --- a/src/mathed/math_dotsinset.C +++ b/src/mathed/math_dotsinset.C @@ -4,14 +4,13 @@ #include "math_dotsinset.h" #include "mathed/support.h" -#include "mathed/math_parser.h" #include "support/LOstream.h" using std::ostream; -MathDotsInset::MathDotsInset(latexkeys const * key) - : key_(key) +MathDotsInset::MathDotsInset(string const & name) + : name_(name) {} @@ -23,12 +22,13 @@ MathInset * MathDotsInset::clone() const void MathDotsInset::draw(Painter & pain, int x, int y) const { - mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, key_); - if (key_->id == LM_vdots || key_->id == LM_ddots) + mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_); + char const c = name_[0]; + if (c == 'v' || c == 'd') ++x; - if (key_->id != LM_vdots) + if (c != 'v') --y; - mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, key_); + mathed_draw_deco(pain, x + 2, y - dh_, width_ - 2, ascent_, name_); } @@ -36,22 +36,22 @@ void MathDotsInset::metrics(MathStyles st) const { size(st); mathed_char_dim(LM_TC_VAR, size(), 'M', ascent_, descent_, width_); - switch (key_->id) { - case LM_ldots: dh_ = 0; break; - case LM_cdots: dh_ = ascent_ / 2; break; - case LM_vdots: width_ /= 2; - case LM_ddots: dh_ = ascent_; break; + switch (name_[0]) { + case 'l': dh_ = 0; break; + case 'c': dh_ = ascent_ / 2; break; + case 'v': width_ /= 2; + case 'd': dh_ = ascent_; break; } } void MathDotsInset::write(ostream & os, bool /* fragile */) const { - os << '\\' << key_->name << ' '; + os << '\\' << name_ << ' '; } void MathDotsInset::writeNormal(ostream & os) const { - os << "[" << key_->name << "] "; + os << "[" << name_ << "] "; } diff --git a/src/mathed/math_dotsinset.h b/src/mathed/math_dotsinset.h index c2d87c7f6d..cda4a77f7a 100644 --- a/src/mathed/math_dotsinset.h +++ b/src/mathed/math_dotsinset.h @@ -3,19 +3,17 @@ #define MATH_DOTSINSET_H #include "math_diminset.h" -#include "math_defs.h" +#include "LString.h" #ifdef __GNUG__ #pragma interface #endif -struct latexkeys; - /// The different kinds of ellipsis class MathDotsInset : public MathDimInset { public: /// - explicit MathDotsInset(latexkeys const *); + explicit MathDotsInset(string const &); /// MathInset * clone() const; /// @@ -30,6 +28,6 @@ protected: /// cache for the thing's heigth mutable int dh_; /// - latexkeys const * key_; + string const name_; }; #endif diff --git a/src/mathed/math_factory.C b/src/mathed/math_factory.C index 01df5f2838..975cd1f89b 100644 --- a/src/mathed/math_factory.C +++ b/src/mathed/math_factory.C @@ -53,11 +53,11 @@ MathInset * createMathInset(latexkeys const * l) case LM_TK_ROOT: return new MathRootInset; case LM_TK_DECORATION: - return new MathDecorationInset(l); + return new MathDecorationInset(l->name); case LM_TK_SPACE: return new MathSpaceInset(l->id); case LM_TK_DOTS: - return new MathDotsInset(l); + return new MathDotsInset(l->name); } return new MathFuncInset(l->name); } diff --git a/src/mathed/math_hash.C b/src/mathed/math_hash.C index 8004a2680e..9c24fd243f 100644 --- a/src/mathed/math_hash.C +++ b/src/mathed/math_hash.C @@ -7,7 +7,6 @@ #include "support/lyxfunctional.h" #include -#include namespace { @@ -39,46 +38,46 @@ latexkeys_a wordlist_array[] = {"\\", LM_TK_NEWLINE, static_cast(-1)}, // -1 needed in mathed_parse_lines! {"]", LM_TK_END, LM_OT_EQUATION}, {"_", LM_TK_SPECIAL, '_'}, - {"acute", LM_TK_DECORATION, LM_acute}, + {"acute", LM_TK_DECORATION, 0}, {"arccos", LM_TK_FUNC, 0}, {"arcsin", LM_TK_FUNC, 0}, {"arctan", LM_TK_FUNC, 0}, {"arg", LM_TK_FUNC, 0}, {"atop", LM_TK_ATOP, 0}, {"backslash", LM_TK_SPECIAL, '\\'}, - {"bar", LM_TK_DECORATION, LM_bar}, + {"bar", LM_TK_DECORATION, 0}, {"begin", LM_TK_BEGIN, 0}, {"binom", LM_TK_BINOM, 0}, {"bmod", LM_TK_FUNC, 0}, - {"breve", LM_TK_DECORATION, LM_breve}, + {"breve", LM_TK_DECORATION, 0}, {"cal", LM_TK_OLDFONT, LM_TC_CAL}, - {"cdots", LM_TK_DOTS, LM_cdots}, - {"check", LM_TK_DECORATION, LM_check}, + {"cdots", LM_TK_DOTS, 0}, + {"check", LM_TK_DECORATION, 0}, {"choose", LM_TK_CHOOSE, 0}, {"cos", LM_TK_FUNC, 0}, {"cosh", LM_TK_FUNC, 0}, {"cot", LM_TK_FUNC, 0}, {"coth", LM_TK_FUNC, 0}, {"csc", LM_TK_FUNC, 0}, - {"ddot", LM_TK_DECORATION, LM_ddot}, - {"ddots", LM_TK_DOTS, LM_ddots}, + {"ddot", LM_TK_DECORATION, 0}, + {"ddots", LM_TK_DOTS, 0}, {"deg", LM_TK_FUNC, 0}, {"det", LM_TK_FUNCLIM, 0}, {"dim", LM_TK_FUNC, 0}, //{"displaystyle", LM_TK_STY, LM_ST_DISPLAY}, - {"dot", LM_TK_DECORATION, LM_dot}, + {"dot", LM_TK_DECORATION, 0}, {"end", LM_TK_END, 0}, {"exp", LM_TK_FUNC, 0}, {"frac", LM_TK_FRAC, 0}, {"gcd", LM_TK_FUNCLIM, 0}, - {"grave", LM_TK_DECORATION, LM_grave}, - {"hat", LM_TK_DECORATION, LM_hat}, + {"grave", LM_TK_DECORATION, 0}, + {"hat", LM_TK_DECORATION, 0}, {"hom", LM_TK_FUNC, 0}, {"inf", LM_TK_FUNCLIM, 0}, {"ker", LM_TK_FUNC, 0}, {"kern", LM_TK_KERN, 0}, {"label", LM_TK_LABEL, 0}, - {"ldots", LM_TK_DOTS, LM_ldots}, + {"ldots", LM_TK_DOTS, 0}, {"left", LM_TK_LEFT, 0}, {"lg", LM_TK_FUNC, 0}, {"lim", LM_TK_FUNCLIM, 0}, @@ -100,12 +99,12 @@ latexkeys_a wordlist_array[] = {"newcommand", LM_TK_NEWCOMMAND, 0 }, {"nolimits", LM_TK_LIMIT, static_cast(-1)}, {"nonumber", LM_TK_NONUM, 0}, - {"not", LM_TK_NOT, LM_not}, + {"not", LM_TK_NOT, 0}, {"over", LM_TK_OVER, 0}, - {"overbrace", LM_TK_DECORATION, LM_overbrace}, - {"overleftarrow", LM_TK_DECORATION, LM_overleftarrow}, - {"overline", LM_TK_DECORATION, LM_overline}, - {"overrightarrow", LM_TK_DECORATION, LM_overightarrow}, + {"overbrace", LM_TK_DECORATION, 0}, + {"overleftarrow", LM_TK_DECORATION, 0}, + {"overline", LM_TK_DECORATION, 0}, + {"overrightarrow", LM_TK_DECORATION, 0}, {"protect", LM_TK_PROTECT, 0}, {"qquad", LM_TK_SPACE, 5}, {"quad", LM_TK_SPACE, 4}, @@ -123,13 +122,13 @@ latexkeys_a wordlist_array[] = {"tanh", LM_TK_FUNC, 0}, {"textrm", LM_TK_FONT, LM_TC_TEXTRM}, //{"textstyle", LM_TK_STY, LM_ST_TEXT}, - {"tilde", LM_TK_DECORATION, LM_tilde}, - {"underbrace", LM_TK_DECORATION, LM_underbrace}, - {"underline", LM_TK_DECORATION, LM_underline}, - {"vdots", LM_TK_DOTS, LM_vdots}, - {"vec", LM_TK_DECORATION, LM_vec}, - {"widehat", LM_TK_DECORATION, LM_widehat}, - {"widetilde", LM_TK_DECORATION, LM_widetilde}, + {"tilde", LM_TK_DECORATION, 0}, + {"underbrace", LM_TK_DECORATION, 0}, + {"underline", LM_TK_DECORATION, 0}, + {"vdots", LM_TK_DOTS, 0}, + {"vec", LM_TK_DECORATION, 0}, + {"widehat", LM_TK_DECORATION, 0}, + {"widetilde", LM_TK_DECORATION, 0}, {"{", LM_TK_SPECIAL, '{'}, {"|", LM_TK_UNDEF, '|'}, {"}", LM_TK_SPECIAL, '}'}, diff --git a/src/mathed/math_inset.h b/src/mathed/math_inset.h index ca8a5638c8..668be97414 100644 --- a/src/mathed/math_inset.h +++ b/src/mathed/math_inset.h @@ -28,7 +28,6 @@ #pragma interface #endif -#include "symbol_def.h" #include "xarray.h" /** Abstract base class for all math objects. diff --git a/src/mathed/math_notinset.h b/src/mathed/math_notinset.h index 917e5bb7ff..b97d565ffc 100644 --- a/src/mathed/math_notinset.h +++ b/src/mathed/math_notinset.h @@ -4,8 +4,6 @@ #include "math_diminset.h" -struct latexkeys; - // \\not class MathNotInset : public MathDimInset { diff --git a/src/mathed/math_parser.h b/src/mathed/math_parser.h index 45c89dddab..68ef43cce9 100644 --- a/src/mathed/math_parser.h +++ b/src/mathed/math_parser.h @@ -24,9 +24,7 @@ #endif #include "LString.h" - #include "math_defs.h" -#include "symbol_def.h" class MathMatrixInset; class MathMacroTemplate; diff --git a/src/mathed/math_rootinset.h b/src/mathed/math_rootinset.h index 97e56ea625..5649d0a8f7 100644 --- a/src/mathed/math_rootinset.h +++ b/src/mathed/math_rootinset.h @@ -16,7 +16,6 @@ #define MATH_ROOT_H #include "math_nestinset.h" -#include "symbol_def.h" #ifdef __GNUG__ #pragma interface diff --git a/src/mathed/support.C b/src/mathed/support.C index 1e40d6abd4..94e2751a92 100644 --- a/src/mathed/support.C +++ b/src/mathed/support.C @@ -1,6 +1,6 @@ #include -#include +#include #include "mathed/support.h" #include "lyxfont.h" @@ -11,8 +11,6 @@ #include "Painter.h" #include "debug.h" -using std::sort; -using std::lower_bound; using std::endl; using std::max; @@ -454,102 +452,94 @@ float const tilde[] = { struct deco_struct { - int code; float const * data; int angle; }; -deco_struct deco_table[] = { - // Decorations - { LM_widehat, &angle[0], 3 }, - { LM_widetilde, &tilde[0], 0 }, - { LM_underline, &hline[0], 0 }, - { LM_overline, &hline[0], 0 }, - { LM_underbrace, &brace[0], 1 }, - { LM_overbrace, &brace[0], 3 }, - { LM_overleftarrow, &arrow[0], 1 }, - { LM_overightarrow, &arrow[0], 3 }, - - // Delimiters - { '(', &parenth[0], 0 }, - { ')', &parenth[0], 2 }, - { '{', &brace[0], 0 }, - { '}', &brace[0], 2 }, - { '[', &brack[0], 0 }, - { ']', &brack[0], 2 }, - { '|', &vert[0], 0 }, - { '/', &slash[0], 0 }, - { LM_Vert, &Vert[0], 0 }, - { '\\', &slash[0], 1 }, - { LM_langle, &angle[0], 0 }, - { LM_lceil, &corner[0], 0 }, - { LM_lfloor, &corner[0], 1 }, - { LM_rangle, &angle[0], 2 }, - { LM_rceil, &corner[0], 3 }, - { LM_rfloor, &corner[0], 2 }, - { LM_downarrow, &arrow[0], 2 }, - { LM_Downarrow, &Arrow[0], 2 }, - { LM_uparrow, &arrow[0], 0 }, - { LM_Uparrow, &Arrow[0], 0 }, - { LM_updownarrow, &udarrow[0], 0 }, - { LM_Updownarrow, &Udarrow[0], 0 }, - - // Accents - { LM_ddot, &hline2[0], 0 }, - { LM_hat, &angle[0], 3 }, - { LM_grave, &slash[0], 1 }, - { LM_acute, &slash[0], 0 }, - { LM_tilde, &tilde[0], 0 }, - { LM_bar, &hline[0], 0 }, - { LM_dot, &hlinesmall[0], 0 }, - { LM_check, &angle[0], 1 }, - { LM_breve, &parenth[0], 1 }, - { LM_vec, &arrow[0], 3 }, - { LM_not, &slash[0], 0 }, - - // Dots - { LM_ldots, &hline3[0], 0 }, - { LM_cdots, &hline3[0], 0 }, - { LM_vdots, &hline3[0], 1 }, - { LM_ddots, &dline3[0], 0 } +struct named_deco_struct { + char const * name; + float const * data; + int angle; }; - -struct deco_compare { - /// for use by sort and lower_bound - int operator()(deco_struct const & a, deco_struct const & b) const - { - return a.code < b.code; - } +named_deco_struct deco_table[] = { + // Decorations + {"widehat", angle, 3 }, + {"widetilde", tilde, 0 }, + {"underline", hline, 0 }, + {"overline", hline, 0 }, + {"underbrace", brace, 1 }, + {"overbrace", brace, 3 }, + {"overleftarrow", arrow, 1 }, + {"overightarrow", arrow, 3 }, + + // Delimiters + {"(", parenth, 0 }, + {")", parenth, 2 }, + {"{", brace, 0 }, + {"}", brace, 2 }, + {"[", brack, 0 }, + {"]", brack, 2 }, + {"|", vert, 0 }, + {"/", slash, 0 }, + {"Vert", Vert, 0 }, + {"'", slash, 1 }, + {"langle", angle, 0 }, + {"lceil", corner, 0 }, + {"lfloor", corner, 1 }, + {"rangle", angle, 2 }, + {"rceil", corner, 3 }, + {"rfloor", corner, 2 }, + {"downarrow", arrow, 2 }, + {"Downarrow", Arrow, 2 }, + {"uparrow", arrow, 0 }, + {"Uparrow", Arrow, 0 }, + {"updownarrow", udarrow, 0 }, + {"Updownarrow", Udarrow, 0 }, + + // Accents + {"ddot", hline2, 0 }, + {"hat", angle, 3 }, + {"grave", slash, 1 }, + {"acute", slash, 0 }, + {"tilde", tilde, 0 }, + {"bar", hline, 0 }, + {"dot", hlinesmall, 0 }, + {"check", angle, 1 }, + {"breve", parenth, 1 }, + {"vec", arrow, 3 }, + {"not", slash, 0 }, + + // Dots + {"ldots", hline3, 0 }, + {"cdots", hline3, 0 }, + {"vdots", hline3, 1 }, + {"ddots", dline3, 0 } }; -int const deco_table_size = sizeof(deco_table) / sizeof(deco_struct); - +std::map deco_list; // sort the table on startup struct init_deco_table { init_deco_table() { - std::sort(deco_table, - deco_table + deco_table_size, - deco_compare()); + unsigned const n = sizeof(deco_table) / sizeof(deco_table[0]); + for (named_deco_struct * p = deco_table; p != deco_table + n; ++p) { + deco_struct d; + d.data = p->data; + d.angle = p->angle; + deco_list[p->name]= d; + } } }; static init_deco_table dummy; -deco_struct const * search_deco(int code) +deco_struct const * search_deco(string const & name) { - const deco_struct search_elem = { code, 0, 0 }; - - deco_struct const * res = - lower_bound(deco_table, deco_table + deco_table_size, search_elem, - deco_compare()); - if (res != deco_table + deco_table_size && - res->code == code) - return res; - return 0; + map::const_iterator p = deco_list.find(name); + return (p == deco_list.end()) ? 0 : &(p->second); } @@ -638,13 +628,11 @@ int mathed_string_width(MathTextCodes type, MathStyles size, string const & s) void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, - latexkeys const * l) + const string & name) { Matrix mt; Matrix sqmt; int i = 0; - string const & name = l->name; - int code = (name.size() > 1) ? l->id : name[0]; if (name == ".") { pain.line(x + w/2, y, x + w/2, y + h, @@ -652,17 +640,17 @@ void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, return; } - deco_struct const * mds = search_deco(code); + deco_struct const * mds = search_deco(name); if (!mds) { lyxerr << "Deco was not found. Programming error?\n"; - lyxerr << "name: '" << name << "', code: " << code << "\n"; + lyxerr << "name: '" << name << "\n"; return; } int const r = mds->angle; float const * d = mds->data; - if (h > 70 && (mds->code == int('(') || mds->code == int(')'))) + if (h > 70 && (name == "(" || name == ")")) d = parenthHigh; mt.rotate(r); @@ -679,6 +667,7 @@ void mathed_draw_deco(Painter & pain, int x, int y, int w, int h, if (r >= 2) x += w; + int code; do { float xx; float yy; diff --git a/src/mathed/support.h b/src/mathed/support.h index 046f285c9c..e6b90a2762 100644 --- a/src/mathed/support.h +++ b/src/mathed/support.h @@ -20,7 +20,7 @@ int mathed_char_ascent(MathTextCodes type, MathStyles size, unsigned char c); int mathed_char_descent(MathTextCodes type, MathStyles size, unsigned char c); void mathed_draw_deco - (Painter & pain, int x, int y, int w, int h, latexkeys const * l); + (Painter & pain, int x, int y, int w, int h, string const & name); void mathed_string_dim(MathTextCodes type, MathStyles size, string const & s, int & asc, int & des, int & wid); diff --git a/src/mathed/symbol_def.h b/src/mathed/symbol_def.h deleted file mode 100644 index 95812372bf..0000000000 --- a/src/mathed/symbol_def.h +++ /dev/null @@ -1,68 +0,0 @@ -// This -*- C++ -*- file was created automatically. -// Don't change it! [asierra18jan96] -// Why? [andre] - -#ifndef SYMBOL_DEF -#define SYMBOL_DEF - -enum Math_Symbols_enum { -// Accents - LM_acute = '\'', - LM_grave = '`', - LM_hat = '^', - LM_tilde = '~', - LM_dot = '.', - LM_bar = '-', - -/// Symbols that don't exist in X11 symbol font but that we fake - LM_not = 10, - -// Symbols that do exist in X11 symbol font - LM_uparrow = 0xad, - LM_downarrow = 0xaf, - LM_Leftrightarrow = 0xdb, - LM_Leftarrow = 0xdc, - LM_Uparrow = 0xdd, - LM_Rightarrow = 0xde, - LM_Downarrow = 0xdf, - LM_langle = 0xe1, - LM_lceil = 0xe9, - LM_lfloor = 0xeb, - LM_rangle = 0xf1, - LM_int = 0xf2, - LM_rceil = 0xf9, - LM_rfloor = 0xfb, - -/// Symbols that don't exist in X11 symbol font - LM_NoFont = 256, - -/// needed as decoration - LM_Vert, - LM_updownarrow, - LM_Updownarrow, - -/// decorations - LM_widehat, - LM_widetilde, - LM_underline, - LM_overline, - LM_underbrace, - LM_overbrace, - LM_overleftarrow, - LM_overightarrow, - -/// dots - LM_ldots, - LM_cdots, - LM_vdots, - LM_ddots, - LM_emptyset, - -/// Accents that don't exist in X11 symbol font - LM_ddot, - LM_check, - LM_vec, - LM_breve -}; - -#endif -- 2.39.2