]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
update libtool
[lyx.git] / src / mathed / math_inset.C
index 87bb14e34d3cee39fa17acc770a3a4a7ce181a77..d4dc10b1a519cd50d8e1547f1800a4746e95a787 100644 (file)
@@ -21,6 +21,7 @@
 #pragma implementation
 #endif
 
+#include "debug.h"
 #include "math_iter.h"
 #include "math_inset.h"
 #include "symbol_def.h"
 #include "mathed/support.h"
 #include "Painter.h"
 
+
+// Initialize some static class variables.
 int MathedInset::df_asc;
 int MathedInset::df_des;
 int MathedInset::df_width;
 int MathedInset::workWidth;
 
 
-MathedInset::MathedInset(MathedInset * inset) 
-{
-       if (inset) {
-               name = inset->GetName();
-               objtype = inset->GetType();
-               size_ = inset->GetStyle();
-               width = inset->Width();
-               ascent = inset->Ascent();
-               descent = inset->Descent();
-       } else {
-               objtype = LM_OT_UNDEF;
-               size_ = LM_ST_TEXT;
-               width = ascent = descent = 0;
-               //name = 0;
-       }
-}
-
-
 MathedInset::MathedInset(string const & nm, short ot, short st)
-       : name(nm), objtype(ot), size_(st) 
-{
-       width = ascent = descent = 0;
-}
+       : name(nm), objtype(ot), width(0), ascent(0), descent(0),
+         size_(st)
+{}
 
 
 // In a near future maybe we use a better fonts renderer
@@ -78,6 +62,10 @@ void MathedInset::drawStr(Painter & pain, short type, int siz,
        pain.text(x, y, st, mf);
 }
 
+void MathedInset::substitute(MathMacro *)
+{
+}
+
 
 int MathedInset::Ascent() const
 {
@@ -166,3 +154,19 @@ void MathedInset::defaultWidth(int dw)
        df_width = dw;
 }
 
+
+short MathedInset::size() const
+{
+       return size_;
+}
+
+
+void MathedInset::size(short s)
+{
+       size_ = s;
+}
+
+void MathedInset::incSize()
+{
+       ++size_;
+}