]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.h
tex2lyx: support for \item with opt arg in itemize environment
[lyx.git] / src / mathed / InsetMathHull.h
index af00eaf04e9ac9cb5ca55ca601995c5af6b95b89..fce431294c55b8ec82bae34ce422e7db237cb2fe 100644 (file)
@@ -30,6 +30,15 @@ class RenderPreview;
 /// This provides an interface between "LyX insets" and "LyX math insets"
 class InsetMathHull : public InsetMathGrid {
 public:
+       /// How a line is numbered
+       enum Numbered {
+               /// not numbered, LaTeX code \\nonumber if line differs from inset
+               NONUMBER,
+               /// numbered, LaTeX code \\number if line differs from inset
+               NUMBER,
+               /// not numbered, LaTeX code \\notag if line differs from inset
+               NOTAG
+       };
        ///
        InsetMathHull(Buffer * buf);
        ///
@@ -65,7 +74,9 @@ public:
        ///
        ColorCode backgroundColor(PainterInfo const &) const;
        ///
-       void numbered(row_type row, bool num);
+       void numbered(row_type row, bool num) { numbered(row, num ? NUMBER : NONUMBER); }
+       ///
+       void numbered(row_type row, Numbered num);
        ///
        bool numbered(row_type row) const;
        ///
@@ -140,7 +151,7 @@ public:
        /// 
        void toString(odocstream &) const;
        ///
-       void forToc(docstring &, size_t) const;
+       void forOutliner(docstring &, size_t) const;
 
        /// get notification when the cursor leaves this inset
        bool notifyCursorLeaves(Cursor const & old, Cursor & cur);
@@ -231,7 +242,7 @@ private:
        /// "none", "simple", "display", "eqnarray",...
        HullType type_;
        ///
-       std::vector<bool> numbered_;
+       std::vector<Numbered> numbered_;
        ///
        std::vector<docstring> numbers_;
        ///
@@ -271,7 +282,9 @@ protected:
        ///
        void handleFont2(Cursor & cur, docstring const & arg);
        ///
-       bool previewState(BufferView * bv) const;
+       bool previewState(BufferView const * const bv) const;
+       ///
+       bool previewTooSmall(Dimension const & dim) const;
 };