* tabs are evil

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22274 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Stefan Schimanski 2007-12-23 01:27:18 +00:00
parent 926befadd8
commit 83b46c7573
2 changed files with 10 additions and 23 deletions

View File

@ -58,9 +58,9 @@ class InsetLabelBox : public InsetMathNest {
public: public:
/// ///
InsetLabelBox(MathAtom const & atom, docstring label, InsetLabelBox(MathAtom const & atom, docstring label,
MathMacroTemplate const & parent, bool frame = false); MathMacroTemplate const & parent, bool frame = false);
InsetLabelBox(docstring label, MathMacroTemplate const & parent, InsetLabelBox(docstring label, MathMacroTemplate const & parent,
bool frame = false); bool frame = false);
/// ///
void metrics(MetricsInfo & mi, Dimension & dim) const; 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(); int boxHeight = parent_.commonLabelBoxAscent() + parent_.commonLabelBoxDescent();
if (frame_) { if (frame_) {
pi.pain.rectangle(x + 1, y - dim.ascent() + 1, pi.pain.rectangle(x + 1, y - dim.ascent() + 1,
dim.wid - 2, boxHeight - 2, dim.wid - 2, boxHeight - 2,
Color_mathline); Color_mathline);
} }
} }
@ -184,7 +184,7 @@ class DisplayLabelBox : public InsetLabelBox {
public: public:
/// ///
DisplayLabelBox(MathAtom const & atom, docstring label, DisplayLabelBox(MathAtom const & atom, docstring label,
MathMacroTemplate const & parent); MathMacroTemplate const & parent);
/// ///
void metrics(MetricsInfo & mi, Dimension & dim) const; void metrics(MetricsInfo & mi, Dimension & dim) const;
@ -198,8 +198,8 @@ protected:
DisplayLabelBox::DisplayLabelBox(MathAtom const & atom, DisplayLabelBox::DisplayLabelBox(MathAtom const & atom,
docstring label, docstring label,
MathMacroTemplate const & parent) MathMacroTemplate const & parent)
: InsetLabelBox(atom, label, parent, true) : InsetLabelBox(atom, label, parent, true)
{ {
} }
@ -216,7 +216,7 @@ void DisplayLabelBox::metrics(MetricsInfo & mi, Dimension & dim) const
{ {
InsetLabelBox::metrics(mi, dim); InsetLabelBox::metrics(mi, dim);
if (!parent_.editing(mi.base.bv) if (!parent_.editing(mi.base.bv)
&& parent_.cell(parent_.displayIdx()).empty()) { && parent_.cell(parent_.displayIdx()).empty()) {
dim.wid = 0; dim.wid = 0;
dim.asc = 0; dim.asc = 0;
dim.des = 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 void DisplayLabelBox::draw(PainterInfo & pi, int x, int y) const
{ {
if (parent_.editing(pi.base.bv) if (parent_.editing(pi.base.bv)
|| !parent_.cell(parent_.displayIdx()).empty()) { || !parent_.cell(parent_.displayIdx()).empty()) {
InsetLabelBox::draw(pi, x, y); InsetLabelBox::draw(pi, x, y);
} else { } else {
bool enabled = pi.pain.isDrawingEnabled(); bool enabled = pi.pain.isDrawingEnabled();
@ -299,7 +299,7 @@ private:
InsetNameWrapper::InsetNameWrapper(MathData const * value, InsetNameWrapper::InsetNameWrapper(MathData const * value,
MathMacroTemplate const & parent) 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) bool MathMacroTemplate::notifyCursorLeaves(Cursor & cur)
{ {
updateLook(); updateLook();

View File

@ -40,8 +40,6 @@ public:
/// ///
void edit(Cursor & cur, bool left); void edit(Cursor & cur, bool left);
/// ///
Inset * editXY(Cursor & cur, int x, int y);
///
bool notifyCursorLeaves(Cursor & cur); bool notifyCursorLeaves(Cursor & cur);
/// ///
void read(Buffer const &, Lexer & lex); void read(Buffer const &, Lexer & lex);