rename LCursor->Cursor

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18040 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2007-04-26 14:56:30 +00:00
parent 48b0e2561a
commit 42123ab8a7
112 changed files with 716 additions and 716 deletions

View File

@ -107,7 +107,7 @@ namespace {
/// Return an inset of this class if it exists at the current cursor position
template <class T>
T * getInsetByCode(LCursor & cur, InsetBase::Code code)
T * getInsetByCode(Cursor & cur, InsetBase::Code code)
{
T * inset = 0;
DocIterator it = cur;
@ -196,7 +196,7 @@ void BufferView::setBuffer(Buffer * b)
}
// Reset old cursor
cursor_ = LCursor(*this);
cursor_ = Cursor(*this);
anchor_ref_ = 0;
offset_ref_ = 0;
@ -511,7 +511,7 @@ void BufferView::setCursorFromScrollbar()
int const height = 2 * defaultRowHeight();
int const first = height;
int const last = height_ - height;
LCursor & cur = cursor_;
Cursor & cur = cursor_;
bv_funcs::CurStatus st = bv_funcs::status(this, cur);
@ -752,7 +752,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
if (!buffer_)
return Update::None;
LCursor & cur = cursor_;
Cursor & cur = cursor_;
// Default Update flags.
Update::flags updateFlags = Update::Force | Update::FitCursor;
@ -957,7 +957,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
break;
case LFUN_BIBTEX_DATABASE_ADD: {
LCursor tmpcur = cursor_;
Cursor tmpcur = cursor_;
bv_funcs::findInset(tmpcur, InsetBase::BIBTEX_CODE, false);
InsetBibtex * inset = getInsetByCode<InsetBibtex>(tmpcur,
InsetBase::BIBTEX_CODE);
@ -969,7 +969,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
}
case LFUN_BIBTEX_DATABASE_DEL: {
LCursor tmpcur = cursor_;
Cursor tmpcur = cursor_;
bv_funcs::findInset(tmpcur, InsetBase::BIBTEX_CODE, false);
InsetBibtex * inset = getInsetByCode<InsetBibtex>(tmpcur,
InsetBase::BIBTEX_CODE);
@ -1022,7 +1022,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
// wants to toggle.
InsetBase * inset = cur.nextInset();
if (inset && inset->isActive()) {
LCursor tmpcur = cur;
Cursor tmpcur = cur;
tmpcur.pushLeft(*inset);
inset->dispatch(tmpcur, tmpcmd);
if (tmpcur.result().dispatched()) {
@ -1052,7 +1052,7 @@ docstring const BufferView::requestSelection()
if (!buffer_)
return docstring();
LCursor & cur = cursor_;
Cursor & cur = cursor_;
if (!cur.selection()) {
xsel_cache_.set = false;
@ -1162,7 +1162,7 @@ bool BufferView::workAreaDispatch(FuncRequest const & cmd0)
if (!buffer_)
return false;
LCursor cur(*this);
Cursor cur(*this);
cur.push(buffer_->inset());
cur.selection() = cursor_.selection();
@ -1341,7 +1341,7 @@ void BufferView::setCursor(DocIterator const & dit)
}
bool BufferView::checkDepm(LCursor & cur, LCursor & old)
bool BufferView::checkDepm(Cursor & cur, Cursor & old)
{
// Would be wrong to delete anything if we have a selection.
if (cur.selection())
@ -1365,7 +1365,7 @@ bool BufferView::checkDepm(LCursor & cur, LCursor & old)
}
bool BufferView::mouseSetCursor(LCursor & cur)
bool BufferView::mouseSetCursor(Cursor & cur)
{
BOOST_ASSERT(&cur.bv() == this);
@ -1425,13 +1425,13 @@ void BufferView::putSelectionAt(DocIterator const & cur,
}
LCursor & BufferView::cursor()
Cursor & BufferView::cursor()
{
return cursor_;
}
LCursor const & BufferView::cursor() const
Cursor const & BufferView::cursor() const
{
return cursor_;
}

View File

@ -16,7 +16,7 @@
#define BUFFER_VIEW_H
#include "CoordCache.h"
#include "LCursor.h"
#include "Cursor.h"
#include "MetricsInfo.h"
#include "TextMetrics.h"
#include "UpdateFlags.h"
@ -41,7 +41,7 @@ class DocIterator;
class FuncRequest;
class FuncStatus;
class Intl;
class LCursor;
class Cursor;
class LyXText;
class ParIterator;
class ParagraphMetrics;
@ -175,18 +175,18 @@ public:
pit_type anchor_ref() const;
/// access to full cursor.
LCursor & cursor();
Cursor & cursor();
/// access to full cursor.
LCursor const & cursor() const;
Cursor const & cursor() const;
/// sets cursor.
/// This will also open all relevant collapsable insets.
void setCursor(DocIterator const &);
/// Check deleteEmptyParagraphMechanism and update metrics if needed.
/// \retval true if an update was needed.
bool checkDepm(LCursor & cur, LCursor & old);
bool checkDepm(Cursor & cur, Cursor & old);
/// sets cursor.
/// This is used when handling LFUN_MOUSE_PRESS.
bool mouseSetCursor(LCursor & cur);
bool mouseSetCursor(Cursor & cur);
/// sets the selection.
/* When \c backwards == false, set anchor
@ -285,7 +285,7 @@ private:
bool set;
} xsel_cache_;
///
LCursor cursor_;
Cursor cursor_;
///
bool multiparsel_cache_;
///

View File

@ -522,7 +522,7 @@
* text3.C (dispatch): LFUN_NEXT_INSET_TOGGLE: first try to
dispatch LFUN_INSET_TOGGLE to inset at cursor, and then to
containg inset. If this does not work, the same command will be
sent to other insets down the queue by LCursor::dispatch. (bug 2066)
sent to other insets down the queue by Cursor::dispatch. (bug 2066)
* lyxfunc.C (dispatch): make sure the cursor is correct when doing
a dispatch.
@ -674,7 +674,7 @@
2005-09-19 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* text2.C (setCursor): remove the unused 'boundary' parameter for
the CursorSlice version; adapt the LCursor version.
the CursorSlice version; adapt the Cursor version.
* lyxrc.C (write):
* paragraph_pimpl.C (markErased):
@ -2378,7 +2378,7 @@
2004-11-24 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
* lyxfunc.C (getStatus, dispatch): use FuncStatus::message; only
call BufferView::getStatus if LCursor::getStatus did nothing
call BufferView::getStatus if Cursor::getStatus did nothing
(setStatusMessage, getStatusMessage): removed.
* FuncStatus.C (message): new methods. Used to provide an error
@ -3112,9 +3112,9 @@
Fix toggling of collapsable insets with the mouse (bug 1558)
* lyxfunc.C (dispatch): adapt to LCursor changes
* lyxfunc.C (dispatch): adapt to Cursor changes
* BufferView_pimpl.C (workAreaDispatch): adapt to LCursor changes;
* BufferView_pimpl.C (workAreaDispatch): adapt to Cursor changes;
make sure that dispatch is not invoked twice
* cursor.C (needsUpdate): new method
@ -4085,7 +4085,7 @@
2004-03-01 André Pönitz <poenitz@gmx.net>
* dociterator.[Ch]: new class for the 'iterator part' of LCursor.
* dociterator.[Ch]: new class for the 'iterator part' of Cursor.
* cursor.[Ch]: adjust, additioally: remove the 'current_' machinery
@ -4222,7 +4222,7 @@
* lyxtext.h:
* text.C:
* text2.C:
* text3.C: add LCursor & parameter to most cursor movement functions
* text3.C: add Cursor & parameter to most cursor movement functions
remove usage of LyXText::cursorRow() and cursorPar()
* cursor.[Ch]: add textRow() needed members
@ -4242,7 +4242,7 @@
* cursor.[Ch]: fix mathed crash
* lyxfind.C:
* lyxtext.h: move selectionAsText to LCursor
* lyxtext.h: move selectionAsText to Cursor
* output_latex.C:
* paragraph.C:
@ -4284,10 +4284,10 @@
2004-02-03 Alfredo Braunstein <abraunst@lyx.org>
* BufferView_pimpl.C (dispatch): remove call to LCursor::dispatch
* BufferView_pimpl.C (dispatch): remove call to Cursor::dispatch
on the default clause of the switch
* lyxfunc.C (dispatch): call BufferView::dispatch if the event
wasn't catched by LCursor::dispatch
wasn't catched by Cursor::dispatch
2004-02-03 André Pönitz <poenitz@gmx.net>
@ -4474,7 +4474,7 @@
* text2.C:
* text3.C:
* undo.[Ch]: lots of IU. Shift selection stuff from the BufferView to
LCursor and mathcursor parts to LCursor and InsetBase.
Cursor and mathcursor parts to Cursor and InsetBase.
2004-01-15 André Pönitz <poenitz@gmx.net>
@ -5024,7 +5024,7 @@
2003-11-17 Alfredo Braunstein <abraunst@lyx.org>
* lyxfunc.C (dispatch): add a missing LCursor::updatePos (fix
* lyxfunc.C (dispatch): add a missing Cursor::updatePos (fix
cursor position after e.g. inset insert)
2003-11-16 Alfredo Braunstein <abraunst@lyx.org>
@ -5226,7 +5226,7 @@
* cursor.[Ch]: restructure
* BufferView.[Ch]:
* BufferView_pimpl.[Ch]: new LCursor cursor_ member
* BufferView_pimpl.[Ch]: new Cursor cursor_ member
* iterators.[Ch] (asCursor): remove

View File

@ -1,5 +1,5 @@
/**
* \file LCursor.cpp
* \file Cursor.cpp
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
@ -15,7 +15,7 @@
#include "BufferView.h"
#include "bufferview_funcs.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CoordCache.h"
#include "CutAndPaste.h"
#include "debug.h"
@ -80,7 +80,7 @@ namespace {
// Find position closest to (x, y) in cell given by iter.
// Used only in mathed
DocIterator bruteFind2(LCursor const & c, int x, int y)
DocIterator bruteFind2(Cursor const & c, int x, int y)
{
double best_dist = std::numeric_limits<double>::max();
@ -130,7 +130,7 @@ namespace {
/// moves position closest to (x, y) in given box
bool bruteFind(LCursor & cursor,
bool bruteFind(Cursor & cursor,
int x, int y, int xlow, int xhigh, int ylow, int yhigh)
{
BOOST_ASSERT(!cursor.empty());
@ -186,7 +186,7 @@ namespace {
/// moves position closest to (x, y) in given box
bool bruteFind3(LCursor & cur, int x, int y, bool up)
bool bruteFind3(Cursor & cur, int x, int y, bool up)
{
BufferView & bv = cur.bv();
int ylow = up ? 0 : y + 1;
@ -250,13 +250,13 @@ namespace {
// be careful: this is called from the bv's constructor, too, so
// bv functions are not yet available!
LCursor::LCursor(BufferView & bv)
Cursor::Cursor(BufferView & bv)
: DocIterator(), bv_(&bv), anchor_(), x_target_(-1),
selection_(false), mark_(false), logicalpos_(false)
{}
void LCursor::reset(InsetBase & inset)
void Cursor::reset(InsetBase & inset)
{
clear();
push_back(CursorSlice(inset));
@ -268,13 +268,13 @@ void LCursor::reset(InsetBase & inset)
// this (intentionally) does neither touch anchor nor selection status
void LCursor::setCursor(DocIterator const & cur)
void Cursor::setCursor(DocIterator const & cur)
{
DocIterator::operator=(cur);
}
void LCursor::dispatch(FuncRequest const & cmd0)
void Cursor::dispatch(FuncRequest const & cmd0)
{
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION
<< " cmd: " << cmd0 << '\n'
@ -284,10 +284,10 @@ void LCursor::dispatch(FuncRequest const & cmd0)
fixIfBroken();
FuncRequest cmd = cmd0;
LCursor safe = *this;
Cursor safe = *this;
for (; depth(); pop()) {
LYXERR(Debug::DEBUG) << "LCursor::dispatch: cmd: "
LYXERR(Debug::DEBUG) << "Cursor::dispatch: cmd: "
<< cmd0 << endl << *this << endl;
BOOST_ASSERT(pos() <= lastpos());
BOOST_ASSERT(idx() <= lastidx());
@ -313,20 +313,20 @@ void LCursor::dispatch(FuncRequest const & cmd0)
}
DispatchResult LCursor::result() const
DispatchResult Cursor::result() const
{
return disp_;
}
BufferView & LCursor::bv() const
BufferView & Cursor::bv() const
{
BOOST_ASSERT(bv_);
return *bv_;
}
Buffer & LCursor::buffer() const
Buffer & Cursor::buffer() const
{
BOOST_ASSERT(bv_);
BOOST_ASSERT(bv_->buffer());
@ -334,20 +334,20 @@ Buffer & LCursor::buffer() const
}
void LCursor::pop()
void Cursor::pop()
{
BOOST_ASSERT(depth() >= 1);
pop_back();
}
void LCursor::push(InsetBase & p)
void Cursor::push(InsetBase & p)
{
push_back(CursorSlice(p));
}
void LCursor::pushLeft(InsetBase & p)
void Cursor::pushLeft(InsetBase & p)
{
BOOST_ASSERT(!empty());
//lyxerr << "Entering inset " << t << " left" << endl;
@ -356,7 +356,7 @@ void LCursor::pushLeft(InsetBase & p)
}
bool LCursor::popLeft()
bool Cursor::popLeft()
{
BOOST_ASSERT(!empty());
//lyxerr << "Leaving inset to the left" << endl;
@ -368,7 +368,7 @@ bool LCursor::popLeft()
}
bool LCursor::popRight()
bool Cursor::popRight()
{
BOOST_ASSERT(!empty());
//lyxerr << "Leaving inset to the right" << endl;
@ -382,7 +382,7 @@ bool LCursor::popRight()
}
int LCursor::currentMode()
int Cursor::currentMode()
{
BOOST_ASSERT(!empty());
for (int i = depth() - 1; i >= 0; --i) {
@ -394,7 +394,7 @@ int LCursor::currentMode()
}
void LCursor::getPos(int & x, int & y) const
void Cursor::getPos(int & x, int & y) const
{
Point p = bv_funcs::getPos(bv(), *this, boundary());
x = p.x_;
@ -402,7 +402,7 @@ void LCursor::getPos(int & x, int & y) const
}
Row const & LCursor::textRow() const
Row const & Cursor::textRow() const
{
ParagraphMetrics const & pm = bv().parMetrics(text(), pit());
BOOST_ASSERT(!pm.rows().empty());
@ -410,14 +410,14 @@ Row const & LCursor::textRow() const
}
void LCursor::resetAnchor()
void Cursor::resetAnchor()
{
anchor_ = *this;
}
bool LCursor::posLeft()
bool Cursor::posLeft()
{
if (pos() == 0)
return false;
@ -426,7 +426,7 @@ bool LCursor::posLeft()
}
bool LCursor::posRight()
bool Cursor::posRight()
{
if (pos() == lastpos())
return false;
@ -435,7 +435,7 @@ bool LCursor::posRight()
}
CursorSlice LCursor::anchor() const
CursorSlice Cursor::anchor() const
{
BOOST_ASSERT(anchor_.depth() >= depth());
CursorSlice normal = anchor_[depth() - 1];
@ -447,7 +447,7 @@ CursorSlice LCursor::anchor() const
}
CursorSlice LCursor::selBegin() const
CursorSlice Cursor::selBegin() const
{
if (!selection())
return top();
@ -455,7 +455,7 @@ CursorSlice LCursor::selBegin() const
}
CursorSlice LCursor::selEnd() const
CursorSlice Cursor::selEnd() const
{
if (!selection())
return top();
@ -463,7 +463,7 @@ CursorSlice LCursor::selEnd() const
}
DocIterator LCursor::selectionBegin() const
DocIterator Cursor::selectionBegin() const
{
if (!selection())
return *this;
@ -473,7 +473,7 @@ DocIterator LCursor::selectionBegin() const
}
DocIterator LCursor::selectionEnd() const
DocIterator Cursor::selectionEnd() const
{
if (!selection())
return *this;
@ -486,7 +486,7 @@ DocIterator LCursor::selectionEnd() const
}
void LCursor::setSelection()
void Cursor::setSelection()
{
selection() = true;
// A selection with no contents is not a selection
@ -498,7 +498,7 @@ void LCursor::setSelection()
}
void LCursor::setSelection(DocIterator const & where, int n)
void Cursor::setSelection(DocIterator const & where, int n)
{
setCursor(where);
selection() = true;
@ -507,7 +507,7 @@ void LCursor::setSelection(DocIterator const & where, int n)
}
void LCursor::clearSelection()
void Cursor::clearSelection()
{
selection() = false;
mark() = false;
@ -515,26 +515,26 @@ void LCursor::clearSelection()
}
int & LCursor::x_target()
int & Cursor::x_target()
{
return x_target_;
}
int LCursor::x_target() const
int Cursor::x_target() const
{
return x_target_;
}
void LCursor::clearTargetX()
void Cursor::clearTargetX()
{
x_target_ = -1;
}
void LCursor::info(odocstream & os) const
void Cursor::info(odocstream & os) const
{
for (int i = 1, n = depth(); i < n; ++i) {
operator[](i).inset().infoize(os);
@ -551,9 +551,9 @@ void LCursor::info(odocstream & os) const
}
bool LCursor::selHandle(bool sel)
bool Cursor::selHandle(bool sel)
{
//lyxerr << "LCursor::selHandle" << endl;
//lyxerr << "Cursor::selHandle" << endl;
if (sel == selection())
return false;
@ -564,7 +564,7 @@ bool LCursor::selHandle(bool sel)
}
std::ostream & operator<<(std::ostream & os, LCursor const & cur)
std::ostream & operator<<(std::ostream & os, Cursor const & cur)
{
os << "\n cursor: | anchor:\n";
for (size_t i = 0, n = cur.depth(); i != n; ++i) {
@ -608,7 +608,7 @@ namespace lyx {
//#define FILEDEBUG 1
bool LCursor::isInside(InsetBase const * p)
bool Cursor::isInside(InsetBase const * p)
{
for (size_t i = 0; i != depth(); ++i)
if (&operator[](i).inset() == p)
@ -617,7 +617,7 @@ bool LCursor::isInside(InsetBase const * p)
}
void LCursor::leaveInset(InsetBase const & inset)
void Cursor::leaveInset(InsetBase const & inset)
{
for (size_t i = 0; i != depth(); ++i) {
if (&operator[](i).inset() == &inset) {
@ -628,7 +628,7 @@ void LCursor::leaveInset(InsetBase const & inset)
}
bool LCursor::openable(MathAtom const & t) const
bool Cursor::openable(MathAtom const & t) const
{
if (!t->isActive())
return false;
@ -649,7 +649,7 @@ bool LCursor::openable(MathAtom const & t) const
}
void LCursor::setScreenPos(int x, int y)
void Cursor::setScreenPos(int x, int y)
{
x_target() = x;
bruteFind(*this, x, y, 0, bv().workWidth(), 0, bv().workHeight());
@ -657,42 +657,42 @@ void LCursor::setScreenPos(int x, int y)
void LCursor::plainErase()
void Cursor::plainErase()
{
cell().erase(pos());
}
void LCursor::markInsert()
void Cursor::markInsert()
{
insert(char_type(0));
}
void LCursor::markErase()
void Cursor::markErase()
{
cell().erase(pos());
}
void LCursor::plainInsert(MathAtom const & t)
void Cursor::plainInsert(MathAtom const & t)
{
cell().insert(pos(), t);
++pos();
}
void LCursor::insert(docstring const & str)
void Cursor::insert(docstring const & str)
{
for_each(str.begin(), str.end(),
boost::bind(static_cast<void(LCursor::*)(char_type)>
(&LCursor::insert), this, _1));
boost::bind(static_cast<void(Cursor::*)(char_type)>
(&Cursor::insert), this, _1));
}
void LCursor::insert(char_type c)
void Cursor::insert(char_type c)
{
//lyxerr << "LCursor::insert char '" << c << "'" << endl;
//lyxerr << "Cursor::insert char '" << c << "'" << endl;
BOOST_ASSERT(!empty());
if (inMathed()) {
cap::selClearOrDel(*this);
@ -703,16 +703,16 @@ void LCursor::insert(char_type c)
}
void LCursor::insert(MathAtom const & t)
void Cursor::insert(MathAtom const & t)
{
//lyxerr << "LCursor::insert MathAtom '" << t << "'" << endl;
//lyxerr << "Cursor::insert MathAtom '" << t << "'" << endl;
macroModeClose();
cap::selClearOrDel(*this);
plainInsert(t);
}
void LCursor::insert(InsetBase * inset)
void Cursor::insert(InsetBase * inset)
{
if (inMathed())
insert(MathAtom(inset));
@ -721,7 +721,7 @@ void LCursor::insert(InsetBase * inset)
}
void LCursor::niceInsert(docstring const & t)
void Cursor::niceInsert(docstring const & t)
{
MathArray ar;
asArray(t, ar);
@ -732,7 +732,7 @@ void LCursor::niceInsert(docstring const & t)
}
void LCursor::niceInsert(MathAtom const & t)
void Cursor::niceInsert(MathAtom const & t)
{
macroModeClose();
docstring const safe = cap::grabAndEraseSelection(*this);
@ -751,7 +751,7 @@ void LCursor::niceInsert(MathAtom const & t)
}
void LCursor::insert(MathArray const & ar)
void Cursor::insert(MathArray const & ar)
{
macroModeClose();
if (selection())
@ -761,7 +761,7 @@ void LCursor::insert(MathArray const & ar)
}
bool LCursor::backspace()
bool Cursor::backspace()
{
autocorrect() = false;
@ -813,7 +813,7 @@ bool LCursor::backspace()
}
bool LCursor::erase()
bool Cursor::erase()
{
autocorrect() = false;
if (inMacroMode())
@ -861,7 +861,7 @@ bool LCursor::erase()
}
bool LCursor::up()
bool Cursor::up()
{
macroModeClose();
DocIterator save = *this;
@ -873,7 +873,7 @@ bool LCursor::up()
}
bool LCursor::down()
bool Cursor::down()
{
macroModeClose();
DocIterator save = *this;
@ -885,7 +885,7 @@ bool LCursor::down()
}
bool LCursor::macroModeClose()
bool Cursor::macroModeClose()
{
if (!inMacroMode())
return false;
@ -912,15 +912,15 @@ bool LCursor::macroModeClose()
}
docstring LCursor::macroName()
docstring Cursor::macroName()
{
return inMacroMode() ? activeMacro()->name() : docstring();
}
void LCursor::handleNest(MathAtom const & a, int c)
void Cursor::handleNest(MathAtom const & a, int c)
{
//lyxerr << "LCursor::handleNest: " << c << endl;
//lyxerr << "Cursor::handleNest: " << c << endl;
MathAtom t = a;
asArray(cap::grabAndEraseSelection(*this), t.nucleus()->cell(c));
insert(t);
@ -929,7 +929,7 @@ void LCursor::handleNest(MathAtom const & a, int c)
}
int LCursor::targetX() const
int Cursor::targetX() const
{
if (x_target() != -1)
return x_target();
@ -940,7 +940,7 @@ int LCursor::targetX() const
}
void LCursor::setTargetX()
void Cursor::setTargetX()
{
int x;
int y;
@ -949,7 +949,7 @@ void LCursor::setTargetX()
}
bool LCursor::inMacroMode() const
bool Cursor::inMacroMode() const
{
if (pos() == 0)
return false;
@ -958,13 +958,13 @@ bool LCursor::inMacroMode() const
}
InsetMathUnknown * LCursor::activeMacro()
InsetMathUnknown * Cursor::activeMacro()
{
return inMacroMode() ? prevAtom().nucleus()->asUnknownInset() : 0;
}
void LCursor::pullArg()
void Cursor::pullArg()
{
#ifdef WITH_WARNINGS
#warning Look here
@ -980,7 +980,7 @@ void LCursor::pullArg()
}
void LCursor::touch()
void Cursor::touch()
{
#ifdef WITH_WARNINGS
#warning look here
@ -994,7 +994,7 @@ void LCursor::touch()
}
void LCursor::normalize()
void Cursor::normalize()
{
if (idx() > lastidx()) {
lyxerr << "this should not really happen - 1: "
@ -1016,7 +1016,7 @@ void LCursor::normalize()
}
bool LCursor::goUpDown(bool up)
bool Cursor::goUpDown(bool up)
{
// Be warned: The 'logic' implemented in this function is highly
// fragile. A distance of one pixel or a '<' vs '<=' _really
@ -1111,7 +1111,7 @@ bool LCursor::goUpDown(bool up)
}
void LCursor::handleFont(string const & font)
void Cursor::handleFont(string const & font)
{
LYXERR(Debug::DEBUG) << BOOST_CURRENT_FUNCTION << ": " << font << endl;
docstring safe;
@ -1146,19 +1146,19 @@ void LCursor::handleFont(string const & font)
}
void LCursor::message(docstring const & msg) const
void Cursor::message(docstring const & msg) const
{
theLyXFunc().setMessage(msg);
}
void LCursor::errorMessage(docstring const & msg) const
void Cursor::errorMessage(docstring const & msg) const
{
theLyXFunc().setErrorMessage(msg);
}
docstring LCursor::selectionAsString(bool label) const
docstring Cursor::selectionAsString(bool label) const
{
if (!selection())
return docstring();
@ -1199,7 +1199,7 @@ docstring LCursor::selectionAsString(bool label) const
}
docstring LCursor::currentState()
docstring Cursor::currentState()
{
if (inMathed()) {
odocstringstream os;
@ -1214,13 +1214,13 @@ docstring LCursor::currentState()
}
docstring LCursor::getPossibleLabel()
docstring Cursor::getPossibleLabel()
{
return inMathed() ? from_ascii("eq:") : text()->getPossibleLabel(*this);
}
Encoding const * LCursor::getEncoding() const
Encoding const * Cursor::getEncoding() const
{
if (empty())
return 0;
@ -1240,31 +1240,31 @@ Encoding const * LCursor::getEncoding() const
}
void LCursor::undispatched()
void Cursor::undispatched()
{
disp_.dispatched(false);
}
void LCursor::dispatched()
void Cursor::dispatched()
{
disp_.dispatched(true);
}
void LCursor::updateFlags(Update::flags f)
void Cursor::updateFlags(Update::flags f)
{
disp_.update(f);
}
void LCursor::noUpdate()
void Cursor::noUpdate()
{
disp_.update(Update::None);
}
LyXFont LCursor::getFont() const
LyXFont Cursor::getFont() const
{
// HACK. far from being perfect...
int s = 0;
@ -1284,10 +1284,10 @@ LyXFont LCursor::getFont() const
}
void LCursor::fixIfBroken()
void Cursor::fixIfBroken()
{
// find out last good level
LCursor copy = *this;
Cursor copy = *this;
size_t newdepth = depth();
while (!copy.empty()) {
if (copy.idx() > copy.lastidx()) {

View File

@ -1,6 +1,6 @@
// -*- C++ -*-
/**
* \file LCursor.h
* \file Cursor.h
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
@ -37,10 +37,10 @@ class Encoding;
// The public inheritance should go in favour of a suitable data member
// (or maybe private inheritance) at some point of time.
class LCursor : public DocIterator {
class Cursor : public DocIterator {
public:
/// create the cursor of a BufferView
explicit LCursor(BufferView & bv);
explicit Cursor(BufferView & bv);
/// dispatch from innermost inset upwards
void dispatch(FuncRequest const & cmd);
@ -178,7 +178,7 @@ public:
void fixIfBroken();
/// output
friend std::ostream & operator<<(std::ostream & os, LCursor const & cur);
friend std::ostream & operator<<(std::ostream & os, Cursor const & cur);
public:
///

View File

@ -18,7 +18,7 @@
#include "Buffer.h"
#include "buffer_funcs.h"
#include "BufferParams.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "ErrorList.h"
#include "FuncRequest.h"
@ -105,7 +105,7 @@ bool checkPastePossible(int index)
pair<PitPosPair, pit_type>
pasteSelectionHelper(LCursor & cur, ParagraphList const & parlist,
pasteSelectionHelper(Cursor & cur, ParagraphList const & parlist,
textclass_type textclass, ErrorList & errorlist)
{
Buffer const & buffer = cur.buffer();
@ -399,7 +399,7 @@ void copySelectionHelper(Buffer const & buf, ParagraphList & pars,
namespace cap {
docstring grabAndEraseSelection(LCursor & cur)
docstring grabAndEraseSelection(Cursor & cur)
{
if (!cur.selection())
return docstring();
@ -510,7 +510,7 @@ size_type numberOfSelections()
}
void cutSelection(LCursor & cur, bool doclear, bool realcut)
void cutSelection(Cursor & cur, bool doclear, bool realcut)
{
// This doesn't make sense, if there is no selection
if (!cur.selection())
@ -587,7 +587,7 @@ void cutSelection(LCursor & cur, bool doclear, bool realcut)
}
void copySelection(LCursor & cur)
void copySelection(Cursor & cur)
{
copySelection(cur, cur.selectionAsString(true));
}
@ -595,7 +595,7 @@ void copySelection(LCursor & cur)
namespace {
void copySelectionToStack(LCursor & cur, CutStack & cutstack)
void copySelectionToStack(Cursor & cur, CutStack & cutstack)
{
// this doesn't make sense, if there is no selection
if (!cur.selection())
@ -642,7 +642,7 @@ void copySelectionToStack()
}
void copySelection(LCursor & cur, docstring const & plaintext)
void copySelection(Cursor & cur, docstring const & plaintext)
{
// In tablemode, because copy and paste actually use special table stack
// we do not attemp to get selected paragraphs under cursor. Instead, a
@ -664,7 +664,7 @@ void copySelection(LCursor & cur, docstring const & plaintext)
}
void saveSelection(LCursor & cur)
void saveSelection(Cursor & cur)
{
LYXERR(Debug::ACTION) << BOOST_CURRENT_FUNCTION << ": `"
<< to_utf8(cur.selectionAsString(true)) << "'."
@ -697,7 +697,7 @@ docstring getSelection(Buffer const & buf, size_t sel_index)
}
void pasteParagraphList(LCursor & cur, ParagraphList const & parlist,
void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
textclass_type textclass, ErrorList & errorList)
{
if (cur.inTexted()) {
@ -720,7 +720,7 @@ void pasteParagraphList(LCursor & cur, ParagraphList const & parlist,
}
void pasteFromStack(LCursor & cur, ErrorList & errorList, size_t sel_index)
void pasteFromStack(Cursor & cur, ErrorList & errorList, size_t sel_index)
{
// this does not make sense, if there is nothing to paste
if (!checkPastePossible(sel_index))
@ -734,7 +734,7 @@ void pasteFromStack(LCursor & cur, ErrorList & errorList, size_t sel_index)
}
void pasteClipboard(LCursor & cur, ErrorList & errorList, bool asParagraphs)
void pasteClipboard(Cursor & cur, ErrorList & errorList, bool asParagraphs)
{
// Use internal clipboard if it is the most recent one
if (theClipboard().isInternal()) {
@ -772,7 +772,7 @@ void pasteClipboard(LCursor & cur, ErrorList & errorList, bool asParagraphs)
}
void pasteSelection(LCursor & cur, ErrorList & errorList)
void pasteSelection(Cursor & cur, ErrorList & errorList)
{
if (selectionBuffer.empty())
return;
@ -783,7 +783,7 @@ void pasteSelection(LCursor & cur, ErrorList & errorList)
}
void replaceSelectionWithString(LCursor & cur, docstring const & str, bool backwards)
void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwards)
{
recordUndo(cur);
DocIterator selbeg = cur.selectionBegin();
@ -813,14 +813,14 @@ void replaceSelectionWithString(LCursor & cur, docstring const & str, bool backw
}
void replaceSelection(LCursor & cur)
void replaceSelection(Cursor & cur)
{
if (cur.selection())
cutSelection(cur, true, false);
}
void eraseSelection(LCursor & cur)
void eraseSelection(Cursor & cur)
{
//lyxerr << "cap::eraseSelection begin: " << cur << endl;
CursorSlice const & i1 = cur.selBegin();
@ -854,7 +854,7 @@ void eraseSelection(LCursor & cur)
}
void selDel(LCursor & cur)
void selDel(Cursor & cur)
{
//lyxerr << "cap::selDel" << endl;
if (cur.selection())
@ -862,7 +862,7 @@ void selDel(LCursor & cur)
}
void selClearOrDel(LCursor & cur)
void selClearOrDel(Cursor & cur)
{
//lyxerr << "cap::selClearOrDel" << endl;
if (lyxrc.auto_region_delete)
@ -872,7 +872,7 @@ void selClearOrDel(LCursor & cur)
}
docstring grabSelection(LCursor const & cur)
docstring grabSelection(Cursor const & cur)
{
if (!cur.selection())
return docstring();

View File

@ -24,7 +24,7 @@ class Buffer;
class ErrorList;
class InsetText;
class LyXTextClass;
class LCursor;
class Cursor;
class ParagraphList;
namespace cap {
@ -42,11 +42,11 @@ docstring getSelection(Buffer const & buffer, size_t sel_index);
* cursor; otherwise set cursor before anchor.
* Does handle undo.
*/
void replaceSelectionWithString(LCursor & cur, docstring const & str,
void replaceSelectionWithString(Cursor & cur, docstring const & str,
bool backwards);
/// If a selection exists, delete it without pushing it to the cut buffer.
/// Does handle undo.
void replaceSelection(LCursor & cur);
void replaceSelection(Cursor & cur);
/**
* Cut the current selection and possibly push it to the cut buffer and
@ -58,37 +58,37 @@ void replaceSelection(LCursor & cur);
* system clipboard. Set this to false to only delete the
* selection.
*/
void cutSelection(LCursor & cur, bool doclear = true, bool realcut = true);
void cutSelection(Cursor & cur, bool doclear = true, bool realcut = true);
/// Push the current selection to the cut buffer and the system clipboard.
void copySelection(LCursor & cur);
void copySelection(Cursor & cur);
/**
* Push the current selection to the cut buffer and the system clipboard.
* \param plaintext plain text version of the selection for the system
* clipboard
*/
void copySelection(LCursor & cur, docstring const & plaintext);
void copySelection(Cursor & cur, docstring const & plaintext);
/// Push the selection buffer to the cut buffer.
void copySelectionToStack();
/// Store the current selection in the internal selection buffer
void saveSelection(LCursor & cur);
void saveSelection(Cursor & cur);
/// Is a selection available in our selection buffer?
bool selection();
/// Clear our selection buffer
void clearSelection();
/// Paste the current selection at \p cur
/// Does handle undo. Does only work in text, not mathed.
void pasteSelection(LCursor & cur, ErrorList &);
void pasteSelection(Cursor & cur, ErrorList &);
/// Replace the current selection with the clipboard contents (internal or
/// external: which is newer)
/// Does handle undo. Does only work in text, not mathed.
void pasteClipboard(LCursor & cur, ErrorList & errorList, bool asParagraphs = true);
void pasteClipboard(Cursor & cur, ErrorList & errorList, bool asParagraphs = true);
/// Replace the current selection with cut buffer \c sel_index
/// Does handle undo. Does only work in text, not mathed.
void pasteFromStack(LCursor & cur, ErrorList & errorList, size_t sel_index);
void pasteFromStack(Cursor & cur, ErrorList & errorList, size_t sel_index);
/// Paste the paragraph list \p parlist at the position given by \p cur.
/// Does not handle undo. Does only work in text, not mathed.
void pasteParagraphList(LCursor & cur, ParagraphList const & parlist,
void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
textclass_type textclass, ErrorList & errorList);
@ -101,20 +101,20 @@ void switchBetweenClasses(textclass_type c1, textclass_type c2,
/// Get the current selection as a string. Does not change the selection.
/// Does only work if the whole selection is in mathed.
docstring grabSelection(LCursor const & cur);
docstring grabSelection(Cursor const & cur);
/// Erase the current selection.
/// Does not handle undo. Does only work if the whole selection is in mathed.
void eraseSelection(LCursor & cur);
void eraseSelection(Cursor & cur);
/// Erase the selection and return it as a string.
/// Does not handle undo. Does only work if the whole selection is in mathed.
docstring grabAndEraseSelection(LCursor & cur);
docstring grabAndEraseSelection(Cursor & cur);
// other selection methods
/// Erase the selection if one exists.
/// Does not handle undo. Does only work if the whole selection is in mathed.
void selDel(LCursor & cur);
void selDel(Cursor & cur);
/// Clear or delete the selection if one exists, depending on lyxrc setting.
/// Does not handle undo. Does only work if the whole selection is in mathed.
void selClearOrDel(LCursor & cur);
void selClearOrDel(Cursor & cur);
/** Tabular has its own paste stack for multiple cells
* but it needs to know whether there is a more recent

View File

@ -28,7 +28,7 @@
#include "BufferParams.h"
#include "BufferView.h"
#include "bufferview_funcs.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "debug.h"
#include "DispatchResult.h"
@ -146,7 +146,7 @@ namespace fs = boost::filesystem;
namespace {
bool getLocalStatus(LCursor cursor,
bool getLocalStatus(Cursor cursor,
FuncRequest const & cmd, FuncStatus & status)
{
// Try to fix cursor in case it is broken.
@ -155,10 +155,10 @@ bool getLocalStatus(LCursor cursor,
// This is, of course, a mess. Better create a new doc iterator and use
// this in Inset::getStatus. This might require an additional
// BufferView * arg, though (which should be avoided)
//LCursor safe = *this;
//Cursor safe = *this;
bool res = false;
for ( ; cursor.depth(); cursor.pop()) {
//lyxerr << "\nLCursor::getStatus: cmd: " << cmd << endl << *this << endl;
//lyxerr << "\nCursor::getStatus: cmd: " << cmd << endl << *this << endl;
BOOST_ASSERT(cursor.idx() <= cursor.lastidx());
BOOST_ASSERT(cursor.pit() <= cursor.lastpit());
BOOST_ASSERT(cursor.pos() <= cursor.lastpos());
@ -383,7 +383,7 @@ FuncStatus LyXFunc::getStatus(FuncRequest const & cmd) const
//lyxerr << "LyXFunc::getStatus: cmd: " << cmd << endl;
FuncStatus flag;
LCursor & cur = view()->cursor();
Cursor & cur = view()->cursor();
/* In LyX/Mac, when a dialog is open, the menus of the
application can still be accessed without giving focus to
@ -1556,7 +1556,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
InsetBase::Code const inset_code =
InsetBase::translate(name);
LCursor & cur = view()->cursor();
Cursor & cur = view()->cursor();
FuncRequest fr(LFUN_INSET_TOGGLE, action);
InsetBase & inset = lyx_view_->buffer()->inset();
@ -1566,7 +1566,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
if (!it->asInsetMath()
&& (inset_code == InsetBase::NO_CODE
|| inset_code == it->lyxCode())) {
LCursor tmpcur = cur;
Cursor tmpcur = cur;
tmpcur.pushLeft(*it);
it->dispatch(tmpcur, fr);
}
@ -1635,7 +1635,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
if (engine == lyx_view_->buffer()->params().getEngine())
break;
LCursor & cur = view()->cursor();
Cursor & cur = view()->cursor();
FuncRequest fr(LFUN_INSET_REFRESH);
InsetBase & inset = lyx_view_->buffer()->inset();

View File

@ -36,7 +36,7 @@ class FuncRequest;
class FuncStatus;
class InsetBase;
class LColor_color;
class LCursor;
class Cursor;
class PainterInfo;
class Row;
class RowMetrics;
@ -64,14 +64,14 @@ public:
LyXFont const & font);
/// what you expect when pressing \<enter\> at cursor position
void breakParagraph(LCursor & cur, bool keep_layout = false);
void breakParagraph(Cursor & cur, bool keep_layout = false);
/// set layout over selection
void setLayout(Buffer const & buffer, pit_type start, pit_type end,
std::string const & layout);
/// Set given layout to current cursor position.
/// FIXME: replace LCursor with DocIterator.
void setLayout(LCursor & cur, std::string const & layout);
/// FIXME: replace Cursor with DocIterator.
void setLayout(Cursor & cur, std::string const & layout);
/// what type of depth change to make
enum DEPTH_CHANGE {
@ -79,30 +79,30 @@ public:
DEC_DEPTH
};
/// Increase or decrease the nesting depth of the selected paragraph(s)
/// FIXME: replace LCursor with DocIterator.
void changeDepth(LCursor & cur, DEPTH_CHANGE type);
/// FIXME: replace Cursor with DocIterator.
void changeDepth(Cursor & cur, DEPTH_CHANGE type);
/// Returns whether something would be changed by changeDepth
/// FIXME: replace LCursor with DocIterator.
bool changeDepthAllowed(LCursor & cur, DEPTH_CHANGE type) const;
/// FIXME: replace Cursor with DocIterator.
bool changeDepthAllowed(Cursor & cur, DEPTH_CHANGE type) const;
/// Set font over selection paragraphs and rebreak.
/// FIXME: replace LCursor with DocIterator.
void setFont(LCursor & cur, LyXFont const &, bool toggleall = false);
/// FIXME: replace Cursor with DocIterator.
void setFont(Cursor & cur, LyXFont const &, bool toggleall = false);
///
void toggleFree(LCursor & cur, LyXFont const &, bool toggleall = false);
void toggleFree(Cursor & cur, LyXFont const &, bool toggleall = false);
/// ???
/// FIXME: replace LCursor with DocIterator.
docstring getStringToIndex(LCursor const & cur);
/// FIXME: replace Cursor with DocIterator.
docstring getStringToIndex(Cursor const & cur);
/// insert a character at cursor position
/// FIXME: replace LCursor with DocIterator.
void insertChar(LCursor & cur, char_type c);
/// FIXME: replace Cursor with DocIterator.
void insertChar(Cursor & cur, char_type c);
/// insert an inset at cursor position
/// FIXME: replace LCursor with DocIterator.
void insertInset(LCursor & cur, InsetBase * inset);
/// FIXME: replace Cursor with DocIterator.
void insertInset(Cursor & cur, InsetBase * inset);
/// draw text (only used for insets)
void draw(PainterInfo & pi, int x, int y) const;
@ -110,10 +110,10 @@ public:
void drawSelection(PainterInfo & pi, int x, int y) const;
/// try to handle that request
/// FIXME: replace LCursor with DocIterator.
void dispatch(LCursor & cur, FuncRequest & cmd);
/// FIXME: replace Cursor with DocIterator.
void dispatch(Cursor & cur, FuncRequest & cmd);
/// do we want to handle this event?
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const;
/// read-only access to individual paragraph
@ -121,8 +121,8 @@ public:
/// read-write access to individual paragraph
Paragraph & getPar(pit_type pit) { return pars_[pit]; }
// Returns the current font and depth as a message.
/// FIXME: replace LCursor with DocIterator.
docstring currentState(LCursor & cur);
/// FIXME: replace Cursor with DocIterator.
docstring currentState(Cursor & cur);
/** returns row near the specified
* y-coordinate in given paragraph (relative to the screen).
@ -146,7 +146,7 @@ public:
*/
void getWord(CursorSlice & from, CursorSlice & to, word_location const);
/// just selects the word the cursor is in
void selectWord(LCursor & cur, word_location loc);
void selectWord(Cursor & cur, word_location loc);
/// what type of change operation to make
enum ChangeOp {
@ -154,31 +154,31 @@ public:
REJECT
};
/// accept or reject the selected change
void acceptOrRejectChanges(LCursor & cur, ChangeOp op);
void acceptOrRejectChanges(Cursor & cur, ChangeOp op);
/// accept the changes within the complete LyXText
void acceptChanges(BufferParams const & bparams);
/// reject the changes within the complete LyXText
void rejectChanges(BufferParams const & bparams);
/// returns true if par was empty and was removed
bool setCursor(LCursor & cur, pit_type par, pos_type pos,
bool setCursor(Cursor & cur, pit_type par, pos_type pos,
bool setfont = true, bool boundary = false);
///
void setCursor(CursorSlice &, pit_type par, pos_type pos);
///
void setCursorIntern(LCursor & cur, pit_type par,
void setCursorIntern(Cursor & cur, pit_type par,
pos_type pos, bool setfont = true, bool boundary = false);
///
void setCurrentFont(LCursor & cur);
void setCurrentFont(Cursor & cur);
///
void recUndo(LCursor & cur, pit_type first, pit_type last) const;
void recUndo(Cursor & cur, pit_type first, pit_type last) const;
///
void recUndo(LCursor & cur, pit_type first) const;
void recUndo(Cursor & cur, pit_type first) const;
/// sets cursor only within this LyXText.
/// x,y are screen coordinates
void setCursorFromCoordinates(LCursor & cur, int x, int y);
void setCursorFromCoordinates(Cursor & cur, int x, int y);
/// sets cursor recursively descending into nested editable insets
/**
@ -189,63 +189,63 @@ public:
/// FIXME: move to TextMetrics.
/// FIXME: cleanup to use BufferView::getCoveringInset() and
/// setCursorFromCoordinates() instead of checkInsetHit().
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
/// Move cursor one line up.
/**
* Returns true if an update is needed after the move.
*/
/// FIXME: move to TextMetrics.
bool cursorUp(LCursor & cur);
bool cursorUp(Cursor & cur);
/// Move cursor one line down.
/**
* Returns true if an update is needed after the move.
*/
/// FIXME: move to TextMetrics.
bool cursorDown(LCursor & cur);
bool cursorDown(Cursor & cur);
/// Move cursor one position left
/**
* Returns true if an update is needed after the move.
*/
bool cursorLeft(LCursor & cur);
bool cursorLeft(Cursor & cur);
/// Move cursor one position right
/**
* Returns true if an update is needed after the move.
*/
bool cursorRight(LCursor & cur);
bool cursorRight(Cursor & cur);
///
bool cursorLeftOneWord(LCursor & cur);
bool cursorLeftOneWord(Cursor & cur);
///
bool cursorRightOneWord(LCursor & cur);
bool cursorRightOneWord(Cursor & cur);
///
bool cursorUpParagraph(LCursor & cur);
bool cursorUpParagraph(Cursor & cur);
///
bool cursorDownParagraph(LCursor & cur);
bool cursorDownParagraph(Cursor & cur);
///
/// FIXME: move to TextMetrics.
bool cursorHome(LCursor & cur);
bool cursorHome(Cursor & cur);
///
/// FIXME: move to TextMetrics.
bool cursorEnd(LCursor & cur);
bool cursorEnd(Cursor & cur);
///
void cursorPrevious(LCursor & cur);
void cursorPrevious(Cursor & cur);
///
void cursorNext(LCursor & cur);
void cursorNext(Cursor & cur);
///
bool cursorTop(LCursor & cur);
bool cursorTop(Cursor & cur);
///
bool cursorBottom(LCursor & cur);
bool cursorBottom(Cursor & cur);
/// Erase character at cursor. Honour change tracking
/// FIXME: replace LCursor with DocIterator.
bool erase(LCursor & cur);
/// FIXME: replace Cursor with DocIterator.
bool erase(Cursor & cur);
/// Delete character before cursor. Honour CT
/// FIXME: replace LCursor with DocIterator.
bool backspace(LCursor & cur);
/// FIXME: replace Cursor with DocIterator.
bool backspace(Cursor & cur);
// Dissolve the inset under cursor
/// FIXME: replace LCursor with DocIterator.
bool dissolveInset(LCursor & cur);
/// FIXME: replace Cursor with DocIterator.
bool dissolveInset(Cursor & cur);
///
bool selectWordWhenUnderCursor(LCursor & cur, word_location);
bool selectWordWhenUnderCursor(Cursor & cur, word_location);
///
enum TextCase {
///
@ -256,16 +256,16 @@ public:
text_uppercase = 2
};
/// Change the case of the word at cursor position.
void changeCase(LCursor & cur, TextCase action);
void changeCase(Cursor & cur, TextCase action);
/// Transposes the character at the cursor with the one before it
void charsTranspose(LCursor & cur);
void charsTranspose(Cursor & cur);
/** the DTP switches for paragraphs. LyX will store the top settings
always in the first physical paragraph, the bottom settings in the
last. When a paragraph is broken, the top settings rest, the bottom
settings are given to the new one.
*/
void setParagraph(LCursor & cur,
void setParagraph(Cursor & cur,
Spacing const & spacing,
LyXAlignment align,
docstring const & labelwidthstring,
@ -274,11 +274,11 @@ public:
/* these things are for search and replace */
/// needed to insert the selection
/// FIXME: replace LCursor with DocIterator.
void insertStringAsLines(LCursor & cur, docstring const & str);
/// FIXME: replace Cursor with DocIterator.
void insertStringAsLines(Cursor & cur, docstring const & str);
/// needed to insert the selection
/// FIXME: replace LCursor with DocIterator.
void insertStringAsParagraphs(LCursor & cur, docstring const & str);
/// FIXME: replace Cursor with DocIterator.
void insertStringAsParagraphs(Cursor & cur, docstring const & str);
/// Returns an inset if inset was hit, or 0 if not.
/// \warning This method is not recursive! It will return the
@ -324,12 +324,12 @@ public:
///
double spacing(Buffer const & buffer, Paragraph const & par) const;
/// make a suggestion for a label
/// FIXME: replace LCursor with DocIterator.
docstring getPossibleLabel(LCursor & cur) const;
/// FIXME: replace Cursor with DocIterator.
docstring getPossibleLabel(Cursor & cur) const;
/// is this paragraph right-to-left?
bool isRTL(Buffer const &, Paragraph const & par) const;
///
bool checkAndActivateInset(LCursor & cur, bool front);
bool checkAndActivateInset(Cursor & cur, bool front);
///
void write(Buffer const & buf, std::ostream & os) const;
@ -347,10 +347,10 @@ public:
/// delete double spaces, leading spaces, and empty paragraphs around old cursor.
/// \retval true if a change has happened and we need a redraw.
/// FIXME: replace LCursor with DocIterator. This is not possible right
/// now because recordUndo() is called which needs a LCursor.
static bool deleteEmptyParagraphMechanism(LCursor & cur,
LCursor & old, bool & need_anchor_change);
/// FIXME: replace Cursor with DocIterator. This is not possible right
/// now because recordUndo() is called which needs a Cursor.
static bool deleteEmptyParagraphMechanism(Cursor & cur,
Cursor & old, bool & need_anchor_change);
/// delete double spaces, leading spaces, and empty paragraphs
/// from \first to \last paragraph
@ -386,23 +386,23 @@ private:
// At cursor position 0, try to merge the paragraph with the one before it.
// Ignore change tracking, i.e., physically remove the end-of-par character
bool backspacePos0(LCursor & cur);
bool backspacePos0(Cursor & cur);
///
void deleteWordForward(LCursor & cur);
void deleteWordForward(Cursor & cur);
///
void deleteWordBackward(LCursor & cur);
void deleteWordBackward(Cursor & cur);
///
void deleteLineForward(LCursor & cur);
void deleteLineForward(Cursor & cur);
///
void charInserted();
/// set 'number' font property
void number(LCursor & cur);
void number(Cursor & cur);
/// paste plain text at current cursor.
/// \param str string to paste
/// \param asParagraphs whether to paste as paragraphs or as lines
void pasteString(LCursor & cur, docstring const & str,
void pasteString(Cursor & cur, docstring const & str,
bool asParagraphs);
};

View File

@ -137,8 +137,8 @@ lyx_SOURCES = \
Counters.h \
CoordCache.cpp \
CoordCache.h \
LCursor.cpp \
LCursor.h \
Cursor.cpp \
Cursor.h \
CursorSlice.cpp \
CursorSlice.h \
debug.cpp \

View File

@ -193,7 +193,7 @@ bool TextMetrics::redoParagraph(pit_type const pit)
// FIXME: this has nothing to do here and is the reason why text_ is not
// const.
if (par.checkBiblio(buffer.params().trackChanges))
const_cast<LCursor &>(bv_->cursor()).posRight();
const_cast<Cursor &>(bv_->cursor()).posRight();
// Optimisation: this is used in the next two loops
// so better to calculate that once here.

View File

@ -16,7 +16,7 @@
#include "Buffer.h"
#include "BufferView.h"
#include "CutAndPaste.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "LyXRC.h"
#include "LyXText.h"
@ -242,7 +242,7 @@ void TransManager::disableKeymap()
}
void TransManager::translateAndInsert(char_type c, LyXText * text, LCursor & cur)
void TransManager::translateAndInsert(char_type c, LyXText * text, Cursor & cur)
{
docstring res = active_->process(c, *this);
@ -256,14 +256,14 @@ void TransManager::translateAndInsert(char_type c, LyXText * text, LCursor & cu
}
void TransManager::insert(docstring const & str, LyXText * text, LCursor & cur)
void TransManager::insert(docstring const & str, LyXText * text, Cursor & cur)
{
for (string::size_type i = 0, n = str.size(); i < n; ++i)
text->insertChar(cur, str[i]);
}
void TransManager::deadkey(char_type c, tex_accent accent, LyXText * t, LCursor & cur)
void TransManager::deadkey(char_type c, tex_accent accent, LyXText * t, Cursor & cur)
{
if (c == 0 && active_ != &default_) {
// A deadkey was pressed that cannot be printed

View File

@ -21,7 +21,7 @@
namespace lyx {
class LCursor;
class Cursor;
class LyXText;
class Trans;
@ -148,7 +148,7 @@ private:
///
static Trans default_;
///
void insert(docstring const &, LyXText *, LCursor & cur);
void insert(docstring const &, LyXText *, Cursor & cur);
public:
///
TransManager();
@ -169,13 +169,13 @@ public:
return trans_fsm_.currentState->backspace();
}
///
void translateAndInsert(char_type, LyXText *, LCursor &);
void translateAndInsert(char_type, LyXText *, Cursor &);
///
docstring const deadkey(char_type, KmodInfo);
///
docstring const normalkey(char_type);
///
void deadkey(char_type, tex_accent, LyXText *, LCursor &);
void deadkey(char_type, tex_accent, LyXText *, Cursor &);
};

View File

@ -18,7 +18,7 @@
#include "Buffer.h"
#include "buffer_funcs.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "BufferView.h"
#include "LyXText.h"
@ -126,7 +126,7 @@ void doRecordUndo(Undo::undo_kind kind,
void recordUndo(Undo::undo_kind kind,
LCursor & cur, pit_type first_pit, pit_type last_pit,
Cursor & cur, pit_type first_pit, pit_type last_pit,
limited_stack<Undo> & stack)
{
BOOST_ASSERT(first_pit <= cur.lastpit());
@ -215,7 +215,7 @@ bool textUndoOrRedo(BufferView & bv,
BOOST_ASSERT(undo.array == 0);
// Set cursor
LCursor & cur = bv.cursor();
Cursor & cur = bv.cursor();
cur.setCursor(undo.cursor.asDocIterator(&buf->inset()));
cur.selection() = false;
cur.resetAnchor();
@ -250,7 +250,7 @@ bool textRedo(BufferView & bv)
void recordUndo(Undo::undo_kind kind,
LCursor & cur, pit_type first, pit_type last)
Cursor & cur, pit_type first, pit_type last)
{
Buffer * buf = cur.bv().buffer();
recordUndo(kind, cur, first, last, buf->undostack());
@ -261,15 +261,15 @@ void recordUndo(Undo::undo_kind kind,
}
void recordUndo(LCursor & cur, Undo::undo_kind kind)
void recordUndo(Cursor & cur, Undo::undo_kind kind)
{
recordUndo(kind, cur, cur.pit(), cur.pit());
}
void recordUndoInset(LCursor & cur, Undo::undo_kind kind)
void recordUndoInset(Cursor & cur, Undo::undo_kind kind)
{
LCursor c = cur;
Cursor c = cur;
c.pop();
Buffer * buf = cur.bv().buffer();
doRecordUndo(kind, c, c.pit(), c.pit(), cur,
@ -277,19 +277,19 @@ void recordUndoInset(LCursor & cur, Undo::undo_kind kind)
}
void recordUndoSelection(LCursor & cur, Undo::undo_kind kind)
void recordUndoSelection(Cursor & cur, Undo::undo_kind kind)
{
recordUndo(kind, cur, cur.selBegin().pit(), cur.selEnd().pit());
}
void recordUndo(LCursor & cur, Undo::undo_kind kind, pit_type from)
void recordUndo(Cursor & cur, Undo::undo_kind kind, pit_type from)
{
recordUndo(kind, cur, cur.pit(), from);
}
void recordUndo(LCursor & cur, Undo::undo_kind kind,
void recordUndo(Cursor & cur, Undo::undo_kind kind,
pit_type from, pit_type to)
{
recordUndo(kind, cur, from, to);

View File

@ -29,7 +29,7 @@ namespace lyx {
class BufferParams;
class BufferView;
class DocIterator;
class LCursor;
class Cursor;
class MathArray;
class ParagraphList;
@ -115,26 +115,26 @@ void finishUndo();
* Right now we use recordUndoInset if more than one cell is changed,
* but that puts the cursor in front of the inset after undo. We would need
* something like
* recordUndoGrid(LCursor & cur, Undo::undo_kind kind, idx_type from, idx_type to);
* recordUndoGrid(Cursor & cur, Undo::undo_kind kind, idx_type from, idx_type to);
* and store the cell information in class Undo.
*/
/// The general case: prepare undo for an arbitrary range.
/// FIXME: replace LCursor with DocIterator. This is not possible right
/// FIXME: replace Cursor with DocIterator. This is not possible right
/// now because we need access to Buffer->params()!.
void recordUndo(LCursor & cur, Undo::undo_kind kind,
void recordUndo(Cursor & cur, Undo::undo_kind kind,
pit_type from, pit_type to);
/// Convenience: prepare undo for the range between 'from' and cursor.
void recordUndo(LCursor & cur, Undo::undo_kind kind, pit_type from);
void recordUndo(Cursor & cur, Undo::undo_kind kind, pit_type from);
/// Convenience: prepare undo for the single paragraph or cell
/// containing the cursor
void recordUndo(LCursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
void recordUndo(Cursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
/// Convenience: prepare undo for the inset containing the cursor
void recordUndoInset(LCursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
void recordUndoInset(Cursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
/// Convenience: prepare undo for the selected paragraphs
void recordUndoSelection(LCursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
void recordUndoSelection(Cursor & cur, Undo::undo_kind kind = Undo::ATOMIC);
/// Convenience: prepare undo for the whole buffer
void recordUndoFullDocument(BufferView * bv);

View File

@ -20,7 +20,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CoordCache.h"
#include "gettext.h"
#include "Language.h"
@ -170,7 +170,7 @@ Point coordOffset(BufferView const & bv, DocIterator const & dit,
sl.inset().cursorPos(bv, sl, boundary && ((i+1) == dit.depth()), xx, yy);
x += xx;
y += yy;
//lyxerr << "LCursor::getPos, i: "
//lyxerr << "Cursor::getPos, i: "
// << i << " x: " << xx << " y: " << y << endl;
}
@ -303,7 +303,7 @@ void findInset(DocIterator & dit, InsetBase_code code, bool same_content)
void gotoInset(BufferView * bv, vector<InsetBase_code> const & codes,
bool same_content)
{
LCursor tmpcur = bv->cursor();
Cursor tmpcur = bv->cursor();
if (!findInset(tmpcur, codes, same_content)) {
bv->cursor().message(_("No more insets"));
return;

View File

@ -68,7 +68,7 @@
2005-01-10 André Pönitz <poenitz@gmx.net>
* screen.C (showCursor): use new function LCursor::getFont
* screen.C (showCursor): use new function Cursor::getFont
2004-12-06 Alfredo Braunstein <abraunst@lyx.org>
@ -246,14 +246,14 @@
2003-11-13 Alfredo Braunstein <abraunst@lyx.org>
* screen.[Ch] (fitCursor): use LCursor::getDim, simplify
* screen.[Ch] (fitCursor): use Cursor::getDim, simplify
(fitManualCursor): remove
(topCursorVisible): remove
2003-11-11 Alfredo Braunstein <abraunst@libero.it>
* screen.C (showCursor): use absolute coords form LCursor
* screen.C (showCursor): use absolute coords form Cursor
2003-11-10 André Pönitz <poenitz@gmx.net>

View File

@ -23,7 +23,7 @@
#include "BufferParams.h"
#include "BufferView.h"
#include "bufferview_funcs.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "ErrorList.h"
#include "FuncRequest.h"

View File

@ -26,7 +26,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "CoordCache.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "Language.h"
#include "LColor.h"

View File

@ -15,7 +15,7 @@
#include "ControlCommandBuffer.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "LyXFunc.h"
#include "LyXAction.h"
#include "FuncRequest.h"

View File

@ -15,7 +15,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "debug.h"
#include "gettext.h"
@ -146,7 +146,7 @@ bool isLetter(DocIterator const & dit)
}
WordLangTuple nextWord(LCursor & cur, ptrdiff_t & progress)
WordLangTuple nextWord(Cursor & cur, ptrdiff_t & progress)
{
BufferParams const & bp = cur.bv().buffer()->params();
bool inword = false;
@ -199,7 +199,7 @@ void ControlSpellchecker::check()
SpellBase::Result res = SpellBase::OK;
LCursor cur = kernel().bufferview()->cursor();
Cursor cur = kernel().bufferview()->cursor();
while (cur && cur.pos() && isLetter(cur)) {
cur.backwardPos();
}

View File

@ -17,7 +17,7 @@
#include "support/types.h"
#include "BufferView.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include <sstream>
using std::string;

View File

@ -1288,7 +1288,7 @@
2004-04-05 André Pönitz <poenitz@gmx.net>
* insetbase.h: use LCursor & in notifyCursorLeave
* insetbase.h: use Cursor & in notifyCursorLeave
2004-04-05 Angus Leeming <leeming@lyx.org>

View File

@ -16,7 +16,7 @@
#include "CoordCache.h"
#include "BufferView.h"
#include "LColor.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "Dimension.h"
#include "DispatchResult.h"
@ -135,7 +135,7 @@ InsetBase::Code InsetBase::translate(std::string const & name)
}
void InsetBase::dispatch(LCursor & cur, FuncRequest & cmd)
void InsetBase::dispatch(Cursor & cur, FuncRequest & cmd)
{
cur.updateFlags(Update::Force | Update::FitCursor);
cur.dispatched();
@ -143,14 +143,14 @@ void InsetBase::dispatch(LCursor & cur, FuncRequest & cmd)
}
void InsetBase::doDispatch(LCursor & cur, FuncRequest &)
void InsetBase::doDispatch(Cursor & cur, FuncRequest &)
{
cur.noUpdate();
cur.undispatched();
}
bool InsetBase::getStatus(LCursor &, FuncRequest const & cmd,
bool InsetBase::getStatus(Cursor &, FuncRequest const & cmd,
FuncStatus & flag) const
{
// LFUN_INSET_APPLY is sent from the dialogs when the data should
@ -182,14 +182,14 @@ bool InsetBase::getStatus(LCursor &, FuncRequest const & cmd,
}
void InsetBase::edit(LCursor &, bool)
void InsetBase::edit(Cursor &, bool)
{
LYXERR(Debug::INSETS) << BOOST_CURRENT_FUNCTION
<< ": edit left/right" << std::endl;
}
InsetBase * InsetBase::editXY(LCursor &, int x, int y)
InsetBase * InsetBase::editXY(Cursor &, int x, int y)
{
LYXERR(Debug::INSETS) << BOOST_CURRENT_FUNCTION
<< ": x=" << x << " y= " << y
@ -216,7 +216,7 @@ bool InsetBase::idxBetween(idx_type idx, idx_type from, idx_type to) const
}
bool InsetBase::idxUpDown(LCursor &, bool) const
bool InsetBase::idxUpDown(Cursor &, bool) const
{
return false;
}

View File

@ -32,7 +32,7 @@ class InsetMath;
class InsetText;
class LaTeXFeatures;
class LColor_color;
class LCursor;
class Cursor;
class Lexer;
class LyXText;
class MetricsInfo;
@ -77,7 +77,7 @@ public:
virtual bool inMathed() const { return false; }
/// the real dispatcher
void dispatch(LCursor & cur, FuncRequest & cmd);
void dispatch(Cursor & cur, FuncRequest & cmd);
/**
* \returns true if this function made a definitive decision on
* whether the inset wants to handle the request \p cmd or not.
@ -97,13 +97,13 @@ public:
* - LFUN_MOUSE_* need not to be handled in getStatus(), because these
* are dispatched directly
*/
virtual bool getStatus(LCursor & cur, FuncRequest const & cmd,
virtual bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const;
/// cursor enters
virtual void edit(LCursor & cur, bool left);
virtual void edit(Cursor & cur, bool left);
/// cursor enters
virtual InsetBase * editXY(LCursor & cur, int x, int y);
virtual InsetBase * editXY(Cursor & cur, int x, int y);
/// compute the size of the object returned in dim
/// \retval true if metrics changed.
@ -136,28 +136,28 @@ public:
virtual void setPosCache(PainterInfo const &, int, int) const {}
/// do we cover screen position x/y?
virtual bool covers(BufferView const & bv, int x, int y) const;
/// get the screen positions of the cursor (see note in LCursor.cpp)
/// get the screen positions of the cursor (see note in Cursor.cpp)
virtual void cursorPos(BufferView const & bv,
CursorSlice const & sl, bool boundary, int & x, int & y) const;
/// is this an inset that can be moved into?
virtual bool isActive() const { return nargs() > 0; }
/// Where should we go when we press the up or down cursor key?
virtual bool idxUpDown(LCursor & cur, bool up) const;
virtual bool idxUpDown(Cursor & cur, bool up) const;
/// Move one cell to the left
virtual bool idxLeft(LCursor &) const { return false; }
virtual bool idxLeft(Cursor &) const { return false; }
/// Move one cell to the right
virtual bool idxRight(LCursor &) const { return false; }
virtual bool idxRight(Cursor &) const { return false; }
/// Move one physical cell up
virtual bool idxNext(LCursor &) const { return false; }
virtual bool idxNext(Cursor &) const { return false; }
/// Move one physical cell down
virtual bool idxPrev(LCursor &) const { return false; }
virtual bool idxPrev(Cursor &) const { return false; }
/// Target pos when we enter the inset from the left by pressing "Right"
virtual bool idxFirst(LCursor &) const { return false; }
virtual bool idxFirst(Cursor &) const { return false; }
/// Target pos when we enter the inset from the right by pressing "Left"
virtual bool idxLast(LCursor &) const { return false; }
virtual bool idxLast(Cursor &) const { return false; }
/// Delete a cell and move cursor
virtual bool idxDelete(idx_type &) { return false; }
@ -185,7 +185,7 @@ public:
virtual size_t ncols() const { return 0; }
/// is called when the cursor leaves this inset
// returns true if cursor is now invalid.
virtual bool notifyCursorLeaves(LCursor &) { return false; }
virtual bool notifyCursorLeaves(Cursor &) { return false; }
/// is called when the mouse enter or leave this inset
/// return true if this inset needs repaint
virtual bool setMouseHover(bool) { return false; }
@ -456,22 +456,22 @@ public:
Open
};
///
virtual void setStatus(LCursor &, CollapseStatus) {}
virtual void setStatus(Cursor &, CollapseStatus) {}
protected:
InsetBase();
InsetBase(InsetBase const & i);
/** The real dispatcher.
* Gets normally called from LCursor::dispatch(). LCursor::dispatch()
* Gets normally called from Cursor::dispatch(). Cursor::dispatch()
* assumes the common case of 'LFUN handled, need update'.
* This has to be overriden by calling LCursor::undispatched() or
* LCursor::noUpdate() if appropriate.
* This has to be overriden by calling Cursor::undispatched() or
* Cursor::noUpdate() if appropriate.
* If you need to call the dispatch method of some inset directly
* you may have to explicitly request an update at that place. Don't
* do it in doDispatch(), since that causes nested updates when
* called from LCursor::dispatch(), and these can lead to crashes.
* called from Cursor::dispatch(), and these can lead to crashes.
* \sa getStatus
*/
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
/// Cached dimensions of the inset.
mutable Dimension dim_;

View File

@ -54,7 +54,7 @@ auto_ptr<InsetBase> InsetBibitem::doClone() const
}
void InsetBibitem::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetBibitem::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {

View File

@ -45,7 +45,7 @@ public:
int plaintext(Buffer const &, odocstream &, OutputParams const &) const;
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -82,7 +82,7 @@ std::auto_ptr<InsetBase> InsetBibtex::doClone() const
}
void InsetBibtex::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetBibtex::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {

View File

@ -49,7 +49,7 @@ public:
///
void validate(LaTeXFeatures &) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -15,7 +15,7 @@
#include "InsetBox.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "debug.h"
#include "FuncStatus.h"
@ -206,7 +206,7 @@ bool InsetBox::showInsetDialog(BufferView * bv) const
}
void InsetBox::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetBox::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
@ -236,7 +236,7 @@ void InsetBox::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetBox::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetBox::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -94,7 +94,7 @@ public:
///
InsetBoxParams const & params() const { return params_; }
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
enum BoxType {
Frameless,
@ -106,7 +106,7 @@ public:
};
protected:
InsetBox(InsetBox const &);
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
/// Is the width forced to some value?
virtual bool hasFixedWidth() const;
private:

View File

@ -15,7 +15,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BranchList.h"
#include "LCursor.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
@ -122,7 +122,7 @@ bool InsetBranch::showInsetDialog(BufferView * bv) const
}
void InsetBranch::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetBranch::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
@ -178,7 +178,7 @@ void InsetBranch::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetBranch::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetBranch::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -77,11 +77,11 @@ public:
*/
bool isBranchSelected(Buffer const & buffer) const;
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
InsetBranch(InsetBranch const &);
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
friend class InsetBranchParams;

View File

@ -17,7 +17,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "Counters.h"
#include "LCursor.h"
#include "Cursor.h"
#include "BufferView.h"
#include "Floating.h"
#include "FloatList.h"
@ -174,14 +174,14 @@ void InsetCaption::drawSelection(PainterInfo & pi, int x, int y) const
}
void InsetCaption::edit(LCursor & cur, bool left)
void InsetCaption::edit(Cursor & cur, bool left)
{
cur.push(*this);
InsetText::edit(cur, left);
}
InsetBase * InsetCaption::editXY(LCursor & cur, int x, int y)
InsetBase * InsetCaption::editXY(Cursor & cur, int x, int y)
{
cur.push(*this);
return InsetText::editXY(cur, x, y);
@ -203,7 +203,7 @@ bool InsetCaption::insetAllowed(InsetBase::Code code) const
}
bool InsetCaption::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetCaption::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -50,13 +50,13 @@ public:
///
void drawSelection(PainterInfo & pi, int x, int y) const;
///
virtual void edit(LCursor & cur, bool left);
virtual void edit(Cursor & cur, bool left);
///
virtual InsetBase * editXY(LCursor & cur, int x, int y);
virtual InsetBase * editXY(Cursor & cur, int x, int y);
///
bool insetAllowed(InsetBase::Code code) const;
///
virtual bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
///
virtual bool wide() const { return false; }
///

View File

@ -20,7 +20,7 @@
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
#include "LCursor.h"
#include "Cursor.h"
#include "gettext.h"
#include "LaTeXFeatures.h"
#include "LColor.h"
@ -216,7 +216,7 @@ void InsetCharStyle::draw(PainterInfo & pi, int x, int y) const
}
// a visual clue when the cursor is inside the inset
LCursor & cur = pi.base.bv->cursor();
Cursor & cur = pi.base.bv->cursor();
if (cur.isInside(this)) {
y -= ascent();
pi.pain.line(x, y + 4, x, y, params_.labelfont.color());
@ -235,7 +235,7 @@ void InsetCharStyle::getDrawFont(LyXFont & font) const
}
void InsetCharStyle::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetCharStyle::doDispatch(Cursor & cur, FuncRequest & cmd)
{
setInlined();
switch (cmd.action) {
@ -266,7 +266,7 @@ void InsetCharStyle::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetCharStyle::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetCharStyle::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -97,9 +97,9 @@ public:
protected:
InsetCharStyle(InsetCharStyle const &);
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
private:
friend class InsetCharStyleParams;

View File

@ -17,7 +17,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "FloatList.h"
@ -297,7 +297,7 @@ docstring const InsetCollapsable::getNewLabel(docstring const & l) const
}
void InsetCollapsable::edit(LCursor & cur, bool left)
void InsetCollapsable::edit(Cursor & cur, bool left)
{
//lyxerr << "InsetCollapsable: edit left/right" << endl;
cur.push(*this);
@ -305,7 +305,7 @@ void InsetCollapsable::edit(LCursor & cur, bool left)
}
InsetBase * InsetCollapsable::editXY(LCursor & cur, int x, int y)
InsetBase * InsetCollapsable::editXY(Cursor & cur, int x, int y)
{
//lyxerr << "InsetCollapsable: edit xy" << endl;
if (status() == Collapsed || (button_dim.contains(x, y) && status() != Inlined))
@ -315,7 +315,7 @@ InsetBase * InsetCollapsable::editXY(LCursor & cur, int x, int y)
}
void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetCollapsable::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "InsetCollapsable::doDispatch (begin): cmd: " << cmd
// << " cur: " << cur << " bvcur: " << cur.bv().cursor() << endl;
@ -412,7 +412,7 @@ void InsetCollapsable::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetCollapsable::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetCollapsable::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {
@ -437,7 +437,7 @@ void InsetCollapsable::setLabel(docstring const & l)
}
void InsetCollapsable::setStatus(LCursor & cur, CollapseStatus status)
void InsetCollapsable::setStatus(Cursor & cur, CollapseStatus status)
{
status_ = status;
setButtonLabel();

View File

@ -79,23 +79,23 @@ public:
///
bool allowSpellCheck() const { return true; }
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///
void setStatus(LCursor & cur, CollapseStatus st);
void setStatus(Cursor & cur, CollapseStatus st);
///
bool setMouseHover(bool mouse_hover);
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
Dimension dimensionCollapsed() const;
///
Box const & buttonDim() const;
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
///
void setInlined() { status_ = Inlined; }
///
@ -126,7 +126,7 @@ private:
};
// A helper function that pushes the cursor out of the inset.
void leaveInset(LCursor & cur, InsetBase const & in);
void leaveInset(Cursor & cur, InsetBase const & in);
} // namespace lyx

View File

@ -108,7 +108,7 @@ int InsetCommand::docbook(Buffer const &, odocstream &,
}
void InsetCommand::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetCommand::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_REFRESH:
@ -145,7 +145,7 @@ void InsetCommand::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetCommand::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -17,7 +17,7 @@
#include "InsetCommandParams.h"
#include "RenderButton.h"
#include "MailInset.h"
#include "LCursor.h"
#include "Cursor.h"
namespace lyx {
@ -88,9 +88,9 @@ public:
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
///
docstring const getCommand() const { return p_.getCommand(); }
///

View File

@ -16,7 +16,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
@ -200,7 +200,7 @@ int InsetERT::docbook(Buffer const &, odocstream & os,
}
void InsetERT::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetERT::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "\nInsetERT::doDispatch (begin): cmd: " << cmd << endl;
switch (cmd.action) {
@ -261,7 +261,7 @@ void InsetERT::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetERT::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetERT::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -77,9 +77,9 @@ public:
protected:
InsetERT(InsetERT const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
private:
virtual std::auto_ptr<InsetBase> doClone() const;
///

View File

@ -18,7 +18,7 @@
#include "insets/RenderPreview.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
@ -425,7 +425,7 @@ void InsetExternal::statusChanged() const
}
void InsetExternal::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetExternal::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
@ -459,7 +459,7 @@ void InsetExternal::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetExternal::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetExternal::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {
@ -476,7 +476,7 @@ bool InsetExternal::getStatus(LCursor & cur, FuncRequest const & cmd,
}
void InsetExternal::edit(LCursor & cur, bool)
void InsetExternal::edit(Cursor & cur, bool)
{
InsetExternalMailer(*this).showDialog(&cur.bv());
}

View File

@ -144,14 +144,14 @@ public:
///
void addPreview(graphics::PreviewLoader &) const;
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
InsetExternal(InsetExternal const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -16,7 +16,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Floating.h"
@ -135,7 +135,7 @@ InsetFloat::~InsetFloat()
}
void InsetFloat::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetFloat::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
@ -171,7 +171,7 @@ void InsetFloat::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetFloat::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetFloat::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -86,9 +86,9 @@ public:
///
InsetFloatParams const & params() const { return params_; }
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -55,7 +55,7 @@ TODO
#include "Buffer.h"
#include "BufferView.h"
#include "Converter.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
@ -174,7 +174,7 @@ InsetGraphics::~InsetGraphics()
}
void InsetGraphics::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetGraphics::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_GRAPHICS_EDIT: {
@ -211,7 +211,7 @@ void InsetGraphics::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetGraphics::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetGraphics::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {
@ -227,7 +227,7 @@ bool InsetGraphics::getStatus(LCursor & cur, FuncRequest const & cmd,
}
void InsetGraphics::edit(LCursor & cur, bool)
void InsetGraphics::edit(Cursor & cur, bool)
{
InsetGraphicsMailer(*this).showDialog(&cur.bv());
}

View File

@ -74,15 +74,15 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
InsetGraphics(InsetGraphics const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
friend class InsetGraphicsMailer;

View File

@ -17,7 +17,7 @@
#include "BufferList.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
@ -120,7 +120,7 @@ InsetInclude::~InsetInclude()
}
void InsetInclude::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetInclude::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
@ -150,7 +150,7 @@ void InsetInclude::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetInclude::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetInclude::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -98,11 +98,11 @@ public:
///
void updateLabels(Buffer const & buffer) const;
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
InsetInclude(InsetInclude const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -59,7 +59,7 @@ docstring const InsetLabel::getScreenLabel(Buffer const &) const
}
void InsetLabel::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetLabel::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {

View File

@ -36,7 +36,7 @@ public:
///
int docbook(Buffer const &, odocstream &, OutputParams const &) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
};

View File

@ -15,7 +15,7 @@
#include "InsetNote.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Exporter.h"
@ -207,7 +207,7 @@ bool InsetNote::showInsetDialog(BufferView * bv) const
}
void InsetNote::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetNote::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
@ -234,7 +234,7 @@ void InsetNote::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetNote::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetNote::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -70,11 +70,11 @@ public:
///
InsetNoteParams const & params() const { return params_; }
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
InsetNote(InsetNote const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
friend class InsetNoteParams;

View File

@ -12,7 +12,7 @@
#include "InsetRef.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "gettext.h"
@ -42,7 +42,7 @@ InsetRef::InsetRef(InsetRef const & ir)
{}
void InsetRef::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetRef::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_MOUSE_PRESS:

View File

@ -61,7 +61,7 @@ protected:
InsetRef(InsetRef const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const {
return std::auto_ptr<InsetBase>(new InsetRef(*this));

View File

@ -23,7 +23,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "CoordCache.h"
#include "debug.h"
@ -186,17 +186,6 @@ private:
};
string const featureAsString(Tabular::Feature feature)
{
TabularFeature * end = tabularFeature +
sizeof(tabularFeature) / sizeof(TabularFeature);
TabularFeature * it = std::find_if(tabularFeature, end,
FeatureEqual(feature));
return (it == end) ? string() : it->feature;
}
template <class T>
string const write_attribute(string const & name, T const & t)
{
@ -475,6 +464,17 @@ void l_getline(istream & is, string & str)
} // namespace
string const featureAsString(Tabular::Feature feature)
{
TabularFeature * end = tabularFeature +
sizeof(tabularFeature) / sizeof(TabularFeature);
TabularFeature * it = std::find_if(tabularFeature, end,
FeatureEqual(feature));
return (it == end) ? string() : it->feature;
}
/////////////////////////////////////////////////////////////////////
//
// Tabular
@ -1094,7 +1094,7 @@ namespace {
* merge cell paragraphs and reset layout to standard for variable width
* cells.
*/
void toggleFixedWidth(LCursor & cur, InsetText * inset, bool fixedWidth)
void toggleFixedWidth(Cursor & cur, InsetText * inset, bool fixedWidth)
{
inset->setAutoBreakRows(fixedWidth);
if (fixedWidth)
@ -1116,7 +1116,7 @@ void toggleFixedWidth(LCursor & cur, InsetText * inset, bool fixedWidth)
}
void Tabular::setColumnPWidth(LCursor & cur, idx_type cell,
void Tabular::setColumnPWidth(Cursor & cur, idx_type cell,
LyXLength const & width)
{
col_type const j = column_of_cell(cell);
@ -1137,7 +1137,7 @@ void Tabular::setColumnPWidth(LCursor & cur, idx_type cell,
}
bool Tabular::setMColumnPWidth(LCursor & cur, idx_type cell,
bool Tabular::setMColumnPWidth(Cursor & cur, idx_type cell,
LyXLength const & width)
{
if (!isMultiColumn(cell))
@ -3060,7 +3060,7 @@ void InsetTabular::drawSelection(PainterInfo & pi, int x, int y) const
{
setPosCache(pi, x, y);
LCursor & cur = pi.base.bv->cursor();
Cursor & cur = pi.base.bv->cursor();
x += scx_ + ADD_TO_TABULAR_WIDTH;
@ -3156,7 +3156,7 @@ docstring const InsetTabular::editMessage() const
}
void InsetTabular::edit(LCursor & cur, bool left)
void InsetTabular::edit(Cursor & cur, bool left)
{
//lyxerr << "InsetTabular::edit: " << this << endl;
finishUndo();
@ -3183,12 +3183,12 @@ void InsetTabular::edit(LCursor & cur, bool left)
}
void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetTabular::doDispatch(Cursor & cur, FuncRequest & cmd)
{
LYXERR(Debug::DEBUG) << "# InsetTabular::doDispatch: cmd: " << cmd
<< "\n cur:" << cur << endl;
CursorSlice sl = cur.top();
LCursor & bvcur = cur.bv().cursor();
Cursor & bvcur = cur.bv().cursor();
switch (cmd.action) {
@ -3495,7 +3495,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
row_type rs, re;
col_type cs, ce;
getSelection(cur, rs, re, cs, ce);
LCursor tmpcur = cur;
Cursor tmpcur = cur;
for (row_type i = rs; i <= re; ++i) {
for (col_type j = cs; j <= ce; ++j) {
// cursor follows cell:
@ -3531,7 +3531,7 @@ void InsetTabular::doDispatch(LCursor & cur, FuncRequest & cmd)
// function sets an object as defined in func_status.h:
// states OK, Unknown, Disabled, On, Off.
bool InsetTabular::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetTabular::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {
@ -3924,7 +3924,7 @@ int InsetTabular::dist(BufferView & bv, idx_type const cell, int x, int y) const
}
InsetBase * InsetTabular::editXY(LCursor & cur, int x, int y)
InsetBase * InsetTabular::editXY(Cursor & cur, int x, int y)
{
//lyxerr << "InsetTabular::editXY: " << this << endl;
cur.selection() = false;
@ -3935,7 +3935,7 @@ InsetBase * InsetTabular::editXY(LCursor & cur, int x, int y)
}
void InsetTabular::setCursorFromCoordinates(LCursor & cur, int x, int y) const
void InsetTabular::setCursorFromCoordinates(Cursor & cur, int x, int y) const
{
cur.idx() = getNearestCell(cur.bv(), x, y);
cell(cur.idx())->text_.setCursorFromCoordinates(cur, x, y);
@ -3973,7 +3973,7 @@ int InsetTabular::getCellXPos(idx_type const cell) const
}
void InsetTabular::resetPos(LCursor & cur) const
void InsetTabular::resetPos(Cursor & cur) const
{
BufferView & bv = cur.bv();
int const maxwidth = bv.workWidth();
@ -3999,7 +3999,7 @@ void InsetTabular::resetPos(LCursor & cur) const
}
void InsetTabular::moveNextCell(LCursor & cur)
void InsetTabular::moveNextCell(Cursor & cur)
{
if (isRightToLeft(cur)) {
if (tabular.isFirstCellInRow(cur.idx())) {
@ -4023,7 +4023,7 @@ void InsetTabular::moveNextCell(LCursor & cur)
}
void InsetTabular::movePrevCell(LCursor & cur)
void InsetTabular::movePrevCell(Cursor & cur)
{
if (isRightToLeft(cur)) {
if (tabular.isLastCellInRow(cur.idx())) {
@ -4050,7 +4050,7 @@ void InsetTabular::movePrevCell(LCursor & cur)
}
bool InsetTabular::tabularFeatures(LCursor & cur, string const & what)
bool InsetTabular::tabularFeatures(Cursor & cur, string const & what)
{
Tabular::Feature action = Tabular::LAST_ACTION;
@ -4094,7 +4094,7 @@ static void checkLongtableSpecial(Tabular::ltType & ltt,
}
void InsetTabular::tabularFeatures(LCursor & cur,
void InsetTabular::tabularFeatures(Cursor & cur,
Tabular::Feature feature, string const & value)
{
BufferView & bv = cur.bv();
@ -4495,7 +4495,7 @@ void InsetTabular::openLayoutDialog(BufferView * bv) const
}
bool InsetTabular::copySelection(LCursor & cur)
bool InsetTabular::copySelection(Cursor & cur)
{
if (!cur.selection())
return false;
@ -4544,7 +4544,7 @@ bool InsetTabular::copySelection(LCursor & cur)
}
bool InsetTabular::pasteClipboard(LCursor & cur)
bool InsetTabular::pasteClipboard(Cursor & cur)
{
if (!paste_tabular)
return false;
@ -4580,7 +4580,7 @@ bool InsetTabular::pasteClipboard(LCursor & cur)
}
void InsetTabular::cutSelection(LCursor & cur)
void InsetTabular::cutSelection(Cursor & cur)
{
if (!cur.selection())
return;
@ -4610,7 +4610,7 @@ void InsetTabular::cutSelection(LCursor & cur)
}
bool InsetTabular::isRightToLeft(LCursor & cur) const
bool InsetTabular::isRightToLeft(Cursor & cur) const
{
BOOST_ASSERT(cur.depth() > 1);
Paragraph const & parentpar = cur[cur.depth() - 2].paragraph();
@ -4620,7 +4620,7 @@ bool InsetTabular::isRightToLeft(LCursor & cur) const
}
void InsetTabular::getSelection(LCursor & cur,
void InsetTabular::getSelection(Cursor & cur,
row_type & rs, row_type & re, col_type & cs, col_type & ce) const
{
CursorSlice const & beg = cur.selBegin();
@ -4787,7 +4787,7 @@ void InsetTabular::addPreview(PreviewLoader & loader) const
}
bool InsetTabular::tablemode(LCursor & cur) const
bool InsetTabular::tablemode(Cursor & cur) const
{
return cur.selection() && cur.selBegin().idx() != cur.selEnd().idx();
}

View File

@ -61,7 +61,7 @@ namespace frontend { class Painter; }
class InsetTabular;
class LCursor;
class Cursor;
class OutputParams;
//
@ -294,9 +294,9 @@ public:
void setVAlignment(idx_type cell, VAlignment align,
bool onlycolumn = false);
///
void setColumnPWidth(LCursor &, idx_type, LyXLength const &);
void setColumnPWidth(Cursor &, idx_type, LyXLength const &);
///
bool setMColumnPWidth(LCursor &, idx_type, LyXLength const &);
bool setMColumnPWidth(Cursor &, idx_type, LyXLength const &);
///
void setAlignSpecial(idx_type cell, docstring const & special,
Feature what);
@ -711,9 +711,9 @@ public:
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
///
bool tabularFeatures(LCursor & cur, std::string const & what);
bool tabularFeatures(Cursor & cur, std::string const & what);
///
void tabularFeatures(LCursor & cur, Tabular::Feature feature,
void tabularFeatures(Cursor & cur, Tabular::Feature feature,
std::string const & val = std::string());
///
void openLayoutDialog(BufferView *) const;
@ -749,9 +749,9 @@ public:
/// set the owning buffer
void buffer(Buffer const * buf);
/// lock cell with given index
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
/// can we go further down on mouse click?
bool descendable() const { return true; }
@ -764,9 +764,9 @@ protected:
///
InsetTabular(InsetTabular const &);
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
///
int scroll() const { return scx_; }
@ -777,33 +777,33 @@ private:
void drawCellLines(frontend::Painter &, int x, int y, row_type row,
idx_type cell, bool erased) const;
///
void setCursorFromCoordinates(LCursor & cur, int x, int y) const;
void setCursorFromCoordinates(Cursor & cur, int x, int y) const;
///
void moveNextCell(LCursor & cur);
void moveNextCell(Cursor & cur);
///
void movePrevCell(LCursor & cur);
void movePrevCell(Cursor & cur);
///
int getCellXPos(idx_type cell) const;
///
void resetPos(LCursor & cur) const;
void resetPos(Cursor & cur) const;
///
void removeTabularRow();
///
bool copySelection(LCursor & cur);
bool copySelection(Cursor & cur);
///
bool pasteClipboard(LCursor & cur);
bool pasteClipboard(Cursor & cur);
///
void cutSelection(LCursor & cur);
void cutSelection(Cursor & cur);
///
bool isRightToLeft(LCursor & cur) const;
bool isRightToLeft(Cursor & cur) const;
///
void getSelection(LCursor & cur, row_type & rs, row_type & re,
void getSelection(Cursor & cur, row_type & rs, row_type & re,
col_type & cs, col_type & ce) const;
///
bool insertPlaintextString(BufferView &, docstring const & buf, bool usePaste);
/// are we operating on several cells?
bool tablemode(LCursor & cur) const;
bool tablemode(Cursor & cur) const;
/// return the "Manhattan distance" to nearest corner
int dist(BufferView &, idx_type cell, int x, int y) const;

View File

@ -18,7 +18,7 @@
#include "BufferView.h"
#include "CoordCache.h"
#include "CutAndPaste.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "ErrorList.h"
@ -237,7 +237,7 @@ docstring const InsetText::editMessage() const
}
void InsetText::edit(LCursor & cur, bool left)
void InsetText::edit(Cursor & cur, bool left)
{
//lyxerr << "InsetText: edit left/right" << endl;
int const pit = left ? 0 : paragraphs().size() - 1;
@ -248,13 +248,13 @@ void InsetText::edit(LCursor & cur, bool left)
}
InsetBase * InsetText::editXY(LCursor & cur, int x, int y)
InsetBase * InsetText::editXY(Cursor & cur, int x, int y)
{
return text_.editXY(cur, x, y);
}
void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetText::doDispatch(Cursor & cur, FuncRequest & cmd)
{
LYXERR(Debug::ACTION) << BOOST_CURRENT_FUNCTION
<< " [ cmd.action = "
@ -263,7 +263,7 @@ void InsetText::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetText::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetText::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
return text_.getStatus(cur, cmd, status);

View File

@ -99,7 +99,7 @@ public:
return (i == 0) ? const_cast<LyXText*>(&text_) : 0;
}
///
virtual bool getStatus(LCursor & cur, FuncRequest const & cmd, FuncStatus &) const;
virtual bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
/// set the change for the entire inset
void setChange(Change const & change);
@ -115,9 +115,9 @@ public:
void addPreview(graphics::PreviewLoader &) const;
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
/// number of cells in this inset
size_t nargs() const { return 1; }
@ -140,7 +140,7 @@ public:
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
///

View File

@ -14,7 +14,7 @@
#include "InsetVSpace.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
#include "gettext.h"
@ -63,7 +63,7 @@ std::auto_ptr<InsetBase> InsetVSpace::doClone() const
}
void InsetVSpace::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetVSpace::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {

View File

@ -52,7 +52,7 @@ public:
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -15,7 +15,7 @@
#include "Buffer.h"
#include "BufferParams.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "Floating.h"
@ -64,7 +64,7 @@ InsetWrap::~InsetWrap()
}
void InsetWrap::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetWrap::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY: {
@ -95,7 +95,7 @@ void InsetWrap::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetWrap::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetWrap::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -72,10 +72,10 @@ public:
///
InsetWrapParams const & params() const { return params_; }
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -26,7 +26,7 @@ namespace lyx {
*
* They are managed in LyXAction.cpp and handled in various
* ::dispatch() functions, starting with LyXFunc.C:dispatch(),
* BufferView::dispatch(), LCursor::dispatch() and
* BufferView::dispatch(), Cursor::dispatch() and
* Inset*::doDispatch();
*/
enum kb_action {

View File

@ -20,7 +20,7 @@
#include "BufferList.h"
#include "BufferView.h"
#include "buffer_funcs.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "debug.h"
#include "gettext.h"
@ -330,7 +330,7 @@ void insertPlaintextFile(BufferView * bv, string const & f, bool asParagraph)
if (tmpstr.empty())
return;
LCursor & cur = bv->cursor();
Cursor & cur = bv->cursor();
cap::replaceSelection(cur);
recordUndo(cur);
if (asParagraph)

View File

@ -16,7 +16,7 @@
#include "lyxfind.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "buffer_funcs.h"
#include "BufferView.h"
@ -224,7 +224,7 @@ int replace(BufferView * bv, docstring const & searchstr,
if (!stringSelected(bv, searchstr, cs, mw, fw))
return 0;
LCursor & cur = bv->cursor();
Cursor & cur = bv->cursor();
cap::replaceSelectionWithString(cur, replacestr, fw);
bv->buffer()->markDirty();
find(bv, searchstr, cs, mw, fw);

View File

@ -755,7 +755,7 @@
2004-01-15 André Pönitz <poenitz@gmx.net>
* *.[Ch]: Part of IU. Shift stuff from MathCursor and InsetFormula
to LCursor and InsetBase.
to Cursor and InsetBase.
2004-01-15 André Pönitz <poenitz@gmx.net>

View File

@ -51,7 +51,7 @@ bool CommandInset::metrics(MetricsInfo & mi, Dimension & dim) const
}
InsetBase * CommandInset::editXY(LCursor & cur, int /*x*/, int /*y*/)
InsetBase * CommandInset::editXY(Cursor & cur, int /*x*/, int /*y*/)
{
edit(cur, true);
return this;

View File

@ -31,7 +31,7 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
InsetBase * editXY(LCursor &, int, int);
InsetBase * editXY(Cursor &, int, int);
///
void write(WriteStream & os) const;
//

View File

@ -16,7 +16,7 @@
#include "MathMacroTemplate.h"
#include "BufferView.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "gettext.h"
#include "LColor.h"
@ -163,7 +163,7 @@ void InsetFormulaMacro::draw(PainterInfo & p, int x, int y) const
#warning FIXME
#endif
#if 0
LCursor & cur = p.base.bv->cursor();
Cursor & cur = p.base.bv->cursor();
if (cur.isInside(this))
cur.drawSelection(pi);
#endif

View File

@ -84,7 +84,7 @@ class InfoStream;
class MathMacroTemplate;
class MathMacro;
class MathPosFinder;
class LCursor;
class Cursor;
class TextPainter;
class TextMetricsInfo;
class ReplaceData;

View File

@ -101,7 +101,7 @@ void InsetMathAMSArray::draw(PainterInfo & pi, int x, int y) const
}
bool InsetMathAMSArray::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathAMSArray::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -34,7 +34,7 @@ public:
InsetMathAMSArray const * asAMSArrayInset() const { return this; }
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
///
void write(WriteStream & os) const;

View File

@ -17,7 +17,7 @@
#include "FuncStatus.h"
#include "LaTeXFeatures.h"
#include "support/std_ostream.h"
#include "LCursor.h"
#include "Cursor.h"
#include "FuncRequest.h"
#include "gettext.h"
#include "Undo.h"
@ -68,7 +68,7 @@ void InsetMathCases::draw(PainterInfo & pi, int x, int y) const
}
void InsetMathCases::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathCases::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "*** InsetMathCases: request: " << cmd << endl;
switch (cmd.action) {
@ -86,7 +86,7 @@ void InsetMathCases::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetMathCases::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathCases::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -29,9 +29,9 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
///

View File

@ -12,7 +12,7 @@
#include "InsetMathFracBase.h"
#include "MathArray.h"
#include "LCursor.h"
#include "Cursor.h"
namespace lyx {
@ -23,19 +23,19 @@ InsetMathFracBase::InsetMathFracBase()
{}
bool InsetMathFracBase::idxRight(LCursor &) const
bool InsetMathFracBase::idxRight(Cursor &) const
{
return false;
}
bool InsetMathFracBase::idxLeft(LCursor &) const
bool InsetMathFracBase::idxLeft(Cursor &) const
{
return false;
}
bool InsetMathFracBase::idxUpDown(LCursor & cur, bool up) const
bool InsetMathFracBase::idxUpDown(Cursor & cur, bool up) const
{
InsetMath::idx_type target = !up; // up ? 0 : 1, since upper cell has idx 0
if (cur.idx() == target)

View File

@ -23,11 +23,11 @@ public:
///
InsetMathFracBase();
///
bool idxUpDown(LCursor &, bool up) const;
bool idxUpDown(Cursor &, bool up) const;
///
bool idxLeft(LCursor &) const;
bool idxLeft(Cursor &) const;
///
bool idxRight(LCursor &) const;
bool idxRight(Cursor &) const;
};

View File

@ -19,7 +19,7 @@
#include "CutAndPaste.h"
#include "FuncStatus.h"
#include "LColor.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "FuncRequest.h"
#include "gettext.h"
@ -772,7 +772,7 @@ int InsetMathGrid::cellYOffset(idx_type idx) const
}
bool InsetMathGrid::idxUpDown(LCursor & cur, bool up) const
bool InsetMathGrid::idxUpDown(Cursor & cur, bool up) const
{
if (up) {
if (cur.row() == 0)
@ -788,7 +788,7 @@ bool InsetMathGrid::idxUpDown(LCursor & cur, bool up) const
}
bool InsetMathGrid::idxLeft(LCursor & cur) const
bool InsetMathGrid::idxLeft(Cursor & cur) const
{
// leave matrix if on the left hand edge
if (cur.col() == 0)
@ -799,7 +799,7 @@ bool InsetMathGrid::idxLeft(LCursor & cur) const
}
bool InsetMathGrid::idxRight(LCursor & cur) const
bool InsetMathGrid::idxRight(Cursor & cur) const
{
// leave matrix if on the right hand edge
if (cur.col() + 1 == ncols())
@ -810,7 +810,7 @@ bool InsetMathGrid::idxRight(LCursor & cur) const
}
bool InsetMathGrid::idxFirst(LCursor & cur) const
bool InsetMathGrid::idxFirst(Cursor & cur) const
{
switch (v_align_) {
case 't':
@ -827,7 +827,7 @@ bool InsetMathGrid::idxFirst(LCursor & cur) const
}
bool InsetMathGrid::idxLast(LCursor & cur) const
bool InsetMathGrid::idxLast(Cursor & cur) const
{
switch (v_align_) {
case 't':
@ -1012,7 +1012,7 @@ int InsetMathGrid::border() const
}
void InsetMathGrid::splitCell(LCursor & cur)
void InsetMathGrid::splitCell(Cursor & cur)
{
if (cur.idx() == cur.lastidx())
return;
@ -1025,7 +1025,7 @@ void InsetMathGrid::splitCell(LCursor & cur)
}
void InsetMathGrid::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathGrid::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "*** InsetMathGrid: request: " << cmd << endl;
switch (cmd.action) {
@ -1301,7 +1301,7 @@ void InsetMathGrid::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetMathGrid::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathGrid::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -150,15 +150,15 @@ public:
row_type row(idx_type idx) const;
///
bool idxUpDown(LCursor &, bool up) const;
bool idxUpDown(Cursor &, bool up) const;
///
bool idxLeft(LCursor &) const;
bool idxLeft(Cursor &) const;
///
bool idxRight(LCursor &) const;
bool idxRight(Cursor &) const;
///
bool idxFirst(LCursor &) const;
bool idxFirst(Cursor &) const;
///
bool idxLast(LCursor &) const;
bool idxLast(Cursor &) const;
///
bool idxDelete(idx_type & idx);
/// pulls cell after pressing erase
@ -216,9 +216,9 @@ public:
//void octave(OctaveStream &) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
/// returns x offset of cell compared to inset
int cellXOffset(idx_type idx) const;
@ -232,7 +232,7 @@ protected:
/// extract number of columns from alignment string
col_type guessColumns(docstring const & halign) const;
/// splits cells and shifts right part to the next cell
void splitCell(LCursor & cur);
void splitCell(Cursor & cur);
/// row info.
/// rowinfo_[nrows()] is a dummy row used only for hlines.

View File

@ -35,7 +35,7 @@
#include "FuncStatus.h"
#include "LColor.h"
#include "LaTeXFeatures.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
@ -208,7 +208,7 @@ InsetMathHull & InsetMathHull::operator=(InsetMathHull const & other)
}
InsetBase * InsetMathHull::editXY(LCursor & cur, int x, int y)
InsetBase * InsetMathHull::editXY(Cursor & cur, int x, int y)
{
if (use_preview_) {
edit(cur, true);
@ -227,7 +227,7 @@ InsetMath::mode_type InsetMathHull::currentMode() const
}
bool InsetMathHull::idxFirst(LCursor & cur) const
bool InsetMathHull::idxFirst(Cursor & cur) const
{
cur.idx() = 0;
cur.pos() = 0;
@ -235,7 +235,7 @@ bool InsetMathHull::idxFirst(LCursor & cur) const
}
bool InsetMathHull::idxLast(LCursor & cur) const
bool InsetMathHull::idxLast(Cursor & cur) const
{
cur.idx() = nargs() - 1;
cur.pos() = cur.lastpos();
@ -409,7 +409,7 @@ void InsetMathHull::addPreview(graphics::PreviewLoader & ploader) const
}
bool InsetMathHull::notifyCursorLeaves(LCursor & cur)
bool InsetMathHull::notifyCursorLeaves(Cursor & cur)
{
if (RenderPreview::status() == LyXRC::PREVIEW_ON) {
Buffer const & buffer = cur.buffer();
@ -954,7 +954,7 @@ void InsetMathHull::check() const
}
void InsetMathHull::doExtern(LCursor & cur, FuncRequest & func)
void InsetMathHull::doExtern(Cursor & cur, FuncRequest & func)
{
docstring dlang;
docstring extra;
@ -1034,7 +1034,7 @@ void InsetMathHull::doExtern(LCursor & cur, FuncRequest & func)
}
void InsetMathHull::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "action: " << cmd.action << endl;
switch (cmd.action) {
@ -1174,7 +1174,7 @@ void InsetMathHull::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetMathHull::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {
@ -1286,7 +1286,7 @@ void InsetMathHull::mutateToText()
}
void InsetMathHull::handleFont(LCursor & cur, docstring const & arg,
void InsetMathHull::handleFont(Cursor & cur, docstring const & arg,
docstring const & font)
{
// this whole function is a hack and won't work for incremental font
@ -1301,7 +1301,7 @@ void InsetMathHull::handleFont(LCursor & cur, docstring const & arg,
}
void InsetMathHull::handleFont2(LCursor & cur, docstring const & arg)
void InsetMathHull::handleFont2(Cursor & cur, docstring const & arg)
{
recordUndo(cur);
LyXFont font;
@ -1314,7 +1314,7 @@ void InsetMathHull::handleFont2(LCursor & cur, docstring const & arg)
}
void InsetMathHull::edit(LCursor & cur, bool left)
void InsetMathHull::edit(Cursor & cur, bool left)
{
cur.push(*this);
left ? idxFirst(cur) : idxLast(cur);
@ -1331,7 +1331,7 @@ docstring const InsetMathHull::editMessage() const
}
void InsetMathHull::revealCodes(LCursor & cur) const
void InsetMathHull::revealCodes(Cursor & cur) const
{
if (!cur.inMathed())
return;

View File

@ -85,9 +85,9 @@ public:
///
char defaultColAlign(col_type col);
///
bool idxFirst(LCursor &) const;
bool idxFirst(Cursor &) const;
///
bool idxLast(LCursor &) const;
bool idxLast(Cursor &) const;
///
void write(WriteStream & os) const;
@ -112,7 +112,7 @@ public:
virtual void textString(Buffer const &, odocstream &) const;
/// get notification when the cursor leaves this inset
bool notifyCursorLeaves(LCursor & cur);
bool notifyCursorLeaves(Cursor & cur);
///
//bool insetAllowed(Code code) const;
///
@ -124,10 +124,10 @@ public:
protected:
InsetMathHull(InsetMathHull const &);
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
/// do we want to handle this event?
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const;
///
docstring eolString(row_type row, bool emptyline, bool fragile) const;
@ -145,7 +145,7 @@ private:
///
docstring nicelabel(row_type row) const;
///
void doExtern(LCursor & cur, FuncRequest & func);
void doExtern(Cursor & cur, FuncRequest & func);
///
void glueall();
/*!
@ -192,13 +192,13 @@ public:
///
virtual void mutateToText();
///
virtual void revealCodes(LCursor & cur) const;
virtual void revealCodes(Cursor & cur) const;
///
EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
///
bool display() const;
///
@ -206,10 +206,10 @@ public:
protected:
///
void handleFont(LCursor & cur, docstring const & arg,
void handleFont(Cursor & cur, docstring const & arg,
docstring const & font);
///
void handleFont2(LCursor & cur, docstring const & arg);
void handleFont2(Cursor & cur, docstring const & arg);
///
bool previewState(BufferView * bv) const;
};

View File

@ -17,7 +17,7 @@
#include "BufferView.h"
#include "Buffer.h"
#include "BufferParams.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "MetricsInfo.h"
#include "output_latex.h"
@ -104,7 +104,7 @@ int InsetMathMBox::latex(Buffer const & buf, odocstream & os,
}
void InsetMathMBox::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathMBox::doDispatch(Cursor & cur, FuncRequest & cmd)
{
text_.dispatch(cur, cmd);
}

View File

@ -55,7 +55,7 @@ public:
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
mutable LyXText text_;

View File

@ -39,7 +39,7 @@
#include "LColor.h"
#include "bufferview_funcs.h"
#include "CoordCache.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "DispatchResult.h"
#include "FuncRequest.h"
@ -138,7 +138,7 @@ void InsetMathNest::metrics(MetricsInfo const & mi) const
}
bool InsetMathNest::idxNext(LCursor & cur) const
bool InsetMathNest::idxNext(Cursor & cur) const
{
BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
if (cur.idx() == cur.lastidx())
@ -149,13 +149,13 @@ bool InsetMathNest::idxNext(LCursor & cur) const
}
bool InsetMathNest::idxRight(LCursor & cur) const
bool InsetMathNest::idxRight(Cursor & cur) const
{
return idxNext(cur);
}
bool InsetMathNest::idxPrev(LCursor & cur) const
bool InsetMathNest::idxPrev(Cursor & cur) const
{
BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
if (cur.idx() == 0)
@ -166,13 +166,13 @@ bool InsetMathNest::idxPrev(LCursor & cur) const
}
bool InsetMathNest::idxLeft(LCursor & cur) const
bool InsetMathNest::idxLeft(Cursor & cur) const
{
return idxPrev(cur);
}
bool InsetMathNest::idxFirst(LCursor & cur) const
bool InsetMathNest::idxFirst(Cursor & cur) const
{
BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
if (nargs() == 0)
@ -183,7 +183,7 @@ bool InsetMathNest::idxFirst(LCursor & cur) const
}
bool InsetMathNest::idxLast(LCursor & cur) const
bool InsetMathNest::idxLast(Cursor & cur) const
{
BOOST_ASSERT(ptr_cmp(&cur.inset(), this));
if (nargs() == 0)
@ -223,7 +223,7 @@ void InsetMathNest::drawSelection(PainterInfo & pi, int x, int y) const
{
BufferView & bv = *pi.base.bv;
// this should use the x/y values given, not the cached values
LCursor & cur = bv.cursor();
Cursor & cur = bv.cursor();
if (!cur.selection())
return;
if (!ptr_cmp(&cur.inset(), this))
@ -346,7 +346,7 @@ int InsetMathNest::latex(Buffer const &, odocstream & os,
}
bool InsetMathNest::notifyCursorLeaves(LCursor & /*cur*/)
bool InsetMathNest::notifyCursorLeaves(Cursor & /*cur*/)
{
#ifdef WITH_WARNINGS
#warning look here
@ -380,14 +380,14 @@ bool InsetMathNest::notifyCursorLeaves(LCursor & /*cur*/)
void InsetMathNest::handleFont
(LCursor & cur, docstring const & arg, char const * const font)
(Cursor & cur, docstring const & arg, char const * const font)
{
handleFont(cur, arg, from_ascii(font));
}
void InsetMathNest::handleFont
(LCursor & cur, docstring const & arg, docstring const & font)
(Cursor & cur, docstring const & arg, docstring const & font)
{
// this whole function is a hack and won't work for incremental font
// changes...
@ -403,7 +403,7 @@ void InsetMathNest::handleFont
}
void InsetMathNest::handleFont2(LCursor & cur, docstring const & arg)
void InsetMathNest::handleFont2(Cursor & cur, docstring const & arg)
{
recordUndo(cur, Undo::ATOMIC);
LyXFont font;
@ -416,7 +416,7 @@ void InsetMathNest::handleFont2(LCursor & cur, docstring const & arg)
}
void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathNest::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "InsetMathNest: request: " << cmd << std::endl;
//CursorSlice sl = cur.current();
@ -701,7 +701,7 @@ void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
// cmd.argument is the next character of the macro name.
// Otherwise we'll get an invalid cursor if we undo after
// the macro was finished and the macro is a known command,
// e.g. sqrt. LCursor::macroModeClose replaces in this case
// e.g. sqrt. Cursor::macroModeClose replaces in this case
// the InsetMathUnknown with name "frac" by an empty
// InsetMathFrac -> a pos value > 0 is invalid.
// A side effect is that an undo before the macro is finished
@ -991,7 +991,7 @@ void InsetMathNest::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool InsetMathNest::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
// the font related toggles
@ -1091,7 +1091,7 @@ bool InsetMathNest::getStatus(LCursor & cur, FuncRequest const & cmd,
}
void InsetMathNest::edit(LCursor & cur, bool left)
void InsetMathNest::edit(Cursor & cur, bool left)
{
cur.push(*this);
cur.idx() = left ? 0 : cur.lastidx();
@ -1101,7 +1101,7 @@ void InsetMathNest::edit(LCursor & cur, bool left)
}
InsetBase * InsetMathNest::editXY(LCursor & cur, int x, int y)
InsetBase * InsetMathNest::editXY(Cursor & cur, int x, int y)
{
int idx_min = 0;
int dist_min = 1000000;
@ -1128,7 +1128,7 @@ InsetBase * InsetMathNest::editXY(LCursor & cur, int x, int y)
}
void InsetMathNest::lfunMousePress(LCursor & cur, FuncRequest & cmd)
void InsetMathNest::lfunMousePress(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "## lfunMousePress: buttons: " << cmd.button() << endl;
BufferView & bv = cur.bv();
@ -1159,11 +1159,11 @@ void InsetMathNest::lfunMousePress(LCursor & cur, FuncRequest & cmd)
}
void InsetMathNest::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
void InsetMathNest::lfunMouseMotion(Cursor & cur, FuncRequest & cmd)
{
// only select with button 1
if (cmd.button() == mouse_button::button1) {
LCursor & bvcur = cur.bv().cursor();
Cursor & bvcur = cur.bv().cursor();
if (bvcur.anchor_.hasPart(cur)) {
//lyxerr << "## lfunMouseMotion: cursor: " << cur << endl;
bvcur.setCursor(cur);
@ -1175,7 +1175,7 @@ void InsetMathNest::lfunMouseMotion(LCursor & cur, FuncRequest & cmd)
}
void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
void InsetMathNest::lfunMouseRelease(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "## lfunMouseRelease: buttons: " << cmd.button() << endl;
@ -1183,7 +1183,7 @@ void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
if (!cur.selection())
cur.noUpdate();
else {
LCursor & bvcur = cur.bv().cursor();
Cursor & bvcur = cur.bv().cursor();
bvcur.selection() = true;
cap::saveSelection(bvcur);
}
@ -1194,7 +1194,7 @@ void InsetMathNest::lfunMouseRelease(LCursor & cur, FuncRequest & cmd)
}
bool InsetMathNest::interpretChar(LCursor & cur, char_type c)
bool InsetMathNest::interpretChar(Cursor & cur, char_type c)
{
//lyxerr << "interpret 2: '" << c << "'" << endl;
docstring save_selection;
@ -1389,7 +1389,7 @@ bool InsetMathNest::interpretChar(LCursor & cur, char_type c)
}
bool InsetMathNest::interpretString(LCursor & cur, docstring const & str)
bool InsetMathNest::interpretString(Cursor & cur, docstring const & str)
{
// Create a InsetMathBig from cur.cell()[cur.pos() - 1] and t if
// possible
@ -1412,7 +1412,7 @@ bool InsetMathNest::interpretString(LCursor & cur, docstring const & str)
}
bool InsetMathNest::script(LCursor & cur, bool up,
bool InsetMathNest::script(Cursor & cur, bool up,
docstring const & save_selection)
{
// Hack to get \^ and \_ working

View File

@ -46,24 +46,24 @@ public:
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
///
void edit(LCursor & cur, bool left);
void edit(Cursor & cur, bool left);
///
InsetBase * editXY(LCursor & cur, int x, int y);
InsetBase * editXY(Cursor & cur, int x, int y);
/// order of movement through the cells when pressing the left key
bool idxLeft(LCursor &) const;
bool idxLeft(Cursor &) const;
/// order of movement through the cells when pressing the right key
bool idxRight(LCursor &) const;
bool idxRight(Cursor &) const;
/// move one physical cell up
bool idxNext(LCursor &) const;
bool idxNext(Cursor &) const;
/// move one physical cell down
bool idxPrev(LCursor &) const;
bool idxPrev(Cursor &) const;
/// target pos when we enter the inset from the left by pressing "Right"
bool idxFirst(LCursor &) const;
bool idxFirst(Cursor &) const;
/// target pos when we enter the inset from the right by pressing "Left"
bool idxLast(LCursor &) const;
bool idxLast(Cursor &) const;
/// number of cells currently governed by us
idx_type nargs() const;
@ -72,7 +72,7 @@ public:
/// access to the lock
void lock(bool);
/// get notification when the cursor leaves this inset
bool notifyCursorLeaves(LCursor & cur);
bool notifyCursorLeaves(Cursor & cur);
/// direct access to the cell.
/// inlined because shows in profile.
@ -106,38 +106,38 @@ public:
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
/// do we want to handle this event?
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const;
///
void handleFont(LCursor & cur,
void handleFont(Cursor & cur,
docstring const & arg, docstring const & font);
void handleFont(LCursor & cur,
void handleFont(Cursor & cur,
docstring const & arg, char const * const font);
///
void handleFont2(LCursor & cur, docstring const & arg);
void handleFont2(Cursor & cur, docstring const & arg);
/// interpret \p c and insert the result at the current position of
/// of \p cur. Return whether the cursor should stay in the formula.
bool interpretChar(LCursor & cur, char_type c);
bool interpretChar(Cursor & cur, char_type c);
///
bool script(LCursor & cur, bool,
bool script(Cursor & cur, bool,
docstring const & save_selection = docstring());
public:
/// interpret \p str and insert the result at the current position of
/// \p cur if it is something known. Return whether \p cur was
/// inserted.
bool interpretString(LCursor & cur, docstring const & str);
bool interpretString(Cursor & cur, docstring const & str);
private:
/// lfun handler
void lfunMousePress(LCursor &, FuncRequest &);
void lfunMousePress(Cursor &, FuncRequest &);
///
void lfunMouseRelease(LCursor &, FuncRequest &);
void lfunMouseRelease(Cursor &, FuncRequest &);
///
void lfunMouseMotion(LCursor &, FuncRequest &);
void lfunMouseMotion(Cursor &, FuncRequest &);
protected:
/// we store the cells in a vector

View File

@ -14,7 +14,7 @@
#include "MathArray.h"
#include "MathStream.h"
#include "LCursor.h"
#include "Cursor.h"
#include "LaTeXFeatures.h"
@ -57,7 +57,7 @@ void InsetMathOverset::draw(PainterInfo & pi, int x, int y) const
}
bool InsetMathOverset::idxFirst(LCursor & cur) const
bool InsetMathOverset::idxFirst(Cursor & cur) const
{
cur.idx() = 1;
cur.pos() = 0;
@ -65,7 +65,7 @@ bool InsetMathOverset::idxFirst(LCursor & cur) const
}
bool InsetMathOverset::idxLast(LCursor & cur) const
bool InsetMathOverset::idxLast(Cursor & cur) const
{
cur.idx() = 1;
cur.pos() = cur.lastpos();

View File

@ -26,9 +26,9 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
bool idxFirst(LCursor &) const;
bool idxFirst(Cursor &) const;
///
bool idxLast(LCursor &) const;
bool idxLast(Cursor &) const;
///
void write(WriteStream & os) const;
///

View File

@ -15,7 +15,7 @@
#include "BufferView.h"
#include "LaTeXFeatures.h"
#include "Buffer.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "FuncRequest.h"
#include "FuncStatus.h"
@ -58,7 +58,7 @@ void RefInset::infoize(odocstream & os) const
}
void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
void RefInset::doDispatch(Cursor & cur, FuncRequest & cmd)
{
switch (cmd.action) {
case LFUN_INSET_MODIFY:
@ -105,7 +105,7 @@ void RefInset::doDispatch(LCursor & cur, FuncRequest & cmd)
}
bool RefInset::getStatus(LCursor & cur, FuncRequest const & cmd,
bool RefInset::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & status) const
{
switch (cmd.action) {

View File

@ -57,9 +57,9 @@ public:
static docstring const & getName(int type);
protected:
///
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
bool getStatus(LCursor &, FuncRequest const &, FuncStatus &) const;
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
private:
///
virtual std::auto_ptr<InsetBase> doClone() const;

View File

@ -14,7 +14,7 @@
#include "InsetMathRoot.h"
#include "MathArray.h"
#include "MathStream.h"
#include "LCursor.h"
#include "Cursor.h"
#include "LColor.h"
#include "frontends/Painter.h"
@ -85,9 +85,9 @@ void InsetMathRoot::normalize(NormalStream & os) const
}
bool InsetMathRoot::idxUpDown(LCursor & cur, bool up) const
bool InsetMathRoot::idxUpDown(Cursor & cur, bool up) const
{
LCursor::idx_type const target = up ? 0 : 1;
Cursor::idx_type const target = up ? 0 : 1;
if (cur.idx() == target)
return false;
cur.idx() = target;

View File

@ -25,7 +25,7 @@ public:
///
InsetMathRoot();
///
bool idxUpDown(LCursor & cur, bool up) const;
bool idxUpDown(Cursor & cur, bool up) const;
///
bool metrics(MetricsInfo & mi, Dimension & dim) const;
///

View File

@ -17,7 +17,7 @@
#include "InsetMathSymbol.h"
#include "InsetMathFont.h"
#include "DispatchResult.h"
#include "LCursor.h"
#include "Cursor.h"
#include "debug.h"
#include "FuncRequest.h"
#include "Undo.h"
@ -70,7 +70,7 @@ InsetMathScript * InsetMathScript::asScriptInset()
}
bool InsetMathScript::idxFirst(LCursor & cur) const
bool InsetMathScript::idxFirst(Cursor & cur) const
{
cur.idx() = 0;
cur.pos() = 0;
@ -78,7 +78,7 @@ bool InsetMathScript::idxFirst(LCursor & cur) const
}
bool InsetMathScript::idxLast(LCursor & cur) const
bool InsetMathScript::idxLast(Cursor & cur) const
{
cur.idx() = 0;
cur.pos() = nuc().size();
@ -454,19 +454,19 @@ InsetBase::idx_type InsetMathScript::idxOfScript(bool up) const
}
bool InsetMathScript::idxRight(LCursor &) const
bool InsetMathScript::idxRight(Cursor &) const
{
return false;
}
bool InsetMathScript::idxLeft(LCursor &) const
bool InsetMathScript::idxLeft(Cursor &) const
{
return false;
}
bool InsetMathScript::idxUpDown(LCursor & cur, bool up) const
bool InsetMathScript::idxUpDown(Cursor & cur, bool up) const
{
// in nucleus?
if (cur.idx() == 0) {
@ -647,7 +647,7 @@ void InsetMathScript::infoize2(odocstream & os) const
}
bool InsetMathScript::notifyCursorLeaves(LCursor & cur)
bool InsetMathScript::notifyCursorLeaves(Cursor & cur)
{
InsetMathNest::notifyCursorLeaves(cur);
@ -672,12 +672,12 @@ bool InsetMathScript::notifyCursorLeaves(LCursor & cur)
recordUndoInset(cur);
removeScript(cell_1_is_up_);
// Let the script inset commit suicide. This is
// modelled on LCursor.pullArg(), but tries not to
// modelled on Cursor.pullArg(), but tries not to
// invoke notifyCursorLeaves again and does not touch
// cur (since the top slice will be deleted
// afterwards))
MathArray ar = cell(0);
LCursor tmpcur = cur;
Cursor tmpcur = cur;
tmpcur.pop();
tmpcur.cell().erase(tmpcur.pos());
tmpcur.cell().insert(tmpcur.pos(), ar);
@ -689,7 +689,7 @@ bool InsetMathScript::notifyCursorLeaves(LCursor & cur)
}
void InsetMathScript::doDispatch(LCursor & cur, FuncRequest & cmd)
void InsetMathScript::doDispatch(Cursor & cur, FuncRequest & cmd)
{
//lyxerr << "InsetMathScript: request: " << cmd << std::endl;

View File

@ -42,15 +42,15 @@ public:
void drawT(TextPainter & pi, int x, int y) const;
/// move cursor left
bool idxLeft(LCursor & cur) const;
bool idxLeft(Cursor & cur) const;
/// move cursor right
bool idxRight(LCursor & cur) const;
bool idxRight(Cursor & cur) const;
/// move cursor up or down
bool idxUpDown(LCursor & cur, bool up) const;
bool idxUpDown(Cursor & cur, bool up) const;
/// Target pos when we enter the inset from the left by pressing "Right"
bool idxFirst(LCursor & cur) const;
bool idxFirst(Cursor & cur) const;
/// Target pos when we enter the inset from the right by pressing "Left"
bool idxLast(LCursor & cur) const;
bool idxLast(Cursor & cur) const;
/// write LaTeX and Lyx code
void write(WriteStream & os) const;
@ -103,7 +103,7 @@ public:
/// say whether we have displayed limits
void infoize2(odocstream & os) const;
protected:
virtual void doDispatch(LCursor & cur, FuncRequest & cmd);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
private:
virtual std::auto_ptr<InsetBase> doClone() const;
/// returns x offset for main part
@ -129,7 +129,7 @@ private:
/// where do we have to draw the scripts?
bool hasLimits() const;
/// clean up empty cells and return true if a cell has been deleted.
bool notifyCursorLeaves(LCursor & cur);
bool notifyCursorLeaves(Cursor & cur);
/// possible subscript (index 0) and superscript (index 1)
bool cell_1_is_up_;

View File

@ -65,7 +65,7 @@ void InsetMathSplit::draw(PainterInfo & pi, int x, int y) const
}
bool InsetMathSplit::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathSplit::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -25,7 +25,7 @@ public:
///
void draw(PainterInfo & pi, int x, int y) const;
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
void write(WriteStream & os) const;

View File

@ -63,7 +63,7 @@ void InsetMathSubstack::draw(PainterInfo & pi, int x, int y) const
}
bool InsetMathSubstack::getStatus(LCursor & cur, FuncRequest const & cmd,
bool InsetMathSubstack::getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const
{
switch (cmd.action) {

View File

@ -32,7 +32,7 @@ public:
InsetMathSubstack const * asSubstackInset() const { return this; }
///
bool getStatus(LCursor & cur, FuncRequest const & cmd,
bool getStatus(Cursor & cur, FuncRequest const & cmd,
FuncStatus & flag) const;
///
void infoize(odocstream & os) const;

View File

@ -14,7 +14,7 @@
#include "MathArray.h"
#include "MathStream.h"
#include "LCursor.h"
#include "Cursor.h"
#include "LaTeXFeatures.h"
@ -58,7 +58,7 @@ void InsetMathUnderset::draw(PainterInfo & pi, int x, int y) const
}
bool InsetMathUnderset::idxFirst(LCursor & cur) const
bool InsetMathUnderset::idxFirst(Cursor & cur) const
{
cur.idx() = 1;
cur.pos() = 0;
@ -66,7 +66,7 @@ bool InsetMathUnderset::idxFirst(LCursor & cur) const
}
bool InsetMathUnderset::idxLast(LCursor & cur) const
bool InsetMathUnderset::idxLast(Cursor & cur) const
{
cur.idx() = 1;
cur.pos() = cur.lastpos();
@ -74,7 +74,7 @@ bool InsetMathUnderset::idxLast(LCursor & cur) const
}
bool InsetMathUnderset::idxUpDown(LCursor & cur, bool up) const
bool InsetMathUnderset::idxUpDown(Cursor & cur, bool up) const
{
idx_type target = up; // up ? 1 : 0, since upper cell has idx 1
if (cur.idx() == target)

Some files were not shown because too many files have changed in this diff Show More