1 /************************************************************************/ 2 /* */ 3 /* Text Editor Row specific definitions. */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef DOC_ROW_NODE_H 8 # define DOC_ROW_NODE_H 9 10 # include <docLayoutPosition.h> 11 # include <docRowProperties.h> 12 13 /************************************************************************/ 14 /* */ 15 /* Row specific information. */ 16 /* */ 17 /* 1) The rtf file format does not really support tables. Keep an */ 18 /* administration of the set of rows that looks like a table. */ 19 /* First and past refer to similar rows. The header can come */ 20 /* before 'first'. */ 21 /* 2) Properties of the row. */ 22 /* 3) Cells with a rowspan can protrude below the actual row: To */ 23 /* optimize position lookups and to delimit areas to redraw */ 24 /* correctly, the position below all 'rowspan' columns is */ 25 /* remembered. */ 26 /* 4) If a row is a table header, it might be repeated on every page */ 27 /* where the table is continued. When the row is drawn on a */ 28 /* different page. No separate administration has to be kept to */ 29 /* handle the case where a row starts on a new page and the header */ 30 /* appears above it: It we make the header row behave as if it */ 31 /* has the (obsolete) \\trkeepfollow tag, it will appear in the */ 32 /* correct location in the normal text flow. */ 33 /* 6) The top position of the table header row that appears above an */ 34 /* ordinary row. (This must be kept with ordinary rows at the top */ 35 /* of a page.) */ 36 /* 7) A flag indicating that this row is preceded by a table header */ 37 /* that does not appear at its home position. */ 38 /* 8) Space to skip for borders. The top inset is also used */ 39 /* immediately after a real table row in plain text. */ 40 /* 9) Is this row going to be a table row? Only used while parsing */ 41 /* rtf. In a complete document biRowCellCount counts. (pun) */ 42 /* */ 43 /************************************************************************/ 44 45 typedef struct RowNode 46 { 47 /* 1 */ 48 int brTableHeaderRow; 49 int brTableFirst; 50 int brTablePast; 51 52 /* 2 */ 53 RowProperties brRowProperties; 54 55 /* 3 */ 56 LayoutPosition brBelowAllCellsPosition; 57 58 /* 4,6 */ 59 LayoutPosition brAboveHeaderPosition; 60 61 /* 8 */ 62 short int brTopInset; 63 64 /* 4,7 */ 65 unsigned char brPrecededByHeader; 66 67 /* 9 */ 68 unsigned char brForTable; 69 } RowNode; 70 71 /************************************************************************/ 72 /* */ 73 /* Shortcut defines throuw the BufferItem union. */ 74 /* */ 75 /************************************************************************/ 76 77 78 # define biRowTopInset BIU.biuRow.brTopInset 79 80 # define biRowTableHeaderRow BIU.biuRow.brTableHeaderRow 81 # define biRowTableFirst BIU.biuRow.brTableFirst 82 # define biRowTablePast BIU.biuRow.brTablePast 83 # define biRowPrecededByHeader BIU.biuRow.brPrecededByHeader 84 # define biRowBelowAllCellsPosition BIU.biuRow.brBelowAllCellsPosition 85 # define biRowAboveHeaderPosition \ 86 BIU.biuRow.brAboveHeaderPosition 87 # define biRowForTable BIU.biuRow.brForTable 88 89 # define biRowProperties BIU.biuRow.brRowProperties 90 91 # define biRowHalfGapWidthTwips biRowProperties.rpHalfGapWidthTwips 92 # define biRowLeftIndentTwips biRowProperties.rpLeftIndentTwips 93 # define biRowHeightTwips biRowProperties.rpHeightTwips 94 # define biRowIsTableHeader biRowProperties.rpIsTableHeader 95 # define biRowKeepOnOnePage biRowProperties.rpKeepOnOnePage 96 # define biRow_Keepfollow biRowProperties.rp_Keepfollow 97 # define biRowAutofit biRowProperties.rpAutofit 98 # define biRowCells biRowProperties.rpCells 99 # define biRowCellCount biRowProperties.rpCellCount 100 # define biRowAlignment biRowProperties.rpAlignment 101 102 # define biRowFrameNumber biRowProperties.rpFrameNumber 103 # define biRowTopBorderNumber biRowProperties.rpTopBorderNumber 104 # define biRowBottomBorderNumber biRowProperties.rpBottomBorderNumber 105 # define biRowLeftBorderNumber biRowProperties.rpLeftBorderNumber 106 # define biRowRightBorderNumber biRowProperties.rpRightBorderNumber 107 # define biRowVerticalBorderNumber \ 108 biRowProperties.rpVerticalBorderNumber 109 # define biRowHorizontalBorderNumber \ 110 biRowProperties.rpHorizontalBorderNumber 111 112 # define BI_ROW_IS_ONE_PAGE( rowBi ) \ 113 RP_IS_ONE_PAGE( &((rowBi)->biRowProperties) ) 114 115 116 # endif 117