- ///
- bool IsMultiColumn(int cell) const;
- ///
- void SetMultiColumn(int cell, int number);
- ///
- int UnsetMultiColumn(int cell); // returns number of new cells
- ///
- bool IsPartOfMultiColumn(int row, int column) const;
- ///
- int row_of_cell(int cell) const;
- ///
- int column_of_cell(int cell) const;
- ///
- void SetLongTabular(int what);
- ///
- bool IsLongTabular() const;
- ///
- void SetRotateTabular(int what);
- ///
- bool GetRotateTabular() const;
- ///
- void SetRotateCell(int cell, int what);
- ///
- bool GetRotateCell(int cell) const;
- ///
- bool NeedRotating() const;
- ///
- bool IsLastCell(int cell) const;
- ///
- int GetCellAbove(int cell) const;
- ///
- int GetCellNumber(int row, int column) const;
- ///
- void SetLinebreaks(int cell, bool what);
- ///
- bool GetLinebreaks(int cell) const;
- ///
- /// Long Tabular Options
- ///
- void SetLTHead(int cell, bool first);
- ///
- bool GetRowOfLTHead(int cell) const;
- ///
- bool GetRowOfLTFirstHead(int cell) const;
- ///
- void SetLTFoot(int cell, bool last);
- ///
- bool GetRowOfLTFoot(int cell) const;
- ///
- bool GetRowOfLTLastFoot(int cell) const;
- ///
- void SetLTNewPage(int cell, bool what);
- ///
- bool GetLTNewPage(int cell) const;
- ///
- InsetText * GetCellInset(int cell) const;
- ///
- int rows() const { return rows_; }
- ///
- int columns() const { return columns_;}
- ///
- InsetTabular * owner() const { return owner_; }
+ ///
+ int getAdditionalHeight(row_type row) const;
+ ///
+ int getAdditionalWidth(idx_type cell) const;
+
+ /* returns the maximum over all rows */
+ ///
+ int getWidthOfColumn(idx_type cell) const;
+ ///
+ int getWidthOfTabular() const;
+ ///
+ int getAscentOfRow(row_type row) const;
+ ///
+ int getDescentOfRow(row_type row) const;
+ ///
+ int getHeightOfTabular() const;
+ ///
+ void setAscentOfRow(row_type row, int height);
+ ///
+ void setDescentOfRow(row_type row, int height);
+ ///
+ void setWidthOfCell(idx_type cell, int new_width);
+ ///
+ void setAllLines(idx_type cell, bool line);
+ ///
+ void setTopLine(idx_type cell, bool line, bool onlycolumn = false);
+ ///
+ void setBottomLine(idx_type cell, bool line, bool onlycolumn = false);
+ ///
+ void setLeftLine(idx_type cell, bool line, bool onlycolumn = false);
+ ///
+ void setRightLine(idx_type cell, bool line, bool onlycolumn = false);
+ ///
+ void setAlignment(idx_type cell, LyXAlignment align,
+ bool onlycolumn = false);
+ ///
+ void setVAlignment(idx_type cell, VAlignment align,
+ bool onlycolumn = false);
+ ///
+ void setColumnPWidth(LCursor &, idx_type, LyXLength const &);
+ ///
+ bool setMColumnPWidth(LCursor &, idx_type, LyXLength const &);
+ ///
+ void setAlignSpecial(idx_type cell, std::string const & special,
+ Feature what);
+ ///
+ LyXAlignment getAlignment(idx_type cell,
+ bool onlycolumn = false) const;
+ ///
+ VAlignment getVAlignment(idx_type cell,
+ bool onlycolumn = false) const;
+ ///
+ LyXLength const getPWidth(idx_type cell) const;
+ ///
+ LyXLength const getColumnPWidth(idx_type cell) const;
+ ///
+ LyXLength const getMColumnPWidth(idx_type cell) const;
+ ///
+ std::string const getAlignSpecial(idx_type cell, int what) const;
+ ///
+ int getWidthOfCell(idx_type cell) const;
+ ///
+ int getBeginningOfTextInCell(idx_type cell) const;
+ ///
+ void appendRow(BufferParams const &, idx_type cell);
+ ///
+ void deleteRow(row_type row);
+ ///
+ void appendColumn(BufferParams const &, idx_type cell);
+ ///
+ void deleteColumn(col_type column);
+ ///
+ bool isFirstCellInRow(idx_type cell) const;
+ ///
+ idx_type getFirstCellInRow(row_type row) const;
+ ///
+ bool isLastCellInRow(idx_type cell) const;
+ ///
+ idx_type getLastCellInRow(row_type row) const;
+ ///
+ idx_type getNumberOfCells() const;
+ ///
+ idx_type numberOfCellsInRow(idx_type cell) const;
+ ///
+ void write(Buffer const &, std::ostream &) const;
+ ///
+ void read(Buffer const &, LyXLex &);
+ ///
+ int latex(Buffer const &, std::ostream &,
+ OutputParams const &) const;
+ //
+ int linuxdoc(Buffer const & buf, std::ostream & os,
+ OutputParams const &) const;
+ ///
+ int docbook(Buffer const & buf, std::ostream & os,
+ OutputParams const &) const;
+ ///
+ int plaintext(Buffer const &, std::ostream &,
+ OutputParams const & runparams,
+ int const depth,
+ bool onlydata, unsigned char delim) const;
+ ///
+ bool isMultiColumn(idx_type cell) const;
+ ///
+ bool isMultiColumnReal(idx_type cell) const;
+ ///
+ void setMultiColumn(Buffer *, idx_type cell, idx_type number);
+ ///
+ idx_type unsetMultiColumn(idx_type cell); // returns number of new cells
+ ///
+ bool isPartOfMultiColumn(row_type row, col_type column) const;
+ ///
+ row_type row_of_cell(idx_type cell) const;
+ ///
+ col_type column_of_cell(idx_type cell) const;
+ ///
+ col_type right_column_of_cell(idx_type cell) const;
+ ///
+ void setLongTabular(bool);
+ ///
+ bool isLongTabular() const;
+ ///
+ void setRotateTabular(bool);
+ ///
+ bool getRotateTabular() const;
+ ///
+ void setRotateCell(idx_type cell, bool);
+ ///
+ bool getRotateCell(idx_type cell) const;
+ ///
+ bool needRotating() const;
+ ///
+ bool isLastCell(idx_type cell) const;
+ ///
+ idx_type getCellAbove(idx_type cell) const;
+ ///
+ idx_type getCellBelow(idx_type cell) const;
+ ///
+ idx_type getLastCellAbove(idx_type cell) const;
+ ///
+ idx_type getLastCellBelow(idx_type cell) const;
+ ///
+ idx_type getCellNumber(row_type row, col_type column) const;
+ ///
+ void setUsebox(idx_type cell, BoxType);
+ ///
+ BoxType getUsebox(idx_type cell) const;
+ //
+ // Long Tabular Options support functions
+ ///
+ bool checkLTType(row_type row, ltType const &) const;
+ ///
+ void setLTHead(row_type row, bool flag, ltType const &, bool first);
+ ///
+ bool getRowOfLTHead(row_type row, ltType &) const;
+ ///
+ bool getRowOfLTFirstHead(row_type row, ltType &) const;
+ ///
+ void setLTFoot(row_type row, bool flag, ltType const &, bool last);
+ ///
+ bool getRowOfLTFoot(row_type row, ltType &) const;
+ ///
+ bool getRowOfLTLastFoot(row_type row, ltType &) const;
+ ///
+ void setLTNewPage(row_type row, bool what);
+ ///
+ bool getLTNewPage(row_type row) const;
+ ///
+ bool haveLTHead() const;
+ ///
+ bool haveLTFirstHead() const;
+ ///
+ bool haveLTFoot() const;
+ ///
+ bool haveLTLastFoot() const;
+ ///
+ // end longtable support
+ ///
+ boost::shared_ptr<InsetText> getCellInset(idx_type cell) const;
+ ///
+ boost::shared_ptr<InsetText> getCellInset(row_type row,
+ col_type column) const;
+ ///
+ void setCellInset(row_type row, col_type column,
+ boost::shared_ptr<InsetText>) const;
+ /// Search for \param inset in the tabular, with the
+ ///
+ idx_type getCellFromInset(InsetBase const * inset) const;
+ ///
+ row_type rows() const { return rows_; }
+ ///
+ col_type columns() const { return columns_;}
+ ///
+ void validate(LaTeXFeatures &) const;
+ ///
+//private:
+ ///
+ class cellstruct {
+ public:
+ ///
+ cellstruct(BufferParams const &);
+ ///
+ cellstruct(cellstruct const &);
+ ///
+ cellstruct & operator=(cellstruct);
+ ///
+ void swap(cellstruct & rhs);
+ ///
+ idx_type cellno;
+ ///
+ int width_of_cell;
+ ///
+ int multicolumn;
+ ///
+ LyXAlignment alignment;
+ ///
+ VAlignment valignment;
+ ///
+ bool top_line;
+ ///
+ bool bottom_line;
+ ///
+ bool left_line;
+ ///
+ bool right_line;
+ ///
+ BoxType usebox;
+ ///
+ bool rotate;
+ ///
+ std::string align_special;
+ ///
+ LyXLength p_width; // this is only set for multicolumn!!!
+ ///
+ boost::shared_ptr<InsetText> inset;
+ };
+ cellstruct & cellinfo_of_cell(idx_type cell) const;
+ ///
+ typedef std::vector<cellstruct> cell_vector;
+ ///
+ typedef std::vector<cell_vector> cell_vvector;