mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-10 20:04:46 +00:00
modify Inset::EntryDirectionType to follow style used in FontEnums.h for enums.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22936 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
4bc9498c7d
commit
8e831bb602
@ -608,7 +608,7 @@ bool Text::checkAndActivateInsetVisual(Cursor & cur, bool movingForward, bool mo
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -213,7 +213,7 @@ bool Inset::getStatus(Cursor &, FuncRequest const & cmd,
|
||||
}
|
||||
|
||||
|
||||
void Inset::edit(Cursor &, bool, EntryDirectionType)
|
||||
void Inset::edit(Cursor &, bool, EntryDirection)
|
||||
{
|
||||
LYXERR(Debug::INSETS, "edit left/right");
|
||||
}
|
||||
|
@ -66,10 +66,10 @@ namespace graphics { class PreviewLoader; }
|
||||
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;
|
||||
@ -126,7 +126,7 @@ public:
|
||||
|
||||
/// 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);
|
||||
|
||||
|
@ -162,7 +162,7 @@ void InsetCaption::draw(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
///
|
||||
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);
|
||||
///
|
||||
|
@ -466,7 +466,7 @@ docstring const InsetCollapsable::getNewLabel(docstring const & l) const
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
@ -163,7 +163,7 @@ protected:
|
||||
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);
|
||||
///
|
||||
|
@ -160,7 +160,7 @@ bool InsetCommand::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
|
||||
|
||||
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());
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
}
|
||||
///
|
||||
void edit(Cursor & cur, bool front,
|
||||
EntryDirectionType entry_from = IGNORE_ENTRY_DIRECTION);
|
||||
EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
|
||||
///
|
||||
RenderButton & button() const { return button_; }
|
||||
///
|
||||
|
@ -516,7 +516,7 @@ void InsetExternal::updateEmbeddedFile(Buffer const & buf,
|
||||
}
|
||||
|
||||
|
||||
void InsetExternal::edit(Cursor & cur, bool, EntryDirectionType)
|
||||
void InsetExternal::edit(Cursor & cur, bool, EntryDirection)
|
||||
{
|
||||
InsetExternalMailer(*this).showDialog(&cur.bv());
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ public:
|
||||
///
|
||||
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
|
||||
|
@ -239,7 +239,7 @@ void InsetGraphics::updateEmbeddedFile(Buffer const & buf,
|
||||
}
|
||||
|
||||
|
||||
void InsetGraphics::edit(Cursor & cur, bool, EntryDirectionType)
|
||||
void InsetGraphics::edit(Cursor & cur, bool, EntryDirection)
|
||||
{
|
||||
InsetGraphicsMailer(*this).showDialog(&cur.bv());
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
///
|
||||
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;
|
||||
///
|
||||
|
@ -3151,13 +3151,13 @@ docstring const InsetTabular::editMessage() 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
|
||||
|
@ -745,7 +745,7 @@ public:
|
||||
/// 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?
|
||||
|
@ -200,17 +200,17 @@ docstring const InsetText::editMessage() const
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
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);
|
||||
|
||||
|
@ -1314,11 +1314,11 @@ void InsetMathHull::handleFont2(Cursor & cur, docstring const & arg)
|
||||
}
|
||||
|
||||
|
||||
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
|
||||
|
@ -200,7 +200,7 @@ public:
|
||||
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);
|
||||
///
|
||||
|
@ -1208,11 +1208,11 @@ bool InsetMathNest::getStatus(Cursor & cur, FuncRequest const & cmd,
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
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);
|
||||
|
||||
|
@ -509,7 +509,7 @@ void MathMacro::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
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);
|
||||
|
||||
|
@ -533,7 +533,7 @@ void MathMacroTemplate::draw(PainterInfo & pi, int x, int y) const
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
///
|
||||
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);
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user