X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Ftabular.h;h=75f9feacf0b7c5e5d7ff00fbad5df07bd983923d;hb=acb4e0a1d39ad697fdfcc7f2d66be2bc6b82e2d1;hp=36b034dd76b1b42acca14159e02532ca36748db7;hpb=b922cdd796f9e4b9a46a79808cdee596e04903eb;p=lyx.git diff --git a/src/tabular.h b/src/tabular.h index 36b034dd76..75f9feacf0 100644 --- a/src/tabular.h +++ b/src/tabular.h @@ -1,9 +1,9 @@ // -*- C++ -*- /* This file is part of - * ====================================================== - * + * ====================================================== + * * LyX, The Document Processor - * + * * Copyright 2000-2001 The LyX Team. * * @author: Jürgen Vigna @@ -30,7 +30,7 @@ class InsetTabular; class LaTeXFeatures; class Buffer; -/* The features the text class offers for tables */ +/* The features the text class offers for tables */ /// class LyXTabular { @@ -175,20 +175,23 @@ public: }; /// typedef struct lttype ltType; - + /* konstruktor */ /// - LyXTabular(InsetTabular *, int columns_arg, int rows_arg); + LyXTabular(BufferParams const &, + InsetTabular *, int columns_arg, int rows_arg); /// - LyXTabular(InsetTabular *, LyXTabular const &, bool same_id = false); + LyXTabular(BufferParams const &, + InsetTabular *, LyXTabular const &, bool same_id = false); /// explicit LyXTabular(Buffer const *, InsetTabular *, LyXLex & lex); /// LyXTabular & operator=(LyXTabular const &); /// - LyXTabular * clone(InsetTabular *, bool same_id = false); - + LyXTabular * clone(BufferParams const &, + InsetTabular *, bool same_id = false); + /// Returns true if there is a topline, returns false if not bool TopLine(int cell, bool onlycolumn = false) const; /// Returns true if there is a topline, returns false if not @@ -197,7 +200,7 @@ public: bool LeftLine(int cell, bool onlycolumn = false) const; /// Returns true if there is a topline, returns false if not bool RightLine(int cell, bool onlycolumn = false) const; - + /// bool TopAlreadyDrawed(int cell) const; /// @@ -209,7 +212,7 @@ public: int GetAdditionalHeight(int row) const; /// int GetAdditionalWidth(int cell) const; - + /* returns the maximum over all rows */ /// int GetWidthOfColumn(int cell) const; @@ -266,11 +269,11 @@ public: /// int GetBeginningOfTextInCell(int cell) const; /// - void AppendRow(int cell); + void AppendRow(BufferParams const &, int cell); /// void DeleteRow(int row); /// - void AppendColumn(int cell); + void AppendColumn(BufferParams const &, int cell); /// void DeleteColumn(int column); /// @@ -290,18 +293,18 @@ public: /// void Read(Buffer const *, LyXLex &); /// - void OldFormatRead(LyXLex &, string const &); + void OldFormatRead(BufferParams const &, LyXLex &, string const &); /// int latex(Buffer const *, std::ostream &, bool, bool) const; /// - int docBook(Buffer const * buf, std::ostream & os) const; + int docbook(Buffer const * buf, std::ostream & os, bool mixcont) const; /// int ascii(Buffer const *, std::ostream &, int const depth, - bool onlydata, unsigned char delim) const; + bool onlydata, unsigned char delim) const; /// bool IsMultiColumn(int cell, bool real = false) const; /// - void SetMultiColumn(int cell, int number); + void SetMultiColumn(Buffer const *, int cell, int number); /// int UnsetMultiColumn(int cell); // returns number of new cells /// @@ -376,6 +379,9 @@ public: InsetText * GetCellInset(int cell) const; /// InsetText * GetCellInset(int row, int column) const; + /// Search for \param inset in the tabular, with the + /// additional hint that it could be at \param maybe_cell + int GetCellFromInset(Inset const * inset, int maybe_cell = -1) const; /// int rows() const { return rows_; } /// @@ -395,7 +401,7 @@ private: /// struct cellstruct { /// - cellstruct(); + cellstruct(BufferParams const &); /// int cellno; /// @@ -522,7 +528,8 @@ private: InsetTabular * owner_; /// - void Init(int columns_arg, int rows_arg, LyXTabular const * lt = 0); + void Init(BufferParams const &, + int columns_arg, int rows_arg, LyXTabular const * lt = 0); /// void Reinit(bool reset_widths = true); /// @@ -530,7 +537,7 @@ private: /// Returns true if a complete update is necessary, otherwise false bool SetWidthOfMulticolCell(int cell, int new_width); /// - void recalculateMulticolCells(int cell, int new_width); + void recalculateMulticolumnsOfColumn(int column); /// Returns true if change bool calculate_width_of_column(int column); /// @@ -559,24 +566,24 @@ private: int TeXCellPostamble(std::ostream &, int cell) const; /// int TeXLongtableHeaderFooter(std::ostream &, Buffer const * buf, - bool fragile, bool fp) const; + bool fragile, bool fp) const; /// bool isValidRow(int const row) const; /// int TeXRow(std::ostream &, int const row, Buffer const * buf, - bool fragile, bool fp) const; + bool fragile, bool fp) const; /// // helper function for ASCII returns number of newlines /// int asciiTopHLine(std::ostream &, int row, - std::vector const &) const; + std::vector const &) const; /// int asciiBottomHLine(std::ostream &, int row, - std::vector const &) const; + std::vector const &) const; /// int asciiPrintCell(Buffer const *, std::ostream &, - int cell, int row, int column, - std::vector const &, + int cell, int row, int column, + std::vector const &, bool onlydata) const; /// auxiliary function for docbook int docbookRow(Buffer const * buf, std::ostream & os, int row) const;