mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
prepare writing info messages to the minibuffer
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@3390 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
6fb6cd8cc4
commit
a86ed9bea2
@ -378,6 +378,8 @@ InsetFormulaBase::localDispatch(BufferView * bv, kb_action action,
|
||||
case LFUN_RIGHT:
|
||||
result = mathcursor->right(sel) ? DISPATCHED : FINISHED_RIGHT;
|
||||
updateLocal(bv, false);
|
||||
// write something to the minibuffer
|
||||
//bv->owner()->message(mathcursor->info());
|
||||
break;
|
||||
|
||||
|
||||
|
@ -1470,3 +1470,12 @@ void MathCursor::setSelection(cursor_type const & where, size_type n)
|
||||
Cursor_ = where;
|
||||
cursor().pos_ += n;
|
||||
}
|
||||
|
||||
|
||||
string MathCursor::info() const
|
||||
{
|
||||
std::ostringstream os;
|
||||
if (pos() > 0)
|
||||
prevAtom()->infoize(os);
|
||||
return os.str();
|
||||
}
|
||||
|
@ -231,6 +231,8 @@ public:
|
||||
/// reference to the last item of the path, i.e. "The Cursor"
|
||||
MathCursorPos const & cursor() const;
|
||||
|
||||
/// describe the situation
|
||||
string info() const;
|
||||
/// dump selection information for debugging
|
||||
void seldump(char const * str) const;
|
||||
/// dump selection information for debugging
|
||||
|
@ -66,6 +66,7 @@ class OctaveStream;
|
||||
class MapleStream;
|
||||
class MathMLStream;
|
||||
class WriteStream;
|
||||
class InfoStream;
|
||||
class MathArray;
|
||||
|
||||
class LaTeXFeatures;
|
||||
@ -234,6 +235,8 @@ public:
|
||||
virtual void mathmlize(MathMLStream &) const;
|
||||
/// write content as something readable by Octave
|
||||
virtual void octavize(OctaveStream &) const;
|
||||
/// describe content
|
||||
virtual void infoize(std::ostream &) const {}
|
||||
|
||||
/// dump content to stderr for debugging
|
||||
virtual void dump() const;
|
||||
|
@ -177,3 +177,9 @@ void MathSymbolInset::write(WriteStream & os) const
|
||||
}
|
||||
|
||||
|
||||
void MathSymbolInset::infoize(std::ostream & os) const
|
||||
{
|
||||
os << '\\' << name();
|
||||
}
|
||||
|
||||
|
||||
|
@ -46,6 +46,8 @@ public:
|
||||
void octavize(OctaveStream &) const;
|
||||
///
|
||||
void write(WriteStream & os) const;
|
||||
///
|
||||
void infoize(std::ostream & os) const;
|
||||
|
||||
private:
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user