]> git.lyx.org Git - features.git/blobdiff - src/tabular.h
Hopefully fixed the redo problems with insets!
[features.git] / src / tabular.h
index fc458deaaff240dffa40adec369ad33f0768f15d..d48e8eaa8446ce91876a9b2018aa99774e9021fc 100644 (file)
@@ -20,6 +20,7 @@
 #include <vector>
 
 #include "lyxlex.h"
+#include "layout.h"
 #include "LString.h"
 #include "insets/insettext.h"
 
@@ -108,12 +109,16 @@ public:
                SET_USEBOX,
                ///
                SET_LTHEAD,
+               UNSET_LTHEAD,
                ///
                SET_LTFIRSTHEAD,
+               UNSET_LTFIRSTHEAD,
                ///
                SET_LTFOOT,
+               UNSET_LTFOOT,
                ///
                SET_LTLASTFOOT,
+               UNSET_LTLASTFOOT,
                ///
                SET_LTNEWPAGE,
                ///
@@ -152,18 +157,31 @@ public:
                BOX_MINIPAGE = 2
        };
 
+       struct lttype {
+               // constructor
+               lttype();
+               // row of the header/footer type end definition
+               int row;
+               // double borders on top
+               bool topDL;
+               // double borders on bottom
+               bool bottomDL;
+       };
+       ///
+       typedef struct lttype ltType;
+       
        /* konstruktor */
        ///
        LyXTabular(InsetTabular *, int columns_arg, int rows_arg);
        ///
-       LyXTabular(InsetTabular *, LyXTabular const &);
+       LyXTabular(InsetTabular *, LyXTabular const &, bool same_id = false);
        ///
        explicit
        LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
        ///
        LyXTabular & operator=(LyXTabular const &);
        ///
-       LyXTabular * clone(InsetTabular *);
+       LyXTabular * clone(InsetTabular *, bool same_id = false);
        
        /// Returns true if there is a topline, returns false if not
        bool TopLine(int cell, bool onlycolumn = false) const;
@@ -344,17 +362,19 @@ public:
        //
        // Long Tabular Options
        ///
-       void SetLTHead(int cell, bool first);
+       bool checkLTType(int row, ltType const &) const;
+       ///
+       void SetLTHead(ltType const &, bool first);
        ///
-       bool GetRowOfLTHead(int cell, int & row) const;
+       bool GetRowOfLTHead(int row, ltType &) const;
        ///
-       bool GetRowOfLTFirstHead(int cell, int & row) const;
+       bool GetRowOfLTFirstHead(int row, ltType &) const;
        ///
-       void SetLTFoot(int cell, bool last);
+       void SetLTFoot(ltType const &, bool last);
        ///
-       bool GetRowOfLTFoot(int cell, int & row) const;
+       bool GetRowOfLTFoot(int row, ltType &) const;
        ///
-       bool GetRowOfLTLastFoot(int cell, int & row) const;
+       bool GetRowOfLTLastFoot(int row, ltType &) const;
        ///
        void SetLTNewPage(int cell, bool what);
        ///
@@ -485,13 +505,13 @@ private:
        ///
        bool is_long_tabular;
        /// row of endhead
-       int endhead;
+       ltType endhead;
        /// row of endfirsthead
-       int endfirsthead;
+       ltType endfirsthead;
        /// row of endfoot
-       int endfoot;
+       ltType endfoot;
        /// row of endlastfoot
-       int endlastfoot;
+       ltType endlastfoot;
        ///
        InsetTabular * owner_;