+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
+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.
* 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>
HIGHLY_EDITABLE
};
- ///
- typedef dispatch_result RESULT;
-
///
InsetOld();
///
}
-InsetOld::RESULT InsetCollapsable::localDispatch(FuncRequest const & cmd)
+dispatch_result InsetCollapsable::localDispatch(FuncRequest const & cmd)
{
//lyxerr << "InsetCollapsable::localDispatch: "
// << cmd.action << " '" << cmd.argument << "'\n";
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;
///
int insetInInsetY() const;
///
- RESULT localDispatch(FuncRequest const &);
+ dispatch_result localDispatch(FuncRequest const &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) 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()) {
///
void validate(LaTeXFeatures &) const {}
///
- RESULT localDispatch(FuncRequest const &);
+ dispatch_result localDispatch(FuncRequest const &);
///
bool checkInsertChar(LyXFont &);
///
}
-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) {
}
-InsetOld::RESULT InsetTabular::moveRight(BufferView * bv, bool lock)
+dispatch_result InsetTabular::moveRight(BufferView * bv, bool lock)
{
if (lock && !old_locking_inset) {
if (activateCellInset(bv))
}
-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)
}
-InsetOld::RESULT InsetTabular::moveUp(BufferView * bv, bool lock)
+dispatch_result InsetTabular::moveUp(BufferView * bv, bool lock)
{
int const ocell = actcell;
actcell = tabular.getCellAbove(actcell);
}
-InsetOld::RESULT InsetTabular::moveDown(BufferView * bv, bool lock)
+dispatch_result InsetTabular::moveDown(BufferView * bv, bool lock)
{
int const ocell = actcell;
actcell = tabular.getCellBelow(actcell);
///
bool display() const { return tabular.isLongTabular(); }
///
- RESULT localDispatch(FuncRequest const &);
+ dispatch_result localDispatch(FuncRequest const &);
///
int latex(Buffer const &, std::ostream &,
LatexRunParams const &) const;
///
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);
///
}
-InsetOld::RESULT InsetText::localDispatch(FuncRequest const & cmd)
+dispatch_result InsetText::localDispatch(FuncRequest const & cmd)
{
BufferView * bv = cmd.view();
setViewCache(bv);
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;
}
-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);
}
-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);
}
-InsetOld::RESULT
+dispatch_result
InsetText::moveRightIntern(BufferView * bv, bool front,
bool activate_inset, bool selecting)
{
}
-InsetOld::RESULT
+dispatch_result
InsetText::moveLeftIntern(BufferView * bv, bool front,
bool activate_inset, bool selecting)
{
}
-InsetOld::RESULT InsetText::moveUp(BufferView * bv)
+dispatch_result InsetText::moveUp(BufferView * bv)
{
if (crow() == text_.firstRow())
return FINISHED_UP;
}
-InsetOld::RESULT InsetText::moveDown(BufferView * bv)
+dispatch_result InsetText::moveDown(BufferView * bv)
{
if (crow() == text_.lastRow())
return FINISHED_DOWN;
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;
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);
///
/// 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;
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); }
if (view()->available() && view()->theLockingInset()) {
- InsetOld::RESULT result;
+ dispatch_result result;
if (action > 1 || (action == LFUN_UNKNOWN_ACTION &&
!keyseq.deleted()))
{
void metrics(MetricsInfo & mi, Dimension & dim);
///
- InsetOld::RESULT dispatch(FuncRequest const & cmd);
+ dispatch_result dispatch(FuncRequest const & cmd);
BufferView * bv();
+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.
* 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
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
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();
}
}
-}
+} // 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[" <<