]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetTabular.h
Fix GRAPHICS_EDIT of InsetGraphics
[lyx.git] / src / insets / InsetTabular.h
index a54099ea9d34c400e69dbf9ed96b25a78427cfa2..f71a9e59854b487cfba6cd8fb88a48242418a350 100644 (file)
@@ -4,7 +4,6 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author Jürgen Vigna
  * \author Lars Gullik Bjønnes
  * \author Matthias Ettrich
  * \author André Pönitz
 
 namespace lyx {
 
-class FuncStatus;
-class Lexer;
-class BufferView;
 class Buffer;
 class BufferParams;
-class Paragraph;
+class BufferView;
 class CompletionList;
 class CursorSlice;
+class InsetTableCell;
+class FuncStatus;
+class Lexer;
+class Paragraph;
 
 namespace frontend { class Painter; }
 
@@ -65,8 +65,6 @@ class InsetTabular;
 class Cursor;
 class OutputParams;
 
-typedef InsetText InsetTableCell;
-
 //
 // A helper struct for tables
 //
@@ -405,10 +403,6 @@ public:
        ///
        idx_type getCellBelow(idx_type cell) const;
        ///
-       idx_type getLastCellAbove(idx_type cell) const;
-       ///
-       idx_type getLastCellBelow(idx_type cell) const;
-       ///
        idx_type cellIndex(row_type row, col_type column) const;
        ///
        void setUsebox(idx_type cell, BoxType);
@@ -467,7 +461,7 @@ public:
        class CellData {
        public:
                ///
-               CellData(Buffer const &);
+               CellData(Buffer const &, Tabular const &);
                ///
                CellData(CellData const &);
                ///
@@ -662,9 +656,45 @@ private:
 
        /// renumber cells after structural changes
        void fixCellNums();
-};
+}; // Tabular
 
 
+///
+class InsetTableCell : public InsetText {
+public:
+       ///
+       explicit InsetTableCell(Buffer const & buf,
+               Tabular::CellData const * cd, Tabular const * t);
+       ///
+       virtual InsetCode lyxCode() const { return CELL_CODE; }
+       ///
+       Inset * clone() { return new InsetTableCell(*this); }
+       ///
+       virtual bool useEmptyLayout() const { return true; }
+       /// 
+       virtual bool forceEmptyLayout(idx_type = 0) const;
+       /// 
+       virtual bool allowParagraphCustomization(idx_type = 0) const;
+       ///
+       bool getStatus(Cursor & cur, FuncRequest const & cmd,
+               FuncStatus & status) const;
+       ///
+       virtual bool neverIndent() { return true; }
+       ///
+       void setCellData(Tabular::CellData const * cd) { cell_data_ = cd; }
+       ///
+       void setTabular(Tabular const * t) { table_ = t; }
+private:
+       /// 
+       Tabular::CellData const * cell_data_;
+       /// 
+       Tabular const * table_;
+       /// unimplemented
+       InsetTableCell();
+       /// unimplemented
+       void operator=(InsetTableCell const &);
+};
+
 
 class InsetTabular : public Inset {
 public: