if (!inset || inset->editable() != Inset::HIGHLY_EDITABLE)
return false;
inset->edit(cur, movingForward,
- movingLeft ? Inset::ENTER_FROM_RIGHT : Inset::ENTER_FROM_LEFT);
+ movingLeft ? Inset::ENTRY_DIRECTION_RIGHT : Inset::ENTRY_DIRECTION_LEFT);
return true;
}
}
-void Inset::edit(Cursor &, bool, EntryDirectionType)
+void Inset::edit(Cursor &, bool, EntryDirection)
{
LYXERR(Debug::INSETS, "edit left/right");
}
class Inset {
public:
///
- enum EntryDirectionType {
- IGNORE_ENTRY_DIRECTION,
- ENTER_FROM_RIGHT,
- ENTER_FROM_LEFT,
+ enum EntryDirection {
+ ENTRY_DIRECTION_IGNORE,
+ ENTRY_DIRECTION_RIGHT,
+ ENTRY_DIRECTION_LEFT,
};
///
typedef ptrdiff_t difference_type;
/// cursor enters
virtual void edit(Cursor & cur, bool front,
- EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
/// cursor enters
virtual Inset * editXY(Cursor & cur, int x, int y);
}
-void InsetCaption::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void InsetCaption::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
cur.push(*this);
InsetText::edit(cur, front, entry_from);
///
virtual void draw(PainterInfo & pi, int x, int y) const;
///
- virtual void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ virtual void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
virtual Inset * editXY(Cursor & cur, int x, int y);
///
}
-void InsetCollapsable::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void InsetCollapsable::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
//lyxerr << "InsetCollapsable: edit left/right" << endl;
cur.push(*this);
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
///
void edit(Cursor & cur, bool front,
- EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
Inset * editXY(Cursor & cur, int x, int y);
///
}
-void InsetCommand::edit(Cursor & cur, bool, EntryDirectionType)
+void InsetCommand::edit(Cursor & cur, bool, EntryDirection)
{
if (!mailer_name_.empty())
InsetCommandMailer(mailer_name_, *this).showDialog(&cur.bv());
}
///
void edit(Cursor & cur, bool front,
- EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
RenderButton & button() const { return button_; }
///
}
-void InsetExternal::edit(Cursor & cur, bool, EntryDirectionType)
+void InsetExternal::edit(Cursor & cur, bool, EntryDirection)
{
InsetExternalMailer(*this).showDialog(&cur.bv());
}
///
void addPreview(graphics::PreviewLoader &) const;
///
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
/// external file can be embedded
}
-void InsetGraphics::edit(Cursor & cur, bool, EntryDirectionType)
+void InsetGraphics::edit(Cursor & cur, bool, EntryDirection)
{
InsetGraphicsMailer(*this).showDialog(&cur.bv());
}
///
void draw(PainterInfo & pi, int x, int y) const;
///
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
void editGraphics(InsetGraphicsParams const &, Buffer const &) const;
///
}
-void InsetTabular::edit(Cursor & cur, bool, EntryDirectionType direction)
+void InsetTabular::edit(Cursor & cur, bool, EntryDirection direction)
{
//lyxerr << "InsetTabular::edit: " << this << endl;
cur.finishUndo();
cur.selection() = false;
cur.push(*this);
- if (direction == ENTER_FROM_LEFT) {
+ if (direction == ENTRY_DIRECTION_LEFT) {
if (isRightToLeft(cur))
cur.idx() = tabular.getLastCellInRow(0);
else
/// set the owning buffer
void buffer(Buffer const * buf);
/// lock cell with given index
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
Inset * editXY(Cursor & cur, int x, int y);
/// can we go further down on mouse click?
}
-void InsetText::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void InsetText::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
pit_type const pit = front ? 0 : paragraphs().size() - 1;
pos_type pos = front ? 0 : paragraphs().back().size();
// if visual information is not to be ignored, move to extreme right/left
- if (entry_from != IGNORE_ENTRY_DIRECTION) {
+ if (entry_from != ENTRY_DIRECTION_IGNORE) {
Cursor temp_cur = cur;
temp_cur.pit() = pit;
temp_cur.pos() = pos;
- temp_cur.posVisToRowExtremity(entry_from == ENTER_FROM_LEFT);
+ temp_cur.posVisToRowExtremity(entry_from == ENTRY_DIRECTION_LEFT);
pos = temp_cur.pos();
}
void addPreview(graphics::PreviewLoader &) const;
///
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
Inset * editXY(Cursor & cur, int x, int y);
}
-void InsetMathHull::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void InsetMathHull::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
cur.push(*this);
- bool enter_front = (entry_from == Inset::ENTER_FROM_LEFT ||
- (entry_from == Inset::IGNORE_ENTRY_DIRECTION && front));
+ bool enter_front = (entry_from == Inset::ENTRY_DIRECTION_LEFT ||
+ (entry_from == Inset::ENTRY_DIRECTION_IGNORE && front));
enter_front ? idxFirst(cur) : idxLast(cur);
// The inset formula dimension is not necessarily the same as the
// one of the instant preview image, so we have to indicate to the
EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
void edit(Cursor & cur, bool front,
- EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
Inset * editXY(Cursor & cur, int x, int y);
///
}
-void InsetMathNest::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void InsetMathNest::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
cur.push(*this);
- bool enter_front = (entry_from == Inset::ENTER_FROM_RIGHT ||
- (entry_from == Inset::IGNORE_ENTRY_DIRECTION && front));
+ bool enter_front = (entry_from == Inset::ENTRY_DIRECTION_RIGHT ||
+ (entry_from == Inset::ENTRY_DIRECTION_IGNORE && front));
cur.idx() = enter_front ? 0 : cur.lastidx();
cur.pos() = enter_front ? 0 : cur.lastpos();
cur.resetAnchor();
bool boundary, int & x, int & y) const;
///
void edit(Cursor & cur, bool front,
- EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
Inset * editXY(Cursor & cur, int x, int y);
}
-void MathMacro::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void MathMacro::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
cur.updateFlags(Update::Force);
InsetMathNest::edit(cur, front, entry_from);
void cursorPos(BufferView const & bv, CursorSlice const & sl,
bool boundary, int & x, int & y) const;
///
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
Inset * editXY(Cursor & cur, int x, int y);
}
-void MathMacroTemplate::edit(Cursor & cur, bool front, EntryDirectionType entry_from)
+void MathMacroTemplate::edit(Cursor & cur, bool front, EntryDirection entry_from)
{
updateLook();
cur.updateFlags(Update::Force);
///
EDITABLE editable() const { return HIGHLY_EDITABLE; }
///
- void edit(Cursor & cur, bool front, EntryDirectionType entry_from);
+ void edit(Cursor & cur, bool front, EntryDirection entry_from);
///
bool notifyCursorLeaves(Cursor & cur);
///