]> git.lyx.org Git - features.git/commitdiff
rename MathBigopInset into MathSymbolInset. That's what it is nowadays...
authorAndré Pönitz <poenitz@gmx.net>
Fri, 27 Jul 2001 10:08:04 +0000 (10:08 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Fri, 27 Jul 2001 10:08:04 +0000 (10:08 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2365 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/Makefile.am
src/mathed/math_bigopinset.C [deleted file]
src/mathed/math_bigopinset.h [deleted file]
src/mathed/math_cursor.C
src/mathed/math_hash.C
src/mathed/math_parser.C
src/mathed/math_symbolinset.C [new file with mode: 0644]
src/mathed/math_symbolinset.h [new file with mode: 0644]

index 9c2c89f6f0e63aa20a4d40ceeb49ec72a6ae1e25..05126bf7c07a6c389e007c2edfd72f3808c057b0 100644 (file)
@@ -20,8 +20,6 @@ libmathed_la_SOURCES = \
        formulamacro.h \
        math_arrayinset.C \
        math_arrayinset.h \
-       math_bigopinset.C \
-       math_bigopinset.h \
        math_cursor.C \
        math_cursor.h \
        math_decorationinset.C \
@@ -62,6 +60,8 @@ libmathed_la_SOURCES = \
        math_spaceinset.h \
        math_sqrtinset.C \
        math_sqrtinset.h \
+       math_symbolinset.C \
+       math_symbolinset.h \
        support.C \
        support.h \
        symbol_def.h
diff --git a/src/mathed/math_bigopinset.C b/src/mathed/math_bigopinset.C
deleted file mode 100644 (file)
index 4ae2fdb..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "math_bigopinset.h"
-#include "mathed/math_parser.h"
-#include "support/LOstream.h"
-
-
-using std::ostream;
-
-MathBigopInset::MathBigopInset(const latexkeys * l)
-       : sym_(l)
-{}
-
-
-MathInset * MathBigopInset::clone() const
-{
-       return new MathBigopInset(*this);
-}
-
-
-void MathBigopInset::write(ostream & os, bool /* fragile */) const
-{
-       os << '\\' << sym_->name << ' ';
-}
-
-
-void MathBigopInset::writeNormal(ostream & os) const
-{
-       os << "[bigop " << sym_->name << "] ";
-}
-
-
-void MathBigopInset::metrics(MathStyles st)
-{
-       size(st);
-       
-       if (sym_->id > 0 && sym_->id < 256) {
-               ssym_ = string();
-               ssym_ += sym_->id;
-               code_ = (sym_->token == LM_TK_BIGSYM) ? LM_TC_BSYM : LM_TC_SYMB;
-       } else {
-               ssym_ = sym_->name;
-               code_ = LM_TC_TEXTRM;
-       }
-
-       mathed_string_dim(code_, size(), ssym_, ascent_, descent_, width_);
-}
-
-
-void MathBigopInset::draw(Painter & pain, int x, int y)
-{  
-       xo(x);
-       yo(y);
-
-       drawStr(pain, code_, size_, x, y, ssym_);
-}
diff --git a/src/mathed/math_bigopinset.h b/src/mathed/math_bigopinset.h
deleted file mode 100644 (file)
index 2c1a477..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-// -*- C++ -*-
-#ifndef MATH_BIGOPINSET_H
-#define MATH_BIGOPINSET_H
-
-#include "math_inset.h"
-
-struct latexkeys;
-
-/// big operators
-class MathBigopInset : public MathInset {
-public:
-       ///
-       explicit MathBigopInset(latexkeys const *);
-       ///
-       MathInset * clone() const;
-       ///
-       void write(std::ostream &, bool fragile) const;
-       ///
-       void writeNormal(std::ostream &) const;
-       ///
-       void metrics(MathStyles st);
-       ///
-       void draw(Painter &, int, int);
-       ///
-       bool isScriptable() const { return true; }
-private:
-       ///
-       latexkeys const * sym_;
-       ///
-       string ssym_;
-       ///
-       MathTextCodes code_;
-};
-#endif
index cfebdbaf5fa9efcbe9c3638e2d5e9e45d6082db4..9b33d79b6fe42b43211372a25ca3eb4e42897b45 100644 (file)
@@ -30,7 +30,7 @@
 #include "formulabase.h"
 #include "math_cursor.h"
 #include "math_arrayinset.h"
-#include "math_bigopinset.h"
+#include "math_symbolinset.h"
 #include "math_decorationinset.h"
 #include "math_deliminset.h"
 #include "math_dotsinset.h"
@@ -668,7 +668,7 @@ void MathCursor::interpret(string const & s)
                        case LM_TK_SYM: 
                        case LM_TK_BIGSYM: 
                        case LM_TK_FUNCLIM:
-                               p = new MathBigopInset(l);
+                               p = new MathSymbolInset(l);
                                break;
 
                        case LM_TK_STACK:
@@ -712,7 +712,7 @@ void MathCursor::interpret(string const & s)
                insert(p);
                if (p->nargs()) {
                        plainLeft();
-                       right();  // do not push for e.g. MathBigopInset
+                       right();  // do not push for e.g. MathSymbolInset
                        if (oldsel) 
                                selPaste();
                }
index df1f63ac25b92572ab2d3d376c0bc92afd9b2dbc..f61b33887912a0e9a6360c1a1551e0e8866cdf75 100644 (file)
@@ -177,7 +177,7 @@ latexkeys const wordlist[] =
        {"neq",  LM_TK_SYM, LM_neq, LMB_RELATION},
        {"newcommand",  LM_TK_NEWCOMMAND, 0 , LMB_NONE},
        {"ni",  LM_TK_SYM, LM_ni, LMB_RELATION},
-       {"nolimits",  LM_TK_LIMIT, -1, LMB_NONE},
+       {"nolimits",  LM_TK_LIMIT, static_cast<unsigned>(-1), LMB_NONE},
        {"nonumber",  LM_TK_NONUM, 0, LMB_NONE},
        {"not",  LM_TK_DECORATION, LM_not, LMB_NONE},
        {"notin",  LM_TK_MACRO, LM_notin, LMB_RELATION},
index 42bbdda03343c4521357571bb4a03a12c0996005..1848d7492516d62eac041850646d44996540bfc5 100644 (file)
@@ -29,7 +29,7 @@
 #include "array.h"
 #include "math_inset.h"
 #include "math_arrayinset.h"
-#include "math_bigopinset.h"
+#include "math_symbolinset.h"
 #include "math_dotsinset.h"
 #include "math_decorationinset.h"
 #include "math_deliminset.h"
@@ -644,7 +644,7 @@ void mathed_parse(MathArray & array, unsigned flags)
                case LM_TK_SYM:
                case LM_TK_FUNCLIM:
                        limits = 0;
-                       array.push_back(new MathBigopInset(yylval.l));
+                       array.push_back(new MathSymbolInset(yylval.l));
                        break;
 
                case LM_TK_BOP:
@@ -748,7 +748,7 @@ void mathed_parse(MathArray & array, unsigned flags)
                        break;
                
                case LM_TK_FUNC:
-                       array.push_back(new MathFuncInset(yylval.l->name));
+                       array.push_back(new MathSymbolInset(yylval.l));
                        break;
                
                case LM_TK_UNDEF: 
diff --git a/src/mathed/math_symbolinset.C b/src/mathed/math_symbolinset.C
new file mode 100644 (file)
index 0000000..12aebfd
--- /dev/null
@@ -0,0 +1,54 @@
+#include "math_symbolinset.h"
+#include "mathed/math_parser.h"
+#include "support/LOstream.h"
+
+
+using std::ostream;
+
+MathSymbolInset::MathSymbolInset(const latexkeys * l)
+       : sym_(l)
+{}
+
+
+MathInset * MathSymbolInset::clone() const
+{
+       return new MathSymbolInset(*this);
+}
+
+
+void MathSymbolInset::write(ostream & os, bool /* fragile */) const
+{
+       os << '\\' << sym_->name << ' ';
+}
+
+
+void MathSymbolInset::writeNormal(ostream & os) const
+{
+       os << "[bigop " << sym_->name << "] ";
+}
+
+
+void MathSymbolInset::metrics(MathStyles st)
+{
+       size(st);
+       
+       if (sym_->id > 0 && sym_->id < 256) {
+               ssym_ = string();
+               ssym_ += sym_->id;
+               code_ = (sym_->token == LM_TK_BIGSYM) ? LM_TC_BSYM : LM_TC_SYMB;
+       } else {
+               ssym_ = sym_->name;
+               code_ = LM_TC_TEXTRM;
+       }
+
+       mathed_string_dim(code_, size(), ssym_, ascent_, descent_, width_);
+}
+
+
+void MathSymbolInset::draw(Painter & pain, int x, int y)
+{  
+       xo(x);
+       yo(y);
+
+       drawStr(pain, code_, size_, x, y, ssym_);
+}
diff --git a/src/mathed/math_symbolinset.h b/src/mathed/math_symbolinset.h
new file mode 100644 (file)
index 0000000..823fdf6
--- /dev/null
@@ -0,0 +1,34 @@
+// -*- C++ -*-
+#ifndef MATH_SYMBOLINSET_H
+#define MATH_SYMBOLINSET_H
+
+#include "math_inset.h"
+
+struct latexkeys;
+
+/// big operators
+class MathSymbolInset : public MathInset {
+public:
+       ///
+       explicit MathSymbolInset(latexkeys const *);
+       ///
+       MathInset * clone() const;
+       ///
+       void write(std::ostream &, bool fragile) const;
+       ///
+       void writeNormal(std::ostream &) const;
+       ///
+       void metrics(MathStyles st);
+       ///
+       void draw(Painter &, int, int);
+       ///
+       bool isScriptable() const { return true; }
+private:
+       ///
+       latexkeys const * sym_;
+       ///
+       string ssym_;
+       ///
+       MathTextCodes code_;
+};
+#endif