X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathGrid.h;h=886d03a8ee3321e33661988bcf20c32862ff9576;hb=71623b88b2c613dd4ab826a9783a53e840bcd6e1;hp=709f492b379b602a1f8197cd50978d582ea30f2b;hpb=f3b70fd2cdbbc282dff8beb1c8fb4ab3f06277fa;p=lyx.git diff --git a/src/mathed/InsetMathGrid.h b/src/mathed/InsetMathGrid.h index 709f492b37..886d03a8ee 100644 --- a/src/mathed/InsetMathGrid.h +++ b/src/mathed/InsetMathGrid.h @@ -44,13 +44,6 @@ public: Multicolumn multi_; /// special multi colums alignment docstring align_; - /// these should be a per-cell property, but ok to have it here - /// for single-column grids like paragraphs - mutable int glue_; - /// - mutable pos_type begin_; - /// - mutable pos_type end_; }; /// additional per-row information @@ -111,12 +104,6 @@ public: /// void draw(PainterInfo & pi, int x, int y) const; /// - void drawWithMargin(PainterInfo & pi, int x, int y, - int lmargin = 0, int rmargin = 0) const; - /// draw decorations. - void drawDecoration(PainterInfo & pi, int x, int y) const - { drawMarkers2(pi, x, y); } - /// void metricsT(TextMetricsInfo const & mi, Dimension & dim) const; /// void drawT(TextPainter & pi, int x, int y) const; @@ -154,6 +141,8 @@ public: InsetMathGrid * asGridInset() { return this; } /// identifies GridInset InsetMathGrid const * asGridInset() const { return this; } + // + bool isTable() const { return true; } /// col_type ncols() const; /// @@ -219,6 +208,8 @@ public: virtual int vlinesep() const; /// virtual int border() const; + /// + virtual bool handlesMulticolumn() const { return false; } /// void write(WriteStream & os) const; @@ -237,6 +228,8 @@ public: /// void htmlize(HtmlStream &, std::string attrib) const; /// + void validate(LaTeXFeatures & features) const; + /// //void octave(OctaveStream &) const; protected: @@ -251,6 +244,11 @@ protected: int cellYOffset(idx_type idx) const; /// Width of cell, taking combined columns into account int cellWidth(idx_type idx) const; + /// + virtual int leftMargin() const { return 0; } + /// + virtual int rightMargin() const { return 0; } + /// returns proper 'end of line' code for LaTeX virtual docstring eolString(row_type row, bool fragile, bool latex, bool last_eoln) const; @@ -261,8 +259,20 @@ protected: /// Column alignment for display of cell \p idx. /// Must not be written to file! virtual char displayColAlign(idx_type idx) const; + /// Column spacing for display of column \p col. + /// Must not be written to file! + virtual int displayColSpace(col_type col) const; + + // The following two functions are used in InsetMathHull and + // InsetMathSplit. /// The value of a fixed col align for a certain hull type static char colAlign(HullType type, col_type col); + /// The value of a fixed col spacing for a certain hull type + static int colSpace(HullType type, col_type col); + + /// positions of vertical and horizontal lines + int vLineHOffset(col_type col, unsigned int line) const; + int hLineVOffset(row_type row, unsigned int line) const; /// row info. /// rowinfo_[nrows()] is a dummy row used only for hlines. @@ -277,7 +287,7 @@ protected: private: /// - char v_align_; // add approp. type + char v_align_; // FIXME: add approp. type /// Inset * clone() const; };