mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
DISPATCH -> dispatch_result
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7900 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
22c7835022
commit
75b485d110
@ -1,3 +1,9 @@
|
||||
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* lyxfunc.C (dispatch): RESULT -> dispatch_result
|
||||
* lyxtext.h: ditto
|
||||
* text3.C (dispatch): ditto
|
||||
|
||||
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* lyxserver.C (callback): adjust
|
||||
|
@ -1,8 +1,29 @@
|
||||
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* inset.h: get rid of RESULT typedef for dispatch_result
|
||||
|
||||
* insetcollapsable.[Ch] (localDispatch): RESULT -> dispatch_result
|
||||
* insetert.[Ch] (localDispatch): ditto
|
||||
* insettabular.[Ch] (localDispatch): ditto
|
||||
(moveRight): ditto
|
||||
(moveLeft): ditto
|
||||
(moveUp): ditto
|
||||
(moveDown): ditto
|
||||
* insettext.[Ch] (localDispatch): ditto
|
||||
(moveRight): ditto
|
||||
(moveLeft): ditto
|
||||
(moveRightIntern): ditto
|
||||
(moveLeftIntern): ditto
|
||||
(moveUp): ditto
|
||||
(moveDown): ditto
|
||||
* updatableinset.[Ch] (localDispatch): ditto
|
||||
|
||||
2003-10-12 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* renderbase.h (view, view_): removed.
|
||||
* renderbase.C: removed.
|
||||
* Makefile.am: remove render_base.C. The shortest lived file in history?
|
||||
* Makefile.am: remove render_base.C. The shortest lived file in
|
||||
history?
|
||||
|
||||
* renderbutton.C (draw):
|
||||
* render_graphic.C (draw): don't cache the BufferView.
|
||||
@ -113,11 +134,11 @@
|
||||
|
||||
* Makefile.am: add new files.
|
||||
|
||||
* insetexternal.[Ch]: InsetExternal::Params -> InsetExternalParams,
|
||||
allowing the class to be forward declared. (Also consistent with
|
||||
all other Params classes.)
|
||||
(write): moved out of the class. Move this function and those in
|
||||
namespace anon to ExternalSupport.[Ch].
|
||||
* insetexternal.[Ch]: InsetExternal::Params -> InsetExternalParams,
|
||||
allowing the class to be forward declared. (Also consistent with
|
||||
all other Params classes.)
|
||||
(write): moved out of the class. Move this function and those in
|
||||
namespace anon to ExternalSupport.[Ch].
|
||||
|
||||
2003-10-07 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
|
@ -152,9 +152,6 @@ public:
|
||||
HIGHLY_EDITABLE
|
||||
};
|
||||
|
||||
///
|
||||
typedef dispatch_result RESULT;
|
||||
|
||||
///
|
||||
InsetOld();
|
||||
///
|
||||
|
@ -271,7 +271,7 @@ bool InsetCollapsable::hitButton(FuncRequest const & cmd) const
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
|
||||
dispatch_result InsetCollapsable::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
//lyxerr << "InsetCollapsable::localDispatch: "
|
||||
// << cmd.action << " '" << cmd.argument << "'\n";
|
||||
@ -343,7 +343,7 @@ InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
|
||||
return DISPATCHED;
|
||||
|
||||
default:
|
||||
UpdatableInset::RESULT result = inset.localDispatch(cmd);
|
||||
dispatch_result result = inset.localDispatch(cmd);
|
||||
if (result >= FINISHED)
|
||||
bv->unlockInset(this);
|
||||
first_after_edit = false;
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
///
|
||||
int insetInInsetY() const;
|
||||
///
|
||||
RESULT localDispatch(FuncRequest const &);
|
||||
dispatch_result localDispatch(FuncRequest const &);
|
||||
///
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
LatexRunParams const &) const;
|
||||
|
@ -415,9 +415,9 @@ int InsetERT::docbook(Buffer const &, ostream & os, bool) const
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetERT::localDispatch(FuncRequest const & cmd)
|
||||
dispatch_result InsetERT::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
InsetOld::RESULT result = UNDISPATCHED;
|
||||
dispatch_result result = UNDISPATCHED;
|
||||
BufferView * bv = cmd.view();
|
||||
|
||||
if (inset.paragraphs.begin()->empty()) {
|
||||
|
@ -76,7 +76,7 @@ public:
|
||||
///
|
||||
void validate(LaTeXFeatures &) const {}
|
||||
///
|
||||
RESULT localDispatch(FuncRequest const &);
|
||||
dispatch_result localDispatch(FuncRequest const &);
|
||||
///
|
||||
bool checkInsertChar(LyXFont &);
|
||||
///
|
||||
|
@ -625,12 +625,12 @@ void InsetTabular::lfunMouseMotion(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetTabular::localDispatch(FuncRequest const & cmd)
|
||||
dispatch_result InsetTabular::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
// We need to save the value of the_locking_inset as the call to
|
||||
// the_locking_inset->localDispatch might unlock it.
|
||||
old_locking_inset = the_locking_inset;
|
||||
RESULT result = UpdatableInset::localDispatch(cmd);
|
||||
dispatch_result result = UpdatableInset::localDispatch(cmd);
|
||||
BufferView * bv = cmd.view();
|
||||
|
||||
if (cmd.action == LFUN_INSET_EDIT) {
|
||||
@ -1353,7 +1353,7 @@ void InsetTabular::resetPos(BufferView * bv) const
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetTabular::moveRight(BufferView * bv, bool lock)
|
||||
dispatch_result InsetTabular::moveRight(BufferView * bv, bool lock)
|
||||
{
|
||||
if (lock && !old_locking_inset) {
|
||||
if (activateCellInset(bv))
|
||||
@ -1371,7 +1371,7 @@ InsetOld::RESULT InsetTabular::moveRight(BufferView * bv, bool lock)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetTabular::moveLeft(BufferView * bv, bool lock)
|
||||
dispatch_result InsetTabular::moveLeft(BufferView * bv, bool lock)
|
||||
{
|
||||
bool moved = isRightToLeft(bv) ? moveNextCell(bv) : movePrevCell(bv);
|
||||
if (!moved)
|
||||
@ -1385,7 +1385,7 @@ InsetOld::RESULT InsetTabular::moveLeft(BufferView * bv, bool lock)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetTabular::moveUp(BufferView * bv, bool lock)
|
||||
dispatch_result InsetTabular::moveUp(BufferView * bv, bool lock)
|
||||
{
|
||||
int const ocell = actcell;
|
||||
actcell = tabular.getCellAbove(actcell);
|
||||
@ -1406,7 +1406,7 @@ InsetOld::RESULT InsetTabular::moveUp(BufferView * bv, bool lock)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetTabular::moveDown(BufferView * bv, bool lock)
|
||||
dispatch_result InsetTabular::moveDown(BufferView * bv, bool lock)
|
||||
{
|
||||
int const ocell = actcell;
|
||||
actcell = tabular.getCellBelow(actcell);
|
||||
|
@ -105,7 +105,7 @@ public:
|
||||
///
|
||||
bool display() const { return tabular.isLongTabular(); }
|
||||
///
|
||||
RESULT localDispatch(FuncRequest const &);
|
||||
dispatch_result localDispatch(FuncRequest const &);
|
||||
///
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
LatexRunParams const &) const;
|
||||
@ -229,13 +229,13 @@ private:
|
||||
///
|
||||
void setPos(BufferView *, int x, int y) const;
|
||||
///
|
||||
RESULT moveRight(BufferView *, bool lock = true);
|
||||
dispatch_result moveRight(BufferView *, bool lock = true);
|
||||
///
|
||||
RESULT moveLeft(BufferView *, bool lock = true);
|
||||
dispatch_result moveLeft(BufferView *, bool lock = true);
|
||||
///
|
||||
RESULT moveUp(BufferView *, bool lock = true);
|
||||
dispatch_result moveUp(BufferView *, bool lock = true);
|
||||
///
|
||||
RESULT moveDown(BufferView *, bool lock = true);
|
||||
dispatch_result moveDown(BufferView *, bool lock = true);
|
||||
///
|
||||
bool moveNextCell(BufferView *, bool lock = false);
|
||||
///
|
||||
|
@ -588,7 +588,7 @@ void InsetText::lfunMouseMotion(FuncRequest const & cmd)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetText::localDispatch(FuncRequest const & cmd)
|
||||
dispatch_result InsetText::localDispatch(FuncRequest const & cmd)
|
||||
{
|
||||
BufferView * bv = cmd.view();
|
||||
setViewCache(bv);
|
||||
@ -668,7 +668,7 @@ InsetOld::RESULT InsetText::localDispatch(FuncRequest const & cmd)
|
||||
bool was_empty = paragraphs.begin()->empty() && paragraphs.size() == 1;
|
||||
no_selection = false;
|
||||
|
||||
RESULT result = UpdatableInset::localDispatch(cmd);
|
||||
dispatch_result result = UpdatableInset::localDispatch(cmd);
|
||||
if (result != UNDISPATCHED)
|
||||
return DISPATCHED;
|
||||
|
||||
@ -1177,7 +1177,7 @@ void InsetText::fitInsetCursor(BufferView * bv) const
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetText::moveRight(BufferView * bv)
|
||||
dispatch_result InsetText::moveRight(BufferView * bv)
|
||||
{
|
||||
if (text_.cursorPar()->isRightToLeftPar(bv->buffer()->params()))
|
||||
return moveLeftIntern(bv, false, true, false);
|
||||
@ -1186,7 +1186,7 @@ InsetOld::RESULT InsetText::moveRight(BufferView * bv)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetText::moveLeft(BufferView * bv)
|
||||
dispatch_result InsetText::moveLeft(BufferView * bv)
|
||||
{
|
||||
if (text_.cursorPar()->isRightToLeftPar(bv->buffer()->params()))
|
||||
return moveRightIntern(bv, true, true, false);
|
||||
@ -1195,7 +1195,7 @@ InsetOld::RESULT InsetText::moveLeft(BufferView * bv)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT
|
||||
dispatch_result
|
||||
InsetText::moveRightIntern(BufferView * bv, bool front,
|
||||
bool activate_inset, bool selecting)
|
||||
{
|
||||
@ -1212,7 +1212,7 @@ InsetText::moveRightIntern(BufferView * bv, bool front,
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT
|
||||
dispatch_result
|
||||
InsetText::moveLeftIntern(BufferView * bv, bool front,
|
||||
bool activate_inset, bool selecting)
|
||||
{
|
||||
@ -1227,7 +1227,7 @@ InsetText::moveLeftIntern(BufferView * bv, bool front,
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetText::moveUp(BufferView * bv)
|
||||
dispatch_result InsetText::moveUp(BufferView * bv)
|
||||
{
|
||||
if (crow() == text_.firstRow())
|
||||
return FINISHED_UP;
|
||||
@ -1237,7 +1237,7 @@ InsetOld::RESULT InsetText::moveUp(BufferView * bv)
|
||||
}
|
||||
|
||||
|
||||
InsetOld::RESULT InsetText::moveDown(BufferView * bv)
|
||||
dispatch_result InsetText::moveDown(BufferView * bv)
|
||||
{
|
||||
if (crow() == text_.lastRow())
|
||||
return FINISHED_DOWN;
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
bool unlockInsetInInset(BufferView *,
|
||||
UpdatableInset *, bool lr = false);
|
||||
///
|
||||
RESULT localDispatch(FuncRequest const &);
|
||||
dispatch_result localDispatch(FuncRequest const &);
|
||||
///
|
||||
int latex(Buffer const &, std::ostream &,
|
||||
LatexRunParams const &) const;
|
||||
@ -218,22 +218,22 @@ private:
|
||||
void lfunMouseMotion(FuncRequest const &);
|
||||
|
||||
///
|
||||
RESULT moveRight(BufferView *);
|
||||
dispatch_result moveRight(BufferView *);
|
||||
///
|
||||
RESULT moveLeft(BufferView *);
|
||||
dispatch_result moveLeft(BufferView *);
|
||||
///
|
||||
RESULT moveRightIntern(BufferView *, bool front,
|
||||
dispatch_result moveRightIntern(BufferView *, bool front,
|
||||
bool activate_inset = true,
|
||||
bool selecting = false);
|
||||
///
|
||||
RESULT moveLeftIntern(BufferView *, bool front,
|
||||
dispatch_result moveLeftIntern(BufferView *, bool front,
|
||||
bool activate_inset = true,
|
||||
bool selecting = false);
|
||||
|
||||
///
|
||||
RESULT moveUp(BufferView *);
|
||||
dispatch_result moveUp(BufferView *);
|
||||
///
|
||||
RESULT moveDown(BufferView *);
|
||||
dispatch_result moveDown(BufferView *);
|
||||
///
|
||||
void setCharFont(Buffer const &, int pos, LyXFont const & font);
|
||||
///
|
||||
|
@ -108,7 +108,7 @@ void UpdatableInset::scroll(BufferView * bv, int offset) const
|
||||
|
||||
|
||||
/// An updatable inset could handle lyx editing commands
|
||||
InsetOld::RESULT UpdatableInset::localDispatch(FuncRequest const & ev)
|
||||
dispatch_result UpdatableInset::localDispatch(FuncRequest const & ev)
|
||||
{
|
||||
if (ev.action == LFUN_MOUSE_RELEASE)
|
||||
return (editable() == IS_EDITABLE) ? DISPATCHED : UNDISPATCHED;
|
||||
|
@ -82,7 +82,7 @@ public:
|
||||
bool /*lr*/ = false)
|
||||
{ return false; }
|
||||
/// An updatable inset could handle lyx editing commands
|
||||
virtual RESULT localDispatch(FuncRequest const & cmd);
|
||||
virtual dispatch_result localDispatch(FuncRequest const & cmd);
|
||||
// We need this method to not clobber the real method in Inset
|
||||
int scroll(bool recursive = true) const
|
||||
{ return InsetOld::scroll(recursive); }
|
||||
|
@ -889,7 +889,7 @@ void LyXFunc::dispatch(FuncRequest const & func, bool verbose)
|
||||
|
||||
|
||||
if (view()->available() && view()->theLockingInset()) {
|
||||
InsetOld::RESULT result;
|
||||
dispatch_result result;
|
||||
if (action > 1 || (action == LFUN_UNKNOWN_ACTION &&
|
||||
!keyseq.deleted()))
|
||||
{
|
||||
|
@ -153,7 +153,7 @@ public:
|
||||
void metrics(MetricsInfo & mi, Dimension & dim);
|
||||
|
||||
///
|
||||
InsetOld::RESULT dispatch(FuncRequest const & cmd);
|
||||
dispatch_result dispatch(FuncRequest const & cmd);
|
||||
|
||||
BufferView * bv();
|
||||
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-10-13 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* formulabase.C (localDispatch): DISPATCH -> dispatch_result
|
||||
|
||||
2003-10-12 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formulabase.[Ch] (cache): added.
|
||||
@ -31,7 +35,7 @@
|
||||
|
||||
* formula.[Ch]: mods to PreviewImpl due to the changes to
|
||||
PreviewedInset.
|
||||
|
||||
|
||||
2003-10-09 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* formula.C (metrics, draw): pass a buffer arg to PreviewedInset's
|
||||
@ -97,7 +101,7 @@
|
||||
add #include "LColor.h".
|
||||
* math_data.C, math_scriptinset.C: add #include <boost/assert.hpp>
|
||||
* math_exintinset.C: add #include <boost/scoped_ptr.hpp>
|
||||
|
||||
|
||||
2003-09-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* command_inset.C
|
||||
|
@ -379,7 +379,7 @@ dispatch_result InsetFormulaBase::localDispatch(FuncRequest const & cmd)
|
||||
return UNDISPATCHED;
|
||||
|
||||
string argument = cmd.argument;
|
||||
RESULT result = DISPATCHED;
|
||||
dispatch_result result = DISPATCHED;
|
||||
bool sel = false;
|
||||
bool was_macro = mathcursor->inMacroMode();
|
||||
bool was_selection = mathcursor->selection();
|
||||
|
@ -389,9 +389,10 @@ void doInsertInset(LyXText * lt, FuncRequest const & cmd,
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
} // anon namespace
|
||||
|
||||
InsetOld::RESULT LyXText::dispatch(FuncRequest const & cmd)
|
||||
|
||||
dispatch_result LyXText::dispatch(FuncRequest const & cmd)
|
||||
{
|
||||
lyxerr[Debug::ACTION] << "LyXText::dispatch: action[" << cmd.action
|
||||
<<"] arg[" << cmd.argument << ']' << "xy[" <<
|
||||
|
Loading…
Reference in New Issue
Block a user