X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2Fmath_inset.C;h=d4dc10b1a519cd50d8e1547f1800a4746e95a787;hb=4590c8cfab02a3bc56813cfb1f2e80bd1119af9e;hp=87bb14e34d3cee39fa17acc770a3a4a7ce181a77;hpb=d5905fabf640bac1abda9ac7174000c3f2e34260;p=lyx.git diff --git a/src/mathed/math_inset.C b/src/mathed/math_inset.C index 87bb14e34d..d4dc10b1a5 100644 --- a/src/mathed/math_inset.C +++ b/src/mathed/math_inset.C @@ -21,6 +21,7 @@ #pragma implementation #endif +#include "debug.h" #include "math_iter.h" #include "math_inset.h" #include "symbol_def.h" @@ -28,35 +29,18 @@ #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_; +}