///
SET_LTNEWPAGE,
///
+ TOGGLE_LTCAPTION,
+ ///
SET_SPECIAL_COLUMN,
///
SET_SPECIAL_MULTI,
/// index indicating an invalid position
static const idx_type npos = static_cast<idx_type>(-1);
- /// constructor
- Tabular();
/// constructor
Tabular(Buffer const &, col_type columns_arg, row_type rows_arg);
///
Length const getPWidth(idx_type cell) const;
///
- Length const getColumnPWidth(idx_type cell) const;
- ///
- Length const getMColumnPWidth(idx_type cell) const;
- ///
- docstring const getAlignSpecial(idx_type cell, int what) const;
- ///
int cellWidth(idx_type cell) const;
///
int getBeginningOfTextInCell(idx_type cell) const;
///
idx_type getLastCellInRow(row_type row) const;
///
- idx_type cellCount() const;
- ///
idx_type numberOfCellsInRow(idx_type cell) const;
///
void write(std::ostream &) const;
///
col_type cellRightColumn(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 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;
boost::shared_ptr<InsetTableCell>) const;
/// Search for \param inset in the tabular, with the
///
- idx_type cellFromInset(Inset const * inset) const;
- ///
- row_type rowCount() const { return row_info.size(); }
- ///
- col_type columnCount() const { return column_info.size();}
- ///
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 &);
///
int ascent;
///
int descent;
- ///
- bool top_line;
- ///
- bool bottom_line;
/// Extra space between the top line and this row
Length top_space;
/// Ignore top_space if true and use the default top space
bool endlastfoot;
/// row for a newpage
bool newpage;
+ /// caption
+ bool caption;
};
///
typedef std::vector<RowData> row_vector;
///
VAlignment valignment;
///
- bool left_line;
- ///
- bool right_line;
- ///
int width;
///
Length p_width;
{
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;
///
///
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;
};
insets that may contain several paragraphs */
bool noFontChange() const { return true; }
///
- DisplayType display() const { return tabular.isLongTabular() ? AlignCenter : Inline; }
+ DisplayType display() const { return tabular.is_long_tabular ? AlignCenter : Inline; }
///
int latex(odocstream &, OutputParams const &) const;
///
///
bool showInsetDialog(BufferView *) const;
/// number of cells
- size_t nargs() const { return tabular.cellCount(); }
+ size_t nargs() const { return tabular.numberofcells; }
///
boost::shared_ptr<InsetTableCell const> cell(idx_type) const;
///
/// 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;
///
void completionPosAndDim(Cursor const &, int & x, int & y, Dimension & dim) const;
+ ///
+ virtual InsetTabular * asInsetTabular() { return this; }
+ ///
+ virtual InsetTabular const * asInsetTabular() const { return this; }
+ ///
+ bool isRightToLeft(Cursor & cur) const;
+
//
// Public structures and variables
///
void setCursorFromCoordinates(Cursor & cur, int x, int y) const;
///
- void moveNextCell(Cursor & cur);
+ void moveNextCell(Cursor & cur,
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
- void movePrevCell(Cursor & cur);
+ void movePrevCell(Cursor & cur,
+ EntryDirection entry_from = ENTRY_DIRECTION_IGNORE);
///
int cellXPos(idx_type cell) const;
///
///
void cutSelection(Cursor & cur);
///
- bool isRightToLeft(Cursor & cur) const;
- ///
void getSelection(Cursor & cur, row_type & rs, row_type & re,
col_type & cs, col_type & ce) const;
///