2000-04-19 14:42:19 +00:00
|
|
|
|
// -*- C++ -*-
|
2002-09-25 14:26:13 +00:00
|
|
|
|
/**
|
2007-04-25 01:24:38 +00:00
|
|
|
|
* \file InsetTabular.h
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* This file is part of LyX, the document processor.
|
|
|
|
|
* Licence details can be found in the file COPYING.
|
2002-03-21 17:09:55 +00:00
|
|
|
|
*
|
2002-09-25 14:26:13 +00:00
|
|
|
|
* \author J<EFBFBD>rgen Vigna
|
2007-04-26 12:54:21 +00:00
|
|
|
|
* \author Lars Gullik Bj<EFBFBD>nnes
|
|
|
|
|
* \author Matthias Ettrich
|
|
|
|
|
* \author Andr<EFBFBD> P<EFBFBD>nitz
|
|
|
|
|
* \author J<EFBFBD>rgen Vigna
|
2000-04-19 14:42:19 +00:00
|
|
|
|
*
|
2003-08-23 00:17:00 +00:00
|
|
|
|
* Full author contact details are available in file CREDITS.
|
2000-04-19 14:42:19 +00:00
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
2004-10-23 09:46:33 +00:00
|
|
|
|
// This is Juergen's rewrite of the tabular (table) support.
|
2000-04-19 14:42:19 +00:00
|
|
|
|
|
2004-02-16 11:58:51 +00:00
|
|
|
|
// Things to think of when designing the new tabular support:
|
2000-04-19 14:42:19 +00:00
|
|
|
|
// - color support (colortbl, color)
|
|
|
|
|
// - decimal alignment (dcloumn)
|
|
|
|
|
// - custom lines (hhline)
|
|
|
|
|
// - rotation
|
|
|
|
|
// - multicolumn
|
|
|
|
|
// - multirow
|
|
|
|
|
// - column styles
|
|
|
|
|
|
|
|
|
|
// This is what I have written about tabular support in the LyX3-Tasks file:
|
|
|
|
|
//
|
|
|
|
|
// o rewrite of table code. Should probably be written as some
|
2004-10-23 09:46:33 +00:00
|
|
|
|
// kind of an inset. [Done]
|
2000-04-19 14:42:19 +00:00
|
|
|
|
// o enhance longtable support
|
|
|
|
|
|
|
|
|
|
// Lgb
|
|
|
|
|
|
|
|
|
|
#ifndef INSETTABULAR_H
|
|
|
|
|
#define INSETTABULAR_H
|
|
|
|
|
|
2007-04-29 13:39:47 +00:00
|
|
|
|
#include "Inset.h"
|
2007-04-25 01:24:38 +00:00
|
|
|
|
#include "MailInset.h"
|
2007-04-28 12:58:49 +00:00
|
|
|
|
#include "Length.h"
|
2007-04-26 12:54:21 +00:00
|
|
|
|
#include "InsetText.h"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
|
|
|
|
|
|
#include <iosfwd>
|
|
|
|
|
#include <vector>
|
2006-10-21 00:16:43 +00:00
|
|
|
|
|
|
|
|
|
namespace lyx {
|
2004-01-08 18:30:14 +00:00
|
|
|
|
|
2003-09-04 01:18:42 +00:00
|
|
|
|
class FuncStatus;
|
2007-04-26 11:30:54 +00:00
|
|
|
|
class Lexer;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
class BufferView;
|
|
|
|
|
class Buffer;
|
2003-02-08 19:18:01 +00:00
|
|
|
|
class BufferParams;
|
2001-07-06 15:57:54 +00:00
|
|
|
|
class Paragraph;
|
2004-01-08 18:30:14 +00:00
|
|
|
|
class CursorSlice;
|
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
namespace frontend { class Painter; }
|
2000-04-19 14:42:19 +00:00
|
|
|
|
|
2007-04-26 12:54:21 +00:00
|
|
|
|
|
|
|
|
|
class InsetTabular;
|
2007-04-26 14:56:30 +00:00
|
|
|
|
class Cursor;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
class OutputParams;
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// A helper struct for tables
|
2007-05-28 22:27:45 +00:00
|
|
|
|
//
|
2007-04-26 12:54:21 +00:00
|
|
|
|
class Tabular {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
enum Feature {
|
|
|
|
|
///
|
|
|
|
|
APPEND_ROW = 0,
|
|
|
|
|
///
|
|
|
|
|
APPEND_COLUMN,
|
|
|
|
|
///
|
|
|
|
|
DELETE_ROW,
|
|
|
|
|
///
|
|
|
|
|
DELETE_COLUMN,
|
|
|
|
|
///
|
|
|
|
|
COPY_ROW,
|
|
|
|
|
///
|
|
|
|
|
COPY_COLUMN,
|
|
|
|
|
///
|
|
|
|
|
TOGGLE_LINE_TOP,
|
|
|
|
|
///
|
|
|
|
|
TOGGLE_LINE_BOTTOM,
|
|
|
|
|
///
|
|
|
|
|
TOGGLE_LINE_LEFT,
|
|
|
|
|
///
|
|
|
|
|
TOGGLE_LINE_RIGHT,
|
|
|
|
|
///
|
|
|
|
|
ALIGN_LEFT,
|
|
|
|
|
///
|
|
|
|
|
ALIGN_RIGHT,
|
|
|
|
|
///
|
|
|
|
|
ALIGN_CENTER,
|
|
|
|
|
///
|
|
|
|
|
ALIGN_BLOCK,
|
|
|
|
|
///
|
|
|
|
|
VALIGN_TOP,
|
|
|
|
|
///
|
|
|
|
|
VALIGN_BOTTOM,
|
|
|
|
|
///
|
|
|
|
|
VALIGN_MIDDLE,
|
|
|
|
|
///
|
|
|
|
|
M_TOGGLE_LINE_TOP,
|
|
|
|
|
///
|
|
|
|
|
M_TOGGLE_LINE_BOTTOM,
|
|
|
|
|
///
|
|
|
|
|
M_TOGGLE_LINE_LEFT,
|
|
|
|
|
///
|
|
|
|
|
M_TOGGLE_LINE_RIGHT,
|
|
|
|
|
///
|
|
|
|
|
M_ALIGN_LEFT,
|
|
|
|
|
///
|
|
|
|
|
M_ALIGN_RIGHT,
|
|
|
|
|
///
|
|
|
|
|
M_ALIGN_CENTER,
|
|
|
|
|
///
|
|
|
|
|
M_VALIGN_TOP,
|
|
|
|
|
///
|
|
|
|
|
M_VALIGN_BOTTOM,
|
|
|
|
|
///
|
|
|
|
|
M_VALIGN_MIDDLE,
|
|
|
|
|
///
|
|
|
|
|
MULTICOLUMN,
|
|
|
|
|
///
|
|
|
|
|
SET_ALL_LINES,
|
|
|
|
|
///
|
|
|
|
|
UNSET_ALL_LINES,
|
|
|
|
|
///
|
|
|
|
|
SET_LONGTABULAR,
|
|
|
|
|
///
|
|
|
|
|
UNSET_LONGTABULAR,
|
|
|
|
|
///
|
|
|
|
|
SET_PWIDTH,
|
|
|
|
|
///
|
|
|
|
|
SET_MPWIDTH,
|
|
|
|
|
///
|
|
|
|
|
SET_ROTATE_TABULAR,
|
|
|
|
|
///
|
|
|
|
|
UNSET_ROTATE_TABULAR,
|
|
|
|
|
///
|
2007-05-12 20:59:21 +00:00
|
|
|
|
TOGGLE_ROTATE_TABULAR,
|
|
|
|
|
///
|
2007-04-26 12:54:21 +00:00
|
|
|
|
SET_ROTATE_CELL,
|
|
|
|
|
///
|
|
|
|
|
UNSET_ROTATE_CELL,
|
|
|
|
|
///
|
2007-05-12 20:59:21 +00:00
|
|
|
|
TOGGLE_ROTATE_CELL,
|
|
|
|
|
///
|
2007-04-26 12:54:21 +00:00
|
|
|
|
SET_USEBOX,
|
|
|
|
|
///
|
|
|
|
|
SET_LTHEAD,
|
|
|
|
|
UNSET_LTHEAD,
|
|
|
|
|
///
|
|
|
|
|
SET_LTFIRSTHEAD,
|
|
|
|
|
UNSET_LTFIRSTHEAD,
|
|
|
|
|
///
|
|
|
|
|
SET_LTFOOT,
|
|
|
|
|
UNSET_LTFOOT,
|
|
|
|
|
///
|
|
|
|
|
SET_LTLASTFOOT,
|
|
|
|
|
UNSET_LTLASTFOOT,
|
|
|
|
|
///
|
|
|
|
|
SET_LTNEWPAGE,
|
|
|
|
|
///
|
|
|
|
|
SET_SPECIAL_COLUMN,
|
|
|
|
|
///
|
|
|
|
|
SET_SPECIAL_MULTI,
|
|
|
|
|
///
|
|
|
|
|
SET_BOOKTABS,
|
|
|
|
|
///
|
|
|
|
|
UNSET_BOOKTABS,
|
|
|
|
|
///
|
|
|
|
|
SET_TOP_SPACE,
|
|
|
|
|
///
|
|
|
|
|
SET_BOTTOM_SPACE,
|
|
|
|
|
///
|
|
|
|
|
SET_INTERLINE_SPACE,
|
|
|
|
|
///
|
|
|
|
|
LAST_ACTION
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
enum {
|
|
|
|
|
///
|
|
|
|
|
CELL_NORMAL = 0,
|
|
|
|
|
///
|
|
|
|
|
CELL_BEGIN_OF_MULTICOLUMN,
|
|
|
|
|
///
|
|
|
|
|
CELL_PART_OF_MULTICOLUMN
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
enum VAlignment {
|
|
|
|
|
///
|
|
|
|
|
LYX_VALIGN_TOP = 0,
|
|
|
|
|
///
|
|
|
|
|
LYX_VALIGN_BOTTOM = 1,
|
|
|
|
|
///
|
|
|
|
|
LYX_VALIGN_MIDDLE = 2
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum BoxType {
|
|
|
|
|
///
|
|
|
|
|
BOX_NONE = 0,
|
|
|
|
|
///
|
|
|
|
|
BOX_PARBOX = 1,
|
|
|
|
|
///
|
|
|
|
|
BOX_MINIPAGE = 2
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ltType {
|
|
|
|
|
public:
|
|
|
|
|
// constructor
|
|
|
|
|
ltType();
|
|
|
|
|
// we have this header type (is set in the getLT... functions)
|
|
|
|
|
bool set;
|
|
|
|
|
// double borders on top
|
|
|
|
|
bool topDL;
|
|
|
|
|
// double borders on bottom
|
|
|
|
|
bool bottomDL;
|
|
|
|
|
// used for FirstHeader & LastFooter and if this is true
|
|
|
|
|
// all the rows marked as FirstHeader or LastFooter are
|
|
|
|
|
// ignored in the output and it is set to be empty!
|
|
|
|
|
bool empty;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/// type for row numbers
|
|
|
|
|
typedef size_t row_type;
|
|
|
|
|
/// type for column numbers
|
|
|
|
|
typedef size_t col_type;
|
|
|
|
|
/// type for cell indices
|
|
|
|
|
typedef size_t idx_type;
|
|
|
|
|
/// index indicating an invalid position
|
|
|
|
|
static const idx_type npos = static_cast<idx_type>(-1);
|
|
|
|
|
|
|
|
|
|
/// constructor
|
|
|
|
|
Tabular(BufferParams const &, col_type columns_arg,
|
|
|
|
|
row_type rows_arg);
|
|
|
|
|
|
|
|
|
|
/// Returns true if there is a topline, returns false if not
|
|
|
|
|
bool topLine(idx_type cell, bool wholerow = false) const;
|
|
|
|
|
/// Returns true if there is a topline, returns false if not
|
|
|
|
|
bool bottomLine(idx_type cell, bool wholerow = false) const;
|
|
|
|
|
/// Returns true if there is a topline, returns false if not
|
|
|
|
|
bool leftLine(idx_type cell, bool wholecolumn = false) const;
|
|
|
|
|
/// Returns true if there is a topline, returns false if not
|
|
|
|
|
bool rightLine(idx_type cell, bool wholecolumn = false) const;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
bool topAlreadyDrawn(idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
bool leftAlreadyDrawn(idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
bool isLastRow(idx_type cell) const;
|
|
|
|
|
|
|
|
|
|
/// return space occupied by the second horizontal line and
|
|
|
|
|
/// interline space above row \p row in pixels
|
|
|
|
|
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 wholerow = false);
|
|
|
|
|
///
|
|
|
|
|
void setBottomLine(idx_type cell, bool line, bool wholerow = false);
|
|
|
|
|
///
|
|
|
|
|
void setLeftLine(idx_type cell, bool line, bool wholecolumn = false);
|
|
|
|
|
///
|
|
|
|
|
void setRightLine(idx_type cell, bool line, bool wholecolumn = false);
|
|
|
|
|
///
|
|
|
|
|
void setAlignment(idx_type cell, LyXAlignment align,
|
|
|
|
|
bool onlycolumn = false);
|
|
|
|
|
///
|
|
|
|
|
void setVAlignment(idx_type cell, VAlignment align,
|
|
|
|
|
bool onlycolumn = false);
|
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
void setColumnPWidth(Cursor &, idx_type, Length const &);
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
bool setMColumnPWidth(Cursor &, idx_type, Length const &);
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
void setAlignSpecial(idx_type cell, docstring const & special,
|
|
|
|
|
Feature what);
|
|
|
|
|
///
|
|
|
|
|
LyXAlignment getAlignment(idx_type cell,
|
|
|
|
|
bool onlycolumn = false) const;
|
|
|
|
|
///
|
|
|
|
|
VAlignment getVAlignment(idx_type cell,
|
|
|
|
|
bool onlycolumn = false) const;
|
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length const getPWidth(idx_type cell) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length const getColumnPWidth(idx_type cell) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length const getMColumnPWidth(idx_type cell) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
docstring 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 copyRow(BufferParams const &, row_type);
|
|
|
|
|
///
|
|
|
|
|
void appendColumn(BufferParams const &, idx_type cell);
|
|
|
|
|
///
|
|
|
|
|
void deleteColumn(col_type column);
|
|
|
|
|
///
|
|
|
|
|
void copyColumn(BufferParams const &, col_type);
|
|
|
|
|
///
|
|
|
|
|
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 &, Lexer &);
|
|
|
|
|
///
|
|
|
|
|
int latex(Buffer const &, odocstream &, OutputParams const &) const;
|
|
|
|
|
//
|
|
|
|
|
int docbook(Buffer const & buf, odocstream & os, OutputParams const &) const;
|
|
|
|
|
///
|
|
|
|
|
void plaintext(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const & runparams, int const depth,
|
|
|
|
|
bool onlydata, unsigned char delim) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
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 setBookTabs(bool);
|
|
|
|
|
///
|
|
|
|
|
bool useBookTabs() 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
|
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
idx_type getCellFromInset(Inset const * inset) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
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;
|
|
|
|
|
///
|
|
|
|
|
docstring align_special;
|
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length p_width; // this is only set for multicolumn!!!
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
class rowstruct {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
rowstruct();
|
|
|
|
|
///
|
|
|
|
|
int ascent_of_row;
|
|
|
|
|
///
|
|
|
|
|
int descent_of_row;
|
|
|
|
|
///
|
|
|
|
|
bool top_line;
|
|
|
|
|
///
|
|
|
|
|
bool bottom_line;
|
|
|
|
|
/// Extra space between the top line and this row
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length top_space;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
/// Ignore top_space if true and use the default top space
|
|
|
|
|
bool top_space_default;
|
|
|
|
|
/// Extra space between this row and the bottom line
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length bottom_space;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
/// Ignore bottom_space if true and use the default bottom space
|
|
|
|
|
bool bottom_space_default;
|
|
|
|
|
/// Extra space between the bottom line and the next top line
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length interline_space;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
/// Ignore interline_space if true and use the default interline space
|
|
|
|
|
bool interline_space_default;
|
|
|
|
|
/// This are for longtabulars only
|
|
|
|
|
/// a row of endhead
|
|
|
|
|
bool endhead;
|
|
|
|
|
/// a row of endfirsthead
|
|
|
|
|
bool endfirsthead;
|
|
|
|
|
/// a row of endfoot
|
|
|
|
|
bool endfoot;
|
|
|
|
|
/// row of endlastfoot
|
|
|
|
|
bool endlastfoot;
|
|
|
|
|
/// row for a pagebreak
|
|
|
|
|
bool newpage;
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
typedef std::vector<rowstruct> row_vector;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
class columnstruct {
|
|
|
|
|
public:
|
|
|
|
|
///
|
|
|
|
|
columnstruct();
|
|
|
|
|
///
|
|
|
|
|
LyXAlignment alignment;
|
|
|
|
|
///
|
|
|
|
|
VAlignment valignment;
|
|
|
|
|
///
|
|
|
|
|
bool left_line;
|
|
|
|
|
///
|
|
|
|
|
bool right_line;
|
|
|
|
|
///
|
|
|
|
|
int width_of_column;
|
|
|
|
|
///
|
2007-04-28 12:58:49 +00:00
|
|
|
|
Length p_width;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
docstring align_special;
|
|
|
|
|
};
|
|
|
|
|
///
|
|
|
|
|
typedef std::vector<columnstruct> column_vector;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
row_type rows_;
|
|
|
|
|
///
|
|
|
|
|
col_type columns_;
|
|
|
|
|
///
|
|
|
|
|
idx_type numberofcells;
|
|
|
|
|
///
|
|
|
|
|
std::vector<row_type> rowofcell;
|
|
|
|
|
///
|
|
|
|
|
std::vector<col_type> columnofcell;
|
|
|
|
|
///
|
|
|
|
|
row_vector row_info;
|
|
|
|
|
///
|
|
|
|
|
column_vector column_info;
|
|
|
|
|
///
|
|
|
|
|
mutable cell_vvector cell_info;
|
|
|
|
|
///
|
|
|
|
|
int width_of_tabular;
|
|
|
|
|
///
|
|
|
|
|
bool use_booktabs;
|
|
|
|
|
///
|
|
|
|
|
bool rotate;
|
|
|
|
|
//
|
|
|
|
|
// for long tabulars
|
|
|
|
|
//
|
|
|
|
|
bool is_long_tabular;
|
|
|
|
|
/// endhead data
|
|
|
|
|
ltType endhead;
|
|
|
|
|
/// endfirsthead data
|
|
|
|
|
ltType endfirsthead;
|
|
|
|
|
/// endfoot data
|
|
|
|
|
ltType endfoot;
|
|
|
|
|
/// endlastfoot data
|
|
|
|
|
ltType endlastfoot;
|
|
|
|
|
|
|
|
|
|
///
|
|
|
|
|
void init(BufferParams const &, row_type rows_arg,
|
|
|
|
|
col_type columns_arg);
|
|
|
|
|
///
|
|
|
|
|
void set_row_column_number_info();
|
|
|
|
|
/// Returns true if a complete update is necessary, otherwise false
|
|
|
|
|
bool setWidthOfMulticolCell(idx_type cell, int new_width);
|
|
|
|
|
///
|
|
|
|
|
void recalculateMulticolumnsOfColumn(col_type column);
|
|
|
|
|
/// Returns true if change
|
|
|
|
|
void calculate_width_of_column(col_type column);
|
|
|
|
|
///
|
|
|
|
|
bool calculate_width_of_column_NMC(col_type column); // no multi cells
|
|
|
|
|
///
|
|
|
|
|
void calculate_width_of_tabular();
|
|
|
|
|
///
|
|
|
|
|
void delete_column(col_type column);
|
|
|
|
|
///
|
|
|
|
|
idx_type cells_in_multicolumn(idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
BoxType useParbox(idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
// helper function for Latex returns number of newlines
|
|
|
|
|
///
|
|
|
|
|
int TeXTopHLine(odocstream &, row_type row) const;
|
|
|
|
|
///
|
|
|
|
|
int TeXBottomHLine(odocstream &, row_type row) const;
|
|
|
|
|
///
|
|
|
|
|
int TeXCellPreamble(odocstream &, idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
int TeXCellPostamble(odocstream &, idx_type cell) const;
|
|
|
|
|
///
|
|
|
|
|
int TeXLongtableHeaderFooter(odocstream &, Buffer const & buf,
|
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
///
|
|
|
|
|
bool isValidRow(row_type const row) const;
|
|
|
|
|
///
|
|
|
|
|
int TeXRow(odocstream &, row_type const row, Buffer const & buf,
|
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
///
|
|
|
|
|
// helper functions for plain text
|
|
|
|
|
///
|
|
|
|
|
bool plaintextTopHLine(odocstream &, row_type row,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
std::vector<unsigned int> const &) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
bool plaintextBottomHLine(odocstream &, row_type row,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
std::vector<unsigned int> const &) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
///
|
|
|
|
|
void plaintextPrintCell(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const &,
|
|
|
|
|
idx_type cell, row_type row, col_type column,
|
|
|
|
|
std::vector<unsigned int> const &,
|
|
|
|
|
bool onlydata) const;
|
2007-04-26 12:54:21 +00:00
|
|
|
|
/// auxiliary function for docbook
|
|
|
|
|
int docbookRow(Buffer const & buf, odocstream & os, row_type,
|
|
|
|
|
OutputParams const &) const;
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
/// renumber cells after structural changes
|
|
|
|
|
void fixCellNums();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-29 13:39:47 +00:00
|
|
|
|
class InsetTabular : public Inset {
|
2000-04-19 14:42:19 +00:00
|
|
|
|
public:
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2004-12-03 13:57:50 +00:00
|
|
|
|
InsetTabular(Buffer const &, row_type rows = 1,
|
2006-04-05 23:56:29 +00:00
|
|
|
|
col_type columns = 1);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
|
|
|
|
~InsetTabular();
|
|
|
|
|
///
|
2007-04-26 11:30:54 +00:00
|
|
|
|
void read(Buffer const &, Lexer &);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
|
void write(Buffer const &, std::ostream &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2006-11-28 15:15:49 +00:00
|
|
|
|
bool metrics(MetricsInfo &, Dimension &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2003-05-30 06:48:24 +00:00
|
|
|
|
void draw(PainterInfo & pi, int x, int y) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2004-11-30 01:59:49 +00:00
|
|
|
|
void drawSelection(PainterInfo & pi, int x, int y) const;
|
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
virtual docstring const editMessage() const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2005-07-15 22:10:25 +00:00
|
|
|
|
EDITABLE editable() const { return HIGHLY_EDITABLE; }
|
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
bool insetAllowed(Inset::Code) const { return true; }
|
2001-07-09 14:19:41 +00:00
|
|
|
|
///
|
2006-07-07 10:18:33 +00:00
|
|
|
|
bool allowSpellCheck() const { return true; }
|
|
|
|
|
///
|
2006-03-17 19:45:28 +00:00
|
|
|
|
bool canTrackChanges() const { return true; }
|
2002-07-23 21:03:38 +00:00
|
|
|
|
/** returns true if, when outputing LaTeX, font changes should
|
2002-12-01 22:59:25 +00:00
|
|
|
|
be closed before generating this inset. This is needed for
|
|
|
|
|
insets that may contain several paragraphs */
|
2002-07-23 21:03:38 +00:00
|
|
|
|
bool noFontChange() const { return true; }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-05-18 14:32:29 +00:00
|
|
|
|
DisplayType display() const { return tabular.isLongTabular() ? AlignCenter : Inline; }
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int latex(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int plaintext(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
int docbook(Buffer const &, odocstream &,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
OutputParams const &) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void validate(LaTeXFeatures & features) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Code lyxCode() const { return Inset::TABULAR_CODE; }
|
2004-11-30 01:59:49 +00:00
|
|
|
|
/// get offset of this cursor slice relative to our upper left corner
|
2006-10-17 16:23:27 +00:00
|
|
|
|
void cursorPos(BufferView const & bv, CursorSlice const & sl,
|
|
|
|
|
bool boundary, int & x, int & y) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool tabularFeatures(Cursor & cur, std::string const & what);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void tabularFeatures(Cursor & cur, Tabular::Feature feature,
|
2003-10-06 15:43:21 +00:00
|
|
|
|
std::string const & val = std::string());
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void openLayoutDialog(BufferView *) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
bool showInsetDialog(BufferView *) const;
|
2004-02-16 11:58:51 +00:00
|
|
|
|
/// number of cells
|
2005-07-18 12:57:08 +00:00
|
|
|
|
size_t nargs() const { return tabular.getNumberOfCells(); }
|
2001-04-27 14:03:25 +00:00
|
|
|
|
///
|
2004-12-03 13:57:50 +00:00
|
|
|
|
boost::shared_ptr<InsetText const> cell(idx_type) const;
|
2004-02-16 11:58:51 +00:00
|
|
|
|
///
|
2004-12-03 13:57:50 +00:00
|
|
|
|
boost::shared_ptr<InsetText> cell(idx_type);
|
2003-11-01 09:56:18 +00:00
|
|
|
|
///
|
2007-04-29 23:33:02 +00:00
|
|
|
|
Text * getText(int) const;
|
2003-02-08 19:18:01 +00:00
|
|
|
|
|
2006-10-20 09:29:19 +00:00
|
|
|
|
/// set the change for the entire inset
|
|
|
|
|
void setChange(Change const & change);
|
2006-10-24 06:11:45 +00:00
|
|
|
|
/// accept the changes within the inset
|
2007-01-23 21:53:16 +00:00
|
|
|
|
void acceptChanges(BufferParams const & bparams);
|
2006-10-24 21:38:47 +00:00
|
|
|
|
/// reject the changes within the inset
|
2007-01-23 21:53:16 +00:00
|
|
|
|
void rejectChanges(BufferParams const & bparams);
|
2003-02-08 19:18:01 +00:00
|
|
|
|
|
2005-11-17 08:41:56 +00:00
|
|
|
|
// this should return true if we have a "normal" cell, otherwise false.
|
2002-01-08 14:24:49 +00:00
|
|
|
|
// "normal" means without width set!
|
2005-11-17 08:41:56 +00:00
|
|
|
|
/// should all paragraphs be output with "Standard" layout?
|
|
|
|
|
bool forceDefaultParagraphs(idx_type cell = 0) const;
|
2002-03-21 17:09:55 +00:00
|
|
|
|
|
2002-08-02 16:39:43 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void addPreview(graphics::PreviewLoader &) const;
|
2002-08-02 16:39:43 +00:00
|
|
|
|
|
2003-07-10 12:26:40 +00:00
|
|
|
|
///
|
2003-08-28 07:41:31 +00:00
|
|
|
|
Buffer const & buffer() const;
|
2003-06-03 15:10:14 +00:00
|
|
|
|
|
|
|
|
|
/// set the owning buffer
|
2004-05-17 11:28:31 +00:00
|
|
|
|
void buffer(Buffer const * buf);
|
2003-11-04 12:36:59 +00:00
|
|
|
|
/// lock cell with given index
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void edit(Cursor & cur, bool left);
|
2003-11-04 12:36:59 +00:00
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
Inset * editXY(Cursor & cur, int x, int y);
|
2003-11-17 12:53:44 +00:00
|
|
|
|
/// can we go further down on mouse click?
|
|
|
|
|
bool descendable() const { return true; }
|
2007-08-12 21:43:58 +00:00
|
|
|
|
// Update the counters of this inset and of its contents
|
|
|
|
|
virtual void updateLabels(Buffer const &, ParIterator const &);
|
2003-12-10 09:45:32 +00:00
|
|
|
|
|
|
|
|
|
//
|
|
|
|
|
// Public structures and variables
|
|
|
|
|
///
|
2007-04-26 12:54:21 +00:00
|
|
|
|
mutable Tabular tabular;
|
2003-12-10 09:45:32 +00:00
|
|
|
|
|
2003-10-17 18:01:15 +00:00
|
|
|
|
protected:
|
2005-07-15 22:10:25 +00:00
|
|
|
|
///
|
2004-11-23 23:04:52 +00:00
|
|
|
|
InsetTabular(InsetTabular const &);
|
2005-07-15 22:10:25 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
virtual void doDispatch(Cursor & cur, FuncRequest & cmd);
|
2004-03-18 13:57:20 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool getStatus(Cursor & cur, FuncRequest const & cmd, FuncStatus &) const;
|
2005-07-17 01:13:36 +00:00
|
|
|
|
///
|
|
|
|
|
int scroll() const { return scx_; }
|
|
|
|
|
|
2000-04-19 14:42:19 +00:00
|
|
|
|
private:
|
2007-08-30 18:03:17 +00:00
|
|
|
|
virtual Inset * clone() const;
|
2004-11-23 23:04:52 +00:00
|
|
|
|
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2006-10-21 00:16:43 +00:00
|
|
|
|
void drawCellLines(frontend::Painter &, int x, int y, row_type row,
|
2006-04-05 23:56:29 +00:00
|
|
|
|
idx_type cell, bool erased) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void setCursorFromCoordinates(Cursor & cur, int x, int y) const;
|
2003-12-15 15:33:15 +00:00
|
|
|
|
|
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void moveNextCell(Cursor & cur);
|
2003-12-15 15:33:15 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void movePrevCell(Cursor & cur);
|
2001-07-24 22:08:49 +00:00
|
|
|
|
///
|
2004-12-03 13:57:50 +00:00
|
|
|
|
int getCellXPos(idx_type cell) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void resetPos(Cursor & cur) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2001-06-28 10:25:20 +00:00
|
|
|
|
void removeTabularRow();
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool copySelection(Cursor & cur);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool pasteClipboard(Cursor & cur);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void cutSelection(Cursor & cur);
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool isRightToLeft(Cursor & cur) const;
|
2001-05-28 15:11:24 +00:00
|
|
|
|
///
|
2007-04-26 14:56:30 +00:00
|
|
|
|
void getSelection(Cursor & cur, row_type & rs, row_type & re,
|
2006-04-05 23:56:29 +00:00
|
|
|
|
col_type & cs, col_type & ce) const;
|
2001-07-17 15:39:12 +00:00
|
|
|
|
///
|
2007-01-15 22:49:14 +00:00
|
|
|
|
bool insertPlaintextString(BufferView &, docstring const & buf, bool usePaste);
|
2004-02-13 16:22:53 +00:00
|
|
|
|
/// are we operating on several cells?
|
2007-04-26 14:56:30 +00:00
|
|
|
|
bool tablemode(Cursor & cur) const;
|
2004-02-13 16:22:53 +00:00
|
|
|
|
|
2005-06-27 12:53:35 +00:00
|
|
|
|
/// return the "Manhattan distance" to nearest corner
|
2006-10-13 16:44:44 +00:00
|
|
|
|
int dist(BufferView &, idx_type cell, int x, int y) const;
|
2005-03-21 18:21:13 +00:00
|
|
|
|
/// return the cell nearest to x, y
|
2006-10-13 16:44:44 +00:00
|
|
|
|
idx_type getNearestCell(BufferView &, int x, int y) const;
|
2005-04-26 11:12:20 +00:00
|
|
|
|
|
2007-05-12 20:59:21 +00:00
|
|
|
|
/// test the rotation state of the give cell range.
|
|
|
|
|
bool oneCellHasRotationState(bool rotated,
|
2007-05-28 22:27:45 +00:00
|
|
|
|
row_type row_start, row_type row_end,
|
2007-05-12 20:59:21 +00:00
|
|
|
|
col_type col_start, col_type col_end) const;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2003-06-03 15:10:14 +00:00
|
|
|
|
Buffer const * buffer_;
|
2001-04-04 09:42:56 +00:00
|
|
|
|
///
|
2004-12-03 13:57:50 +00:00
|
|
|
|
mutable idx_type first_visible_cell;
|
2005-07-15 22:10:25 +00:00
|
|
|
|
///
|
|
|
|
|
mutable int scx_;
|
2000-04-19 14:42:19 +00:00
|
|
|
|
};
|
2003-03-09 18:11:57 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class InsetTabularMailer : public MailInset {
|
|
|
|
|
public:
|
|
|
|
|
///
|
2003-07-18 16:13:33 +00:00
|
|
|
|
InsetTabularMailer(InsetTabular const & inset);
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
2007-04-29 13:39:47 +00:00
|
|
|
|
virtual Inset & inset() const { return inset_; }
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
virtual std::string const & name() const { return name_; }
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
virtual std::string const inset2string(Buffer const &) const;
|
2004-11-18 12:58:19 +00:00
|
|
|
|
///
|
|
|
|
|
static void string2params(std::string const &, InsetTabular &);
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
static std::string const params2string(InsetTabular const &);
|
2003-03-09 18:11:57 +00:00
|
|
|
|
private:
|
|
|
|
|
///
|
2003-10-06 15:43:21 +00:00
|
|
|
|
static std::string const name_;
|
2003-03-09 18:11:57 +00:00
|
|
|
|
///
|
|
|
|
|
InsetTabular & inset_;
|
|
|
|
|
};
|
|
|
|
|
|
2007-04-26 12:54:21 +00:00
|
|
|
|
std::string const featureAsString(Tabular::Feature feature);
|
2003-03-09 18:11:57 +00:00
|
|
|
|
|
2006-10-21 00:16:43 +00:00
|
|
|
|
} // namespace lyx
|
|
|
|
|
|
2000-04-19 14:42:19 +00:00
|
|
|
|
#endif
|