]> git.lyx.org Git - features.git/commitdiff
modify Inset::EntryDirectionType to follow style used in FontEnums.h for enums.
authorAbdelrazak Younes <younes@lyx.org>
Mon, 11 Feb 2008 08:20:13 +0000 (08:20 +0000)
committerAbdelrazak Younes <younes@lyx.org>
Mon, 11 Feb 2008 08:20:13 +0000 (08:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@22936 a592a061-630c-0410-9148-cb99ea01b6c8

25 files changed:
src/Text2.cpp
src/insets/Inset.cpp
src/insets/Inset.h
src/insets/InsetCaption.cpp
src/insets/InsetCaption.h
src/insets/InsetCollapsable.cpp
src/insets/InsetCollapsable.h
src/insets/InsetCommand.cpp
src/insets/InsetCommand.h
src/insets/InsetExternal.cpp
src/insets/InsetExternal.h
src/insets/InsetGraphics.cpp
src/insets/InsetGraphics.h
src/insets/InsetTabular.cpp
src/insets/InsetTabular.h
src/insets/InsetText.cpp
src/insets/InsetText.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h
src/mathed/InsetMathNest.cpp
src/mathed/InsetMathNest.h
src/mathed/MathMacro.cpp
src/mathed/MathMacro.h
src/mathed/MathMacroTemplate.cpp
src/mathed/MathMacroTemplate.h

index d18a993132a377d27c71b7a008071bafaf351cc2..206205ff8b2dcf93318afb0672db61b6d6a89fb5 100644 (file)
@@ -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;
 }
 
index 454cce474db47d20f92232344f29b8b5aaf9b5c5..0cfb10cdd3e074dd2057529624b56f83a2b2a4e6 100644 (file)
@@ -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");
 }
index a87be006a05234317f9b59e27ece0bd268b913f4..4b03465e2eaf9ad9c4e3d1642e05d4629f9b275e 100644 (file)
@@ -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);
 
index ecdc02bba17f012121b87654063663e60141ddd7..5df5e27359c30e16b5e92cdce759532c6e5cba0c 100644 (file)
@@ -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);
index fed32649e85806a1cc460ef542634e20a0fef872..b2fbac5395f48b8060fbc564466331783eac4b79 100644 (file)
@@ -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);
        ///
index 567d712f13e22e5d167aa8fb35cd7d5c25d15a9a..c4d16de4ecfb6d241019dd1e6d52116b20f7dcec 100644 (file)
@@ -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);
index cd53a9f491bc2454b38abb83bd5b4fe160a99704..26e29f7749a78c5cd88f77cfc9d580fe96cf90ce 100644 (file)
@@ -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);
        ///
index 6593171920e953024e378accd9fecc53d2c2344d..6ade744ed93c431da1d5f1a4cd1edb9eeec4b7f8 100644 (file)
@@ -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());
index c84e825dc246e7c3579666ca00192ce9b5cab256..7173417ec5dc1e8059511394cb55aa879e01b2ec 100644 (file)
@@ -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_; }
        ///
index db8c2c1e21e87abc6fdf91e9f14538d21c589fe1..ffdc218360727ebafc4cd2a757b66ab33b892021 100644 (file)
@@ -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());
 }
index 06ee643b42af8e3417188b47b09ac133070603e8..d281a0651941be49caf2248adcf383f4d9882c2f 100644 (file)
@@ -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
index 151b76478ba8128907f346c6bbd99fa8ba4bdf31..f19dd90f1af3e11192f43080b7b2e4c568ece98e 100644 (file)
@@ -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());
 }
index b9c57ab1f5354f0b8c59aa44295540a59a73e73a..4f216dccc6db9bb08e83e37ede50be6fe4201af2 100644 (file)
@@ -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;
        ///
index 837c0c8cdf65f41f80587ebda6ddd72406adc421..0c8ef364e79070cd2accacc483b81dcdc2d7e0c7 100644 (file)
@@ -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
index c38fbc350b66ee32dc1e0ad1b5e7c7251e0e632b..677cf49e16e3bc534ada5ae76c4ddf605550538b 100644 (file)
@@ -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?
index 6903ac04ccb1cd00543fc690f54613d0c06211d7..3a8153a96362d5e4b6c54756a3eba4a2a55ff8db 100644 (file)
@@ -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();
        }
 
index 9e7aa482e4d99262bb83f1336ac344c735219039..fcb776296dd0510f2ad7fd86700795bb1e108fc7 100644 (file)
@@ -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);
 
index c8bce467a14c5699bd2b536bcf789339a69001b8..976b4865cf2f28a88186fded7b75e0f03fa18697 100644 (file)
@@ -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
index f00b6f12accd245712e4c06e217e743aa1324db3..7e67c6e52f1cb4b1144047f2fd7912d656caee04 100644 (file)
@@ -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);
        ///
index d8f6cd1dbb7cf3ac9a785825288802eb9d4b0aba..d63f03f34138d23976bff9b5bd0cfa49e8c2ae9c 100644 (file)
@@ -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();
index a3419fa73f62d77cdf6fdbc9a649cdb3cb9b3430..011586486499e2e555fcba0d19fe87b2d027ed9a 100644 (file)
@@ -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);
 
index b6dd19dac41579df7cbb232141451bd3f0cc4f9e..25902867ec9d7bbc78e426dc2d40d7062f8c736c 100644 (file)
@@ -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);
index 897798115e2cbd841cbbc21ee0998dba28fcaeb8..a4928f1cd58f7f4ded1d5e47ac319107411c1dc4 100644 (file)
@@ -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);
 
index dbd2918904b65bc0cf8bb732622fc1107187e3ba..7afa717f39b7fd1319da87d9ff5cd03726462618 100644 (file)
@@ -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);
index edf6cf6c0d1baa3ae4072f02ecaeefc4ecf9dbd8..6f2fa1d3b7e03b7696760bdf4f3390a82fb948a1 100644 (file)
@@ -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);
        ///