]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
Revert http://www.lyx.org/trac/changeset/25553 and try better fix for bug
[lyx.git] / src / insets / InsetTabular.h
index 6a761271166dd08c3d92758d17fcb56789ece93c..84bec94c969f70af701f1e2ed98806fd00a81777 100644 (file)
@@ -160,6 +160,8 @@ public:
                ///
                SET_LTNEWPAGE,
                ///
+               TOGGLE_LTCAPTION,
+               ///
                SET_SPECIAL_COLUMN,
                ///
                SET_SPECIAL_MULTI,
@@ -406,6 +408,10 @@ public:
        ///
        bool getLTNewPage(row_type row) const;
        ///
+       idx_type setLTCaption(row_type row, bool what);
+       ///
+       bool ltCaption(row_type row) const;
+       ///
        bool haveLTHead() const;
        ///
        bool haveLTFirstHead() const;
@@ -425,16 +431,18 @@ public:
                          boost::shared_ptr<InsetTableCell>) const;
        /// Search for \param inset in the tabular, with the
        ///
-       idx_type cellFromInset(Inset const * inset) const;
-       ///
        void validate(LaTeXFeatures &) const;
-       ///
 //private:
+  // FIXME Now that cells have an InsetTableCell as their insets, rather
+  // than an InsetText, it'd be possible to reverse the relationship here,
+  // so that cell_vector was a vector<InsetTableCell> rather than a 
+  // vector<CellData>, and an InsetTableCell had a CellData as a member,
+  // or perhaps just had its members as members.
        ///
        class CellData {
        public:
                ///
-               CellData(Buffer const &, Tabular const &);
+               CellData(Buffer const &);
                ///
                CellData(CellData const &);
                ///
@@ -508,6 +516,8 @@ public:
                bool endlastfoot;
                /// row for a newpage
                bool newpage;
+               /// caption
+               bool caption;
        };
        ///
        typedef std::vector<RowData> row_vector;
@@ -621,16 +631,15 @@ class InsetTableCell : public InsetText
 {
 public:
        ///
-       InsetTableCell(Buffer const & buf,
-               Tabular::CellData const * cd, Tabular const * t);
+       InsetTableCell(Buffer const & buf);
        ///
        InsetCode lyxCode() const { return CELL_CODE; }
        ///
        Inset * clone() { return new InsetTableCell(*this); }
        ///
-       virtual bool useEmptyLayout() const { return true; }
+       virtual bool usePlainLayout() const { return true; }
        /// 
-       virtual bool forceEmptyLayout(idx_type = 0) const;
+       virtual bool forcePlainLayout(idx_type = 0) const;
        /// 
        virtual bool allowParagraphCustomization(idx_type = 0) const;
        ///
@@ -639,19 +648,14 @@ public:
        ///
        virtual bool neverIndent() { return true; }
        ///
-       void setCellData(Tabular::CellData const * cd) { cell_data_ = cd; }
-       ///
-       void setTabular(Tabular const * t) { table_ = t; }
+       void toggleFixedWidth(bool fw) { isFixedWidth = fw; }
 private:
        /// unimplemented
        InsetTableCell();
        /// unimplemented
        void operator=(InsetTableCell const &);
-
-       /// 
-       Tabular::CellData const * cell_data_;
-       /// 
-       Tabular const * table_;
+       ///
+       bool isFixedWidth;
 };
 
 
@@ -738,9 +742,9 @@ public:
        /// should all paragraphs be output with "Standard" layout?
        virtual bool allowParagraphCustomization(idx_type cell = 0) const;
        ///
-       virtual bool forceEmptyLayout(idx_type cell = 0) const;
+       virtual bool forcePlainLayout(idx_type cell = 0) const;
        ///
-       virtual bool useEmptyLayout() { return true; }
+       virtual bool usePlainLayout() { return true; }
        ///
        void addPreview(graphics::PreviewLoader &) const;