]> git.lyx.org Git - lyx.git/commitdiff
*** empty log message ***
authorAndré Pönitz <poenitz@gmx.net>
Tue, 7 Aug 2001 04:49:50 +0000 (04:49 +0000)
committerAndré Pönitz <poenitz@gmx.net>
Tue, 7 Aug 2001 04:49:50 +0000 (04:49 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2432 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/Makefile.am
src/mathed/math_funcliminset.C [new file with mode: 0644]
src/mathed/math_funcliminset.h [new file with mode: 0644]

index e0ad3e22efadf093056667ab06269f0791f03234..8a94d7e5607d2e6b5f0f23d9fe925081c8429818 100644 (file)
@@ -8,10 +8,6 @@ BOOST_INCLUDES = -I$(top_srcdir)/boost
 INCLUDES = -I${srcdir}/../ $(SIGC_CFLAGS) $(BOOST_INCLUDES)
 
 
-#      math_bigopinset.C \
-#      math_bigopinset.h \
-#      math_funcliminset.C \
-#      math_funcliminset.h \
 
 libmathed_la_SOURCES = \
        array.C \
@@ -26,6 +22,8 @@ libmathed_la_SOURCES = \
        formulamacro.h \
        math_arrayinset.C \
        math_arrayinset.h \
+       math_bigopinset.C \
+       math_bigopinset.h \
        math_charinset.C \
        math_charinset.h \
        math_cursor.C \
@@ -43,6 +41,8 @@ libmathed_la_SOURCES = \
        math_fracinset.h \
        math_funcinset.C \
        math_funcinset.h \
+       math_funcliminset.C \
+       math_funcliminset.h \
        math_gridinset.C \
        math_gridinset.h \
        math_hash.C \
diff --git a/src/mathed/math_funcliminset.C b/src/mathed/math_funcliminset.C
new file mode 100644 (file)
index 0000000..4ceeaad
--- /dev/null
@@ -0,0 +1,43 @@
+#include "math_funcliminset.h"
+#include "mathed/math_parser.h"
+#include "support/LOstream.h"
+
+
+using std::ostream;
+
+MathFuncLimInset::MathFuncLimInset(const latexkeys * l)
+       : sym_(l)
+{}
+
+
+MathInset * MathFuncLimInset::clone() const
+{
+       return new MathFuncLimInset(*this);
+}
+
+
+void MathFuncLimInset::write(ostream & os, bool /* fragile */) const
+{
+       os << '\\' << sym_->name << ' ';
+}
+
+
+void MathFuncLimInset::writeNormal(ostream & os) const
+{
+       os << "[" << sym_->name << "] ";
+}
+
+
+void MathFuncLimInset::metrics(MathStyles st) const
+{
+       size(st);
+       mathed_string_dim(LM_TC_TEXTRM, size(), sym_->name, ascent_, descent_, width_);
+}
+
+
+void MathFuncLimInset::draw(Painter & pain, int x, int y) const
+{  
+       xo(x);
+       yo(y);
+       drawStr(pain, LM_TC_TEXTRM, size_, x, y, sym_->name);
+}
diff --git a/src/mathed/math_funcliminset.h b/src/mathed/math_funcliminset.h
new file mode 100644 (file)
index 0000000..9510979
--- /dev/null
@@ -0,0 +1,33 @@
+// -*- C++ -*-
+#ifndef MATH_FUNCLIMINSET_H
+#define MATH_FUNCLIMINSET_H
+
+#include "math_diminset.h"
+
+struct latexkeys;
+
+// "normal" symbols that don't take limits and don't grow in displayed
+// formulae
+
+class MathFuncLimInset : public MathDimInset {
+public:
+       ///
+       explicit MathFuncLimInset(latexkeys const *);
+       ///
+       MathInset * clone() const;
+       ///
+       void write(std::ostream &, bool fragile) const;
+       ///
+       void writeNormal(std::ostream &) const;
+       ///
+       void metrics(MathStyles st) const;
+       ///
+       void draw(Painter &, int x, int y) const;
+       ///
+       bool isScriptable() const { return true; }
+
+private:
+       ///
+       latexkeys const * sym_;
+};
+#endif