- protected:
- /* These are real attributes: */
- bool m_HasBorders;
- // should we draw borders or not?
- int m_NumCols, m_NumRows;
- // number of columns; rows
- colStruct *m_ColsInfo;
- // array of column information
- cellStruct **m_CellInfo;
- // 2D array of all cells in the table : m_CellInfo[row][column]
- int m_Spacing;
- // spaces between cells
- int m_Padding;
- // cells internal indentation
-
- private:
- /* ...and these are valid only during parsing of table: */
- int m_ActualCol, m_ActualRow;
- // number of actual column (ranging from 0..m_NumCols)
-
- // default values (for table and row):
- int m_tBkg, m_rBkg;
- wxString m_tValign, m_rValign;
-
- double m_PixelScale;
-
-
- public:
- wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& tag, double pixel_scale = 1.0);
- ~wxHtmlTableCell();
- virtual void Layout(int w);
-
- void AddRow(const wxHtmlTag& tag);
- void AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag);
- private:
- void ReallocCols(int cols);
- void ReallocRows(int rows);
- // reallocates memory to given number of cols/rows
- // and changes m_NumCols/m_NumRows value to reflect this change
- // NOTE! You CAN'T change m_NumCols/m_NumRows before calling this!!
+protected:
+ /* These are real attributes: */
+
+ // number of columns; rows
+ int m_NumCols, m_NumRows;
+ // array of column information
+ colStruct *m_ColsInfo;
+ // 2D array of all cells in the table : m_CellInfo[row][column]
+ cellStruct **m_CellInfo;
+ // spaces between cells
+ int m_Spacing;
+ // cells internal indentation
+ int m_Padding;
+
+private:
+ /* ...and these are valid only when parsing the table: */
+
+ // number of actual column (ranging from 0..m_NumCols)
+ int m_ActualCol, m_ActualRow;
+
+ // default values (for table and row):
+ wxColour m_tBkg, m_rBkg;
+ wxString m_tValign, m_rValign;
+
+ double m_PixelScale;
+
+
+public:
+ wxHtmlTableCell(wxHtmlContainerCell *parent, const wxHtmlTag& tag, double pixel_scale = 1.0);
+ virtual ~wxHtmlTableCell();
+
+ virtual void RemoveExtraSpacing(bool top, bool bottom);
+
+ virtual void Layout(int w);
+
+ void AddRow(const wxHtmlTag& tag);
+ void AddCell(wxHtmlContainerCell *cell, const wxHtmlTag& tag);
+
+private:
+ // Reallocates memory to given number of cols/rows
+ // and changes m_NumCols/m_NumRows value to reflect this change
+ // NOTE! You CAN'T change m_NumCols/m_NumRows before calling this!!
+ void ReallocCols(int cols);
+ void ReallocRows(int rows);
+
+ // Computes minimal and maximal widths of columns. Needs to be called
+ // only once, before first Layout().
+ void ComputeMinMaxWidths();
+
+ wxDECLARE_NO_COPY_CLASS(wxHtmlTableCell);