]> git.lyx.org Git - features.git/blobdiff - src/mathed/math_accentinset.C
mathed102.diff
[features.git] / src / mathed / math_accentinset.C
index 81b145336d314a69d97ffe3c416d708124d105ce..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,69 +0,0 @@
-#include <config.h>
-
-#include "math_accentinset.h"
-#include "mathed/support.h"
-#include "math_parser.h"
-#include "support/LOstream.h"
-
-using std::ostream;
-
-MathAccentInset::MathAccentInset(int f)
-       : MathInset(1), code(f)
-{}
-
-
-MathInset * MathAccentInset::clone() const
-{   
-       return new MathAccentInset(*this);
-}
-
-void MathAccentInset::Metrics(MathStyles st, int, int)
-{
-       xcell(0).Metrics(st);
-       ascent_  = xcell(0).ascent();
-       descent_ = xcell(0).descent();
-       width_   = xcell(0).width();
-       dh = 5;
-
-       if (code == LM_not) {
-               ascent_  += dh;
-               descent_ += dh;
-               dh = height();
-       } else 
-               ascent_ += dh + 2;
-       
-       dy = ascent_;
-}
-
-void MathAccentInset::draw(Painter & pain, int x, int y)
-{
-       xcell(0).draw(pain, x, y);
-       mathed_draw_deco(pain, x, y - dy, width(), dh, code);
-}
-
-
-void MathAccentInset::Write(ostream & os, bool fragile) const
-{
-       latexkeys const * l = lm_get_key_by_id(code, LM_TK_ACCENT);
-       os << '\\' << l->name;
-       if (code == LM_not)
-               os << ' ';
-       else
-               os << '{';
-       
-       cell(0).Write(os, fragile);
-       
-       if (code != LM_not)
-               os << '}';
-}
-
-
-void MathAccentInset::WriteNormal(ostream & os) const
-{
-       latexkeys const * l = lm_get_key_by_id(code, LM_TK_ACCENT);
-       os << "[accent " << l->name << " ";
-
-       cell(0).WriteNormal(os);
-
-       os << "] ";
-}