From 83b46c7573ecc545e19fae183bce85bd35c287d7 Mon Sep 17 00:00:00 2001 From: Stefan Schimanski Date: Sun, 23 Dec 2007 01:27:18 +0000 Subject: [PATCH] * tabs are evil git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22274 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathMacroTemplate.cpp | 31 ++++++++++--------------------- src/mathed/MathMacroTemplate.h | 2 -- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/src/mathed/MathMacroTemplate.cpp b/src/mathed/MathMacroTemplate.cpp index cb661f23cd..487c6b8754 100644 --- a/src/mathed/MathMacroTemplate.cpp +++ b/src/mathed/MathMacroTemplate.cpp @@ -58,9 +58,9 @@ class InsetLabelBox : public InsetMathNest { public: /// InsetLabelBox(MathAtom const & atom, docstring label, - MathMacroTemplate const & parent, bool frame = false); + MathMacroTemplate const & parent, bool frame = false); InsetLabelBox(docstring label, MathMacroTemplate const & parent, - bool frame = false); + bool frame = false); /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// @@ -172,8 +172,8 @@ void InsetLabelBox::draw(PainterInfo & pi, int x, int y) const int boxHeight = parent_.commonLabelBoxAscent() + parent_.commonLabelBoxDescent(); if (frame_) { pi.pain.rectangle(x + 1, y - dim.ascent() + 1, - dim.wid - 2, boxHeight - 2, - Color_mathline); + dim.wid - 2, boxHeight - 2, + Color_mathline); } } @@ -184,7 +184,7 @@ class DisplayLabelBox : public InsetLabelBox { public: /// DisplayLabelBox(MathAtom const & atom, docstring label, - MathMacroTemplate const & parent); + MathMacroTemplate const & parent); /// void metrics(MetricsInfo & mi, Dimension & dim) const; @@ -198,8 +198,8 @@ protected: DisplayLabelBox::DisplayLabelBox(MathAtom const & atom, - docstring label, - MathMacroTemplate const & parent) + docstring label, + MathMacroTemplate const & parent) : InsetLabelBox(atom, label, parent, true) { } @@ -216,7 +216,7 @@ void DisplayLabelBox::metrics(MetricsInfo & mi, Dimension & dim) const { InsetLabelBox::metrics(mi, dim); if (!parent_.editing(mi.base.bv) - && parent_.cell(parent_.displayIdx()).empty()) { + && parent_.cell(parent_.displayIdx()).empty()) { dim.wid = 0; dim.asc = 0; dim.des = 0; @@ -228,7 +228,7 @@ void DisplayLabelBox::metrics(MetricsInfo & mi, Dimension & dim) const void DisplayLabelBox::draw(PainterInfo & pi, int x, int y) const { if (parent_.editing(pi.base.bv) - || !parent_.cell(parent_.displayIdx()).empty()) { + || !parent_.cell(parent_.displayIdx()).empty()) { InsetLabelBox::draw(pi, x, y); } else { bool enabled = pi.pain.isDrawingEnabled(); @@ -299,7 +299,7 @@ private: InsetNameWrapper::InsetNameWrapper(MathData const * value, MathMacroTemplate const & parent) - : InsetMathWrapper(value), parent_(parent) + : InsetMathWrapper(value), parent_(parent) { } @@ -539,17 +539,6 @@ void MathMacroTemplate::edit(Cursor & cur, bool left) } -Inset * MathMacroTemplate::editXY(Cursor & cur, int x, int y) -{ - Inset * ret = InsetMathNest::editXY(cur, x, y); -/* if (!editing_ && editing(cur.bv())) { - - cur.updateFlags(Update::Force); - }*/ - return ret; -} - - bool MathMacroTemplate::notifyCursorLeaves(Cursor & cur) { updateLook(); diff --git a/src/mathed/MathMacroTemplate.h b/src/mathed/MathMacroTemplate.h index 2633d6c4c2..22f22e84d5 100644 --- a/src/mathed/MathMacroTemplate.h +++ b/src/mathed/MathMacroTemplate.h @@ -40,8 +40,6 @@ public: /// void edit(Cursor & cur, bool left); /// - Inset * editXY(Cursor & cur, int x, int y); - /// bool notifyCursorLeaves(Cursor & cur); /// void read(Buffer const &, Lexer & lex);