]> git.lyx.org Git - lyx.git/blobdiff - src/tabular.h
I reactivate the code to resize the InsetText on a resize event of the main
[lyx.git] / src / tabular.h
index cb4ffb41626edd18169fccbbd2bde126689461fb..7a03f8fd95262e1a059f00f83bc6d9a7dac6d0e8 100644 (file)
 #pragma interface
 #endif
 
-#include <iosfwd>
-#include <vector>
-
 #include "lyxlex.h"
 #include "layout.h"
 #include "LString.h"
-#include "insets/insettext.h"
 #include "lyxlength.h"
 
+#include "insets/insettext.h"
+
+#include <iosfwd>
+#include <vector>
+
 class InsetTabular;
 class LaTeXFeatures;
 class Buffer;
@@ -177,16 +178,19 @@ public:
        
        /* konstruktor */
        ///
-       LyXTabular(InsetTabular *, int columns_arg, int rows_arg);
+       LyXTabular(BufferParams const &,
+                  InsetTabular *, int columns_arg, int rows_arg);
        ///
-       LyXTabular(InsetTabular *, LyXTabular const &, bool same_id = false);
+       LyXTabular(BufferParams const &,
+                  InsetTabular *, LyXTabular const &, bool same_id = false);
        ///
        explicit
        LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex);
        ///
        LyXTabular & operator=(LyXTabular const &);
        ///
-       LyXTabular * clone(InsetTabular *, bool same_id = false);
+       LyXTabular * clone(BufferParams const &,
+                          InsetTabular *, bool same_id = false);
        
        /// Returns true if there is a topline, returns false if not
        bool TopLine(int cell, bool onlycolumn = false) const;
@@ -265,11 +269,11 @@ public:
        ///
        int GetBeginningOfTextInCell(int cell) const;
        ///
-       void AppendRow(int cell);
+       void AppendRow(BufferParams const &, int cell);
        ///
        void DeleteRow(int row);
        ///
-       void AppendColumn(int cell);
+       void AppendColumn(BufferParams const &, int cell);
        ///
        void DeleteColumn(int column);
        ///
@@ -289,7 +293,7 @@ public:
        ///
        void Read(Buffer const *, LyXLex &);
        ///
-       void OldFormatRead(LyXLex &, string const &);
+       void OldFormatRead(BufferParams const &, LyXLex &, string const &);
        ///
        int latex(Buffer const *, std::ostream &, bool, bool) const;
        ///
@@ -375,6 +379,9 @@ public:
        InsetText * GetCellInset(int cell) const;
        ///
        InsetText * GetCellInset(int row, int column) const;
+       /// Search for \param inset in the tabular, with the
+       /// additional hint that it could be at \param maybe_cell
+       int GetCellFromInset(Inset const * inset, int maybe_cell = -1) const;
        ///
        int rows() const { return rows_; }
        ///
@@ -394,7 +401,7 @@ private:
        ///
        struct cellstruct {
                ///
-               cellstruct();
+               cellstruct(BufferParams const &);
                ///
                int cellno;
                ///
@@ -521,7 +528,8 @@ private:
        InsetTabular * owner_;
 
        ///
-       void Init(int columns_arg, int rows_arg, LyXTabular const * lt = 0);
+       void Init(BufferParams const &,
+                 int columns_arg, int rows_arg, LyXTabular const * lt = 0);
        ///
        void Reinit(bool reset_widths = true);
        ///
@@ -529,7 +537,7 @@ private:
        /// Returns true if a complete update is necessary, otherwise false
        bool SetWidthOfMulticolCell(int cell, int new_width);
        ///
-       void recalculateMulticolCells(int cell, int new_width);
+       void recalculateMulticolumnsOfColumn(int column);
        /// Returns true if change
        bool calculate_width_of_column(int column);
        ///