]> git.lyx.org Git - features.git/blobdiff - src/mathed/MathMacro.h
* simplify notifyCursorLeaves logic: We now only call it from strategic
[features.git] / src / mathed / MathMacro.h
index 276cbdb21f222fda328bce6d05e45f3524e537e8..8a10a45300f4267226effb6f807f47bc93f75f9e 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 left);
+       void edit(Cursor & cur, bool front, EntryDirection entry_from);
        ///
        Inset * editXY(Cursor & cur, int x, int y);
 
@@ -56,7 +56,7 @@ public:
        bool idxLast(Cursor &) const;
 
        ///
-       virtual bool notifyCursorLeaves(Cursor &);
+       virtual bool notifyCursorLeaves(Cursor const & old, Cursor & cur);
        
        /// Remove cell (starting from 0)
        void removeArgument(pos_type pos);
@@ -155,6 +155,8 @@ private:
        DisplayMode displayMode_;
        /// expanded macro with ArgumentProxies
        InsetMathSqrt expanded_;
+       /// macro definition with #1,#2,.. insets
+       MathData definition_;
        /// number of arguments that were really attached
        size_t attachedArgsNum_;
        /// optional argument attached? (only in DISPLAY_NORMAL mode)
@@ -173,6 +175,24 @@ private:
        std::string requires_;
        /// update macro representation
        bool needsUpdate_;
+
+public:
+       ///
+       bool completionSupported(Cursor const &) const;
+       ///
+       bool inlineCompletionSupported(Cursor const & cur) const;
+       ///
+       bool automaticInlineCompletion() const;
+       ///
+       bool automaticPopupCompletion() const;
+       ///
+       CompletionList const * completionList(Cursor const & cur) const;
+       ///
+       docstring completionPrefix(Cursor const & cur) const;
+       ///
+       bool insertCompletion(Cursor & cur, docstring const & s, bool finished);
+       ///
+       void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
 };
 
 } // namespace lyx