]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
Fix left/right border UI when toggling formal
[lyx.git] / src / insets / InsetTabular.h
index 565b97332d75dc7e32056f9ce20efe5bbdc1b26e..ddb02763fcb2a5e409156c77a36dba56eac5170d 100644 (file)
@@ -71,7 +71,7 @@ public:
        docstring xhtml(XHTMLStream &, OutputParams const &) const;
        ///
        void addToToc(DocIterator const & di, bool output_active,
-                                 UpdateType utype) const;
+                                 UpdateType utype, TocBackend & backend) const;
 private:
        /// unimplemented
        InsetTableCell();
@@ -297,6 +297,8 @@ public:
                ///
                SET_TABULAR_WIDTH,
                ///
+               SET_INNER_LINES,
+               ///
                LAST_ACTION
        };
        ///
@@ -339,7 +341,9 @@ public:
                ///
                BOX_PARBOX = 1,
                ///
-               BOX_MINIPAGE = 2
+               BOX_MINIPAGE = 2,
+               ///
+               BOX_VARWIDTH = 3
        };
 
        enum CaptionType {
@@ -398,9 +402,13 @@ public:
        /// Returns true if there is a topline, returns false if not
        bool bottomLine(idx_type cell) const;
        /// Returns true if there is a topline, returns false if not
-       bool leftLine(idx_type cell) const;
+       /// If \p ignore_bt is true, we return the state as if booktabs was
+       /// not used
+       bool leftLine(idx_type cell, bool const ignore_bt = false) const;
        /// Returns true if there is a topline, returns false if not
-       bool rightLine(idx_type cell) const;
+       /// If \p ignore_bt is true, we return the state as if booktabs was
+       /// not used
+       bool rightLine(idx_type cell, bool const ignore_bt = false) const;
 
        /// return space occupied by the second horizontal line and
        /// interline space above row \p row in pixels
@@ -470,6 +478,9 @@ public:
        ///
        VAlignment getVAlignment(idx_type cell,
                                 bool onlycolumn = false) const;
+       /// The vertical offset of the table due to the vertical
+       /// alignment with respect to the baseline.
+       int offsetVAlignment() const;
        ///
        Length const getPWidth(idx_type cell) const;
        ///
@@ -753,7 +764,7 @@ public:
        ///
        column_vector column_info;
        ///
-       mutable cell_vvector cell_info;
+       cell_vvector cell_info;
        ///
        Length tabular_width;
        ///
@@ -795,20 +806,23 @@ public:
        ///
        // helper function for Latex
        ///
-       void TeXTopHLine(otexstream &, row_type row, std::string const & lang) const;
+       void TeXTopHLine(otexstream &, row_type row, std::string const & lang,
+                        std::list<col_type>) const;
        ///
-       void TeXBottomHLine(otexstream &, row_type row, std::string const & lang) const;
+       void TeXBottomHLine(otexstream &, row_type row, std::string const & lang,
+                           std::list<col_type>) const;
        ///
-       void TeXCellPreamble(otexstream &, idx_type cell, bool & ismulticol, bool & ismultirow) const;
+       void TeXCellPreamble(otexstream &, idx_type cell, bool & ismulticol, bool & ismultirow,
+                            bool const bidi) const;
        ///
        void TeXCellPostamble(otexstream &, idx_type cell, bool ismulticol, bool ismultirow) const;
        ///
-       void TeXLongtableHeaderFooter(otexstream &, OutputParams const &) const;
+       void TeXLongtableHeaderFooter(otexstream &, OutputParams const &, std::list<col_type>) const;
        ///
        bool isValidRow(row_type const row) const;
        ///
        void TeXRow(otexstream &, row_type const row,
-                   OutputParams const &) const;
+                   OutputParams const &, std::list<col_type>) const;
        ///
        // helper functions for plain text
        ///
@@ -956,7 +970,7 @@ public:
        void updateBuffer(ParIterator const &, UpdateType);
        ///
        void addToToc(DocIterator const & di, bool output_active,
-                                 UpdateType utype) const;
+                                 UpdateType utype, TocBackend & backend) const;
 
        ///
        bool completionSupported(Cursor const &) const;
@@ -978,6 +992,9 @@ public:
        void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
        ///
        virtual bool usePlainLayout() const { return true; }
+       ///
+       docstring layoutName() const { return from_ascii("Tabular"); }
+
 
        ///
        InsetTabular * asInsetTabular() { return this; }
@@ -1051,15 +1068,11 @@ 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.
+       /// test the rotation state of the given cell range.
        bool oneCellHasRotationState(bool rotated,
                                row_type row_start, row_type row_end,
                                col_type col_start, col_type col_end) const;
-       ///
-       mutable idx_type first_visible_cell_;
-       /// The vertical offset of the table due to the vertical
-       /// alignment with respect to the baseline.
-       mutable int offset_valign_;
+
        /// true when selecting rows with the mouse
        bool rowselect_;
        /// true when selecting columns with the mouse