]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
Rewrite the label numbering code.
[lyx.git] / src / insets / InsetTabular.h
index 0ff8873cc503e0ee8d96833392f0cbfc6706b44f..16a469afd71142a7b91b5404de69cc904384761e 100644 (file)
@@ -66,7 +66,7 @@ class OutputParams;
 
 //
 // A helper struct for tables
-// 
+//
 class Tabular  {
 public:
        ///
@@ -144,10 +144,14 @@ public:
                ///
                UNSET_ROTATE_TABULAR,
                ///
+               TOGGLE_ROTATE_TABULAR,
+               ///
                SET_ROTATE_CELL,
                ///
                UNSET_ROTATE_CELL,
                ///
+               TOGGLE_ROTATE_CELL,
+               ///
                SET_USEBOX,
                ///
                SET_LTHEAD,
@@ -352,8 +356,8 @@ public:
        int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
        ///
        void plaintext(Buffer const &, odocstream &,
-                      OutputParams const & runparams, int const depth,
-                      bool onlydata, unsigned char delim) const;
+                      OutputParams const & runparams, int const depth,
+                      bool onlydata, unsigned char delim) const;
        ///
        bool isMultiColumn(idx_type cell) const;
        ///
@@ -640,16 +644,16 @@ public:
        // helper functions for plain text
        ///
        bool plaintextTopHLine(odocstream &, row_type row,
-                              std::vector<unsigned int> const &) const;
+                              std::vector<unsigned int> const &) const;
        ///
        bool plaintextBottomHLine(odocstream &, row_type row,
-                                 std::vector<unsigned int> const &) const;
+                                 std::vector<unsigned int> const &) const;
        ///
        void plaintextPrintCell(Buffer const &, odocstream &,
-                               OutputParams const &,
-                               idx_type cell, row_type row, col_type column,
-                               std::vector<unsigned int> const &,
-                               bool onlydata) const;
+                               OutputParams const &,
+                               idx_type cell, row_type row, col_type column,
+                               std::vector<unsigned int> const &,
+                               bool onlydata) const;
        /// auxiliary function for docbook
        int docbookRow(Buffer const & buf, odocstream & os, row_type,
                       OutputParams const &) const;
@@ -693,16 +697,16 @@ public:
            insets that may contain several paragraphs */
        bool noFontChange() const { return true; }
        ///
-       bool display() const { return tabular.isLongTabular(); }
+       DisplayType display() const { return tabular.isLongTabular() ? AlignCenter : Inline; }
        ///
        int latex(Buffer const &, odocstream &,
-                 OutputParams const &) const;
+                 OutputParams const &) const;
        ///
        int plaintext(Buffer const &, odocstream &,
-                     OutputParams const &) const;
+                     OutputParams const &) const;
        ///
        int docbook(Buffer const &, odocstream &,
-                   OutputParams const &) const;
+                   OutputParams const &) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
@@ -754,6 +758,8 @@ public:
        Inset * editXY(Cursor & cur, int x, int y);
        /// can we go further down on mouse click?
        bool descendable() const { return true; }
+       // Update the counters of this inset and of its contents
+       virtual void updateLabels(Buffer const &, ParIterator const &);
 
        //
        // Public structures and variables
@@ -810,15 +816,16 @@ private:
        /// return the cell nearest to x, y
        idx_type getNearestCell(BufferView &, int x, int y) const;
 
+       /// test the rotation state of the give cell range.
+       bool oneCellHasRotationState(bool rotated,
+                               row_type row_start, row_type row_end,
+                               col_type col_start, col_type col_end) const;
        ///
        Buffer const * buffer_;
        ///
        mutable idx_type first_visible_cell;
        ///
        mutable int scx_;
-       /// Ugly boolean used when this inset is dissolved and
-       /// InsetTabularMailer should not be used.
-       bool is_deleted_;
 };