]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.h
More fixes to the autocollapsing of paragraphs.
[lyx.git] / src / tabular.h
index b434ab4a9538b067232f4ff15816ace4a53e33f6..0da578f2ec46c503af99acc9252f6b8e388eba45 100644 (file)
 #include <vector>
 
 #include "lyxlex.h"
+#include "layout.h"
 #include "LString.h"
 #include "insets/insettext.h"
+#include "lyxlength.h"
 
 class InsetTabular;
 class LaTeXFeatures;
@@ -173,14 +175,14 @@ public:
        ///
        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;
@@ -237,9 +239,9 @@ public:
        bool SetVAlignment(int cell, VAlignment align,
                           bool onlycolumn = false);
        ///
-       bool SetColumnPWidth(int cell, string const & width);
+       bool SetColumnPWidth(int cell, LyXLength const & width);
        ///
-       bool SetMColumnPWidth(int cell, string const & width);
+       bool SetMColumnPWidth(int cell, LyXLength const & width);
        ///
        bool SetAlignSpecial(int cell, string const & special, Feature what);
        ///
@@ -247,11 +249,11 @@ public:
        ///
        VAlignment GetVAlignment(int cell, bool onlycolumn = false) const;
        ///
-       string const GetPWidth(int cell) const;
+       LyXLength const GetPWidth(int cell) const;
        ///
-       string const GetColumnPWidth(int cell) const;
+       LyXLength const GetColumnPWidth(int cell) const;
        ///
-       string const GetMColumnPWidth(int cell) const;
+       LyXLength const GetMColumnPWidth(int cell) const;
        ///
        string const GetAlignSpecial(int cell, int what) const;
        ///
@@ -393,6 +395,9 @@ public:
        ///
        std::vector<string> const getLabelList() const;
        ///
+       /// recalculate the widths/heights only!
+       void reinit();
+       ///
        mutable int cur_cell;
 private:
        ///
@@ -424,7 +429,7 @@ private:
                ///
                string align_special;
                ///
-               string p_width; // this is only set for multicolumn!!!
+               LyXLength p_width; // this is only set for multicolumn!!!
                ///
                InsetText inset;
        };
@@ -466,7 +471,7 @@ private:
                ///
                int  width_of_column;
                ///
-               string p_width;
+               LyXLength p_width;
                ///
                string align_special;
        };
@@ -517,7 +522,7 @@ private:
        ///
        void Init(int columns_arg, int rows_arg, LyXTabular const * lt = 0);
        ///
-       void Reinit();
+       void Reinit(bool reset_widths = true);
        ///
        void set_row_column_number_info(bool oldformat = false);
        /// Returns true if a complete update is necessary, otherwise false