Separate 'cursor inside' and 'cursor behind' cases for statusline display.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@5909 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-01-07 11:24:43 +00:00
parent 19f0a9f142
commit 579857ebc5
9 changed files with 33 additions and 8 deletions

View File

@ -1,7 +1,8 @@
2003-01-07 João Luis Meloni Assirati <assirati@fma.if.usp.br> 2003-01-07 João Luis Meloni Assirati <assirati@fma.if.usp.br>
* math_hullinset.C: fix numbering problem of AMS gather and * math_hullinset.C: fix numbering problem of AMS gather and
multline environments (bugs 518 and 594). Treat gather the same multline environments. Treat gather the same
way as eqnarray and multline as a special case. way as eqnarray and multline as a special case.
2002-12-18 John Levon <levon@movementarian.org> 2002-12-18 John Levon <levon@movementarian.org>

View File

@ -1288,8 +1288,7 @@ string MathCursor::info() const
os << " "; os << " ";
} }
if (hasPrevAtom()) if (hasPrevAtom())
if (prevAtom()->asSymbolInset() || prevAtom()->asScriptInset()) prevAtom()->infoize2(os);
prevAtom()->infoize(os);
os << " "; os << " ";
return STRCONV(os.str()); return STRCONV(os.str());
} }

View File

@ -282,8 +282,10 @@ public:
virtual void mathmlize(MathMLStream &) const; virtual void mathmlize(MathMLStream &) const;
/// write content as something readable by Octave /// write content as something readable by Octave
virtual void octavize(OctaveStream &) const; virtual void octavize(OctaveStream &) const;
/// describe content /// describe content if cursor inside
virtual void infoize(std::ostream &) const {} virtual void infoize(std::ostream &) const {}
/// describe content if cursor behind
virtual void infoize2(std::ostream &) const {}
/// plain ascii output /// plain ascii output
virtual int ascii(std::ostream & os, int) const; virtual int ascii(std::ostream & os, int) const;
/// linuxdoc output /// linuxdoc output

View File

@ -223,3 +223,15 @@ void MathMacro::updateExpansion() const
expand(); expand();
expanded_.substitute(*this); expanded_.substitute(*this);
} }
void MathMacro::infoize(std::ostream & os) const
{
os << "Macro: " << name();
}
void MathMacro::infoize2(std::ostream & os) const
{
os << "Macro: " << name();
}

View File

@ -70,6 +70,10 @@ public:
void mathmlize(MathMLStream &) const; void mathmlize(MathMLStream &) const;
/// ///
void octavize(OctaveStream &) const; void octavize(OctaveStream &) const;
///
void infoize(std::ostream &) const;
///
void infoize2(std::ostream &) const;
private: private:
/// ///

View File

@ -472,6 +472,11 @@ void MathScriptInset::octavize(OctaveStream & os) const
void MathScriptInset::infoize(std::ostream & os) const void MathScriptInset::infoize(std::ostream & os) const
{ {
os << "Scripts"; os << "Scripts";
}
void MathScriptInset::infoize2(std::ostream & os) const
{
if (limits_) if (limits_)
os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits"); os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
} }

View File

@ -89,8 +89,10 @@ public:
void removeScript(bool up); void removeScript(bool up);
/// make sure a script is accessible /// make sure a script is accessible
void ensure(bool up); void ensure(bool up);
/// /// say that we have scripts
void infoize(std::ostream & os) const; void infoize(std::ostream & os) const;
/// say whether we have displayed limits
void infoize2(std::ostream & os) const;
/// local dispatcher /// local dispatcher
result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos); result_type dispatch(FuncRequest const & cmd, idx_type & idx, pos_type & pos);

View File

@ -192,7 +192,7 @@ void MathSymbolInset::write(WriteStream & os) const
} }
void MathSymbolInset::infoize(std::ostream & os) const void MathSymbolInset::infoize2(std::ostream & os) const
{ {
os << "Symbol: " << name(); os << "Symbol: " << name();
} }

View File

@ -57,7 +57,7 @@ public:
/// ///
void write(WriteStream & os) const; void write(WriteStream & os) const;
/// ///
void infoize(std::ostream & os) const; void infoize2(std::ostream & os) const;
private: private:
/// ///