1 /************************************************************************/ 2 /* */ 3 /* Values and sub structures used in various document property */ 4 /* structs. */ 5 /* */ 6 /************************************************************************/ 7 8 # ifndef DOC_PROP_VAL_H 9 # define DOC_PROP_VAL_H 10 11 /************************************************************************/ 12 /* */ 13 /* Levels of document item tree nesting. */ 14 /* */ 15 /************************************************************************/ 16 17 typedef enum ItemLevel 18 { 19 /************************************************/ 20 /* Ignore; Garbage values. */ 21 /************************************************/ 22 DOClevANY, 23 DOClevOUT, 24 /************************************************/ 25 /* Different kinds of BufferItems. */ 26 /************************************************/ 27 DOClevBODY, 28 DOClevSECT, 29 DOClevROW, 30 DOClevCELL, 31 DOClevPARA, 32 /************************************************/ 33 /* Not really a level: Plain text. */ 34 /************************************************/ 35 DOClevSPAN, 36 /************************************************/ 37 /* Not really a level: To be investigated */ 38 /* Values currently only used in the RTF */ 39 /* parser for tags that it ignores or handles */ 40 /* in a special way. */ 41 /************************************************/ 42 DOClevNESTCELL, 43 DOClevNESTROW, 44 /************************************************/ 45 DOClevNONESTTABLES, 46 /************************************************/ 47 DOClevCOLUMN, 48 DOClevTABLE, 49 50 DOClev_COUNT 51 } ItemLevel; 52 53 /************************************************************************/ 54 /* */ 55 /* Breaks before sections. DOCibkNONE, DOCibkCOL and DOCibkPAGE are */ 56 /* also used for paragraphs. */ 57 /* */ 58 /************************************************************************/ 59 60 typedef enum ItemBreak 61 { 62 DOCibkNONE= 0, 63 DOCibkCOL, 64 DOCibkPAGE, 65 # define DOCibkpara_COUNT DOCibkEVEN 66 DOCibkEVEN, 67 DOCibkODD, 68 69 DOCibk_COUNT 70 } ItemBreak; 71 72 # define DOCibksect_COUNT DOCibk_COUNT 73 74 /************************************************************************/ 75 /* */ 76 /* Horizontal alilignment of paragraphs and cells. */ 77 /* */ 78 /************************************************************************/ 79 80 typedef enum TextHorizontalAlignment 81 { 82 DOCthaLEFT= 0, 83 DOCthaRIGHT, 84 DOCthaCENTERED, 85 DOCthaJUSTIFIED, 86 87 DOCtha_COUNT 88 } TextHorizontalAlignment; 89 90 /************************************************************************/ 91 /* */ 92 /* Vertical alilignment of cells and rows. */ 93 /* */ 94 /************************************************************************/ 95 96 typedef enum TextVerticalAlignment 97 { 98 DOCtvaTOP= 0, 99 DOCtvaCENTERED, 100 DOCtvaBOTTOM, 101 102 DOCtva_COUNT 103 } TextVerticalAlignment; 104 105 typedef enum TextFlowDirection 106 { 107 TXflowTXLRTB= 0, /* left to right, top to bottom (default). */ 108 TXflowTXTBRL, /* right to left, top to bottom. */ 109 TXflowTXBTLR, /* left to right, bottom to top. */ 110 TXflowTXLRTBV, /* left to right, top to bottom, vertical. */ 111 TXflowTXTBRLV, /* top to bottom, right to left, vertical. */ 112 113 TXflow_COUNT 114 } TextFlowDirection; 115 116 /************************************************************************/ 117 /* */ 118 /* NOTE that these are hard values set in the RTF spec. */ 119 /* NOTE that some values only apply to shapes, not to frames. */ 120 /* */ 121 /************************************************************************/ 122 123 typedef enum FrameXReference 124 { 125 FXrefMARGIN= 0, 126 FXrefPAGE, 127 FXrefCOLUMN, 128 # define FXref__FRAME_COUNT (FXrefCOLUMN+1) 129 FXrefCHARACTER, 130 FXrefIGNORE, 131 132 FXref_COUNT 133 } FrameXReference; 134 135 /************************************************************************/ 136 /* */ 137 /* NOTE that these are hard values set in the RTF spec. */ 138 /* NOTE that some values only apply to shapes, not to frames. */ 139 /* */ 140 /************************************************************************/ 141 142 typedef enum FrameYReference 143 { 144 FYrefMARGIN= 0, 145 FYrefPAGE, 146 FYrefPARA, 147 # define FYref__FRAME_COUNT (FYrefPARA+1) 148 /** 149 * Position relative to the line of the anchor. 150 * Experimenting with Word 2003 shows that for 151 * shapes the deepest level is positioning relative 152 * to the paragraph. (For shapes) In the user interface, 153 * it is possible to select the line. If you select 154 * positioning relative to the line, MS-Word calculates 155 * the vertical offset relative to the paragraph. 156 */ 157 FYrefLINE, 158 FYrefIGNORE, 159 160 FYref_COUNT 161 } FrameYReference; 162 163 /************************************************************************/ 164 /* */ 165 /* Note that these are hard values set in the RTF spec. */ 166 /* */ 167 /************************************************************************/ 168 169 typedef enum FrameXPosition 170 { 171 FXposXGIVEN= 0, 172 FXposXL, 173 FXposXC, 174 FXposXR, 175 FXposXI, 176 FXposXO, 177 178 FXpos_COUNT 179 } FrameXPosition; 180 181 /************************************************************************/ 182 /* */ 183 /* Note that these are hard values set in the RTF spec. */ 184 /* */ 185 /************************************************************************/ 186 187 typedef enum FrameYPosition 188 { 189 FYposYGIVEN= 0, 190 FYposYT, 191 FYposYC, 192 FYposYB, 193 FYposYIN, 194 FYposYOUT, 195 196 FYpos_COUNT 197 } FrameYPosition; 198 199 /************************************************************************/ 200 /* */ 201 /* Units for table autoformatting: */ 202 /* */ 203 /************************************************************************/ 204 205 typedef enum TableAutoFormatUnit 206 { 207 TRautoNONE= 0, 208 TRautoAUTO, 209 TRautoPERCENT_50, 210 TRautoTWIPS, 211 212 TRauto_COUNT 213 } TableAutoFormatUnit; 214 215 # endif /* DOC_PROP_VAL_H */ 216