Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenrtf.h
Go to the documentation of this file.
00001 #ifndef _RTF 00002 #define _RTF 00003 00004 #include <stdarg.h> 00005 #include <stdio.h> 00006 00007 #include "windef.h" 00008 #include "winbase.h" 00009 #include "wingdi.h" 00010 #include "winuser.h" 00011 #include "richedit.h" 00012 00013 00014 /* 00015 * rtf.h - RTF document processing stuff. Release 1.10. 00016 */ 00017 00018 00019 /* 00020 * Twentieths of a point (twips) per inch (Many RTF measurements 00021 * are in twips per inch (tpi) units). Assumes 72 points/inch. 00022 */ 00023 00024 # define rtfTpi 1440 00025 00026 /* 00027 * RTF buffer size (avoids BUFSIZ, which differs across systems) 00028 */ 00029 00030 # define rtfBufSiz 1024 00031 00032 /* 00033 * Tokens are associated with up to three classification numbers: 00034 * 00035 * Class number: Broadest (least detailed) breakdown. For programs 00036 * that only care about gross token distinctions. 00037 * Major/minor numbers: Within their class, tokens have a major 00038 * number, and may also have a minor number to further 00039 * distinguish tokens with the same major number. 00040 * 00041 * *** Class, major and minor token numbers are all >= 0 *** 00042 * 00043 * Tokens that can't be classified are put in the "unknown" class. 00044 * For such, the major and minor numbers are meaningless, although 00045 * rtfTextBuf may be of interest then. 00046 * 00047 * Text tokens are a single character, and the major number indicates 00048 * the character value (note: can be non-ascii, i.e., greater than 127). 00049 * There is no minor number. 00050 * 00051 * Control symbols may have a parameter value, which will be found in 00052 * rtfParam. If no parameter was given, rtfParam = rtfNoParam. 00053 * 00054 * RTFGetToken() return value is the class number, but it sets all the 00055 * global token vars. 00056 * 00057 * rtfEOF is a fake token used by the reader; the writer never sees 00058 * it (except in the token reader hook, if it installs one). 00059 */ 00060 00061 00062 # define rtfNoParam (-1000000) 00063 00064 00065 00066 /* 00067 * For some reason, the no-style number is 222 00068 */ 00069 00070 # define rtfNoStyleNum 222 00071 # define rtfNormalStyleNum 0 00072 00073 00074 /* 00075 * Token classes (must be zero-based and sequential) 00076 */ 00077 00078 # define rtfUnknown 0 00079 # define rtfGroup 1 00080 # define rtfText 2 00081 # define rtfControl 3 00082 # define rtfEOF 4 00083 # define rtfMaxClass 5 /* highest class + 1 */ 00084 00085 /* 00086 * Group class major numbers 00087 */ 00088 00089 # define rtfBeginGroup 0 00090 # define rtfEndGroup 1 00091 00092 /* 00093 * Control class major and minor numbers. 00094 */ 00095 00096 # define rtfVersion 0 00097 00098 # define rtfDefFont 1 00099 00100 # define rtfCharSet 2 00101 # define rtfAnsiCharSet 0 00102 # define rtfMacCharSet 1 00103 # define rtfPcCharSet 2 00104 # define rtfPcaCharSet 3 00105 00106 00107 /* destination minor numbers should be zero-based and sequential */ 00108 00109 # define rtfDestination 3 00110 # define rtfFontTbl 0 00111 # define rtfFontAltName 1 /* new in 1.10 */ 00112 # define rtfEmbeddedFont 2 /* new in 1.10 */ 00113 # define rtfFontFile 3 /* new in 1.10 */ 00114 # define rtfFileTbl 4 /* new in 1.10 */ 00115 # define rtfFileInfo 5 /* new in 1.10 */ 00116 # define rtfColorTbl 6 00117 # define rtfStyleSheet 7 00118 # define rtfKeyCode 8 00119 # define rtfRevisionTbl 9 /* new in 1.10 */ 00120 # define rtfInfo 10 00121 # define rtfITitle 11 00122 # define rtfISubject 12 00123 # define rtfIAuthor 13 00124 # define rtfIOperator 14 00125 # define rtfIKeywords 15 00126 # define rtfIComment 16 00127 # define rtfIVersion 17 00128 # define rtfIDoccomm 18 00129 # define rtfIVerscomm 19 00130 # define rtfNextFile 20 /* reclassified in 1.10 */ 00131 # define rtfTemplate 21 /* reclassified in 1.10 */ 00132 # define rtfFNSep 22 00133 # define rtfFNContSep 23 00134 # define rtfFNContNotice 24 00135 # define rtfENSep 25 /* new in 1.10 */ 00136 # define rtfENContSep 26 /* new in 1.10 */ 00137 # define rtfENContNotice 27 /* new in 1.10 */ 00138 # define rtfPageNumLevel 28 /* new in 1.10 */ 00139 # define rtfParNumLevelStyle 29 /* new in 1.10 */ 00140 # define rtfHeader 30 00141 # define rtfFooter 31 00142 # define rtfHeaderLeft 32 00143 # define rtfHeaderRight 33 00144 # define rtfHeaderFirst 34 00145 # define rtfFooterLeft 35 00146 # define rtfFooterRight 36 00147 # define rtfFooterFirst 37 00148 # define rtfParNumText 38 /* new in 1.10 */ 00149 # define rtfParNumbering 39 /* new in 1.10 */ 00150 # define rtfParNumTextAfter 40 /* new in 1.10 */ 00151 # define rtfParNumTextBefore 41 /* new in 1.10 */ 00152 # define rtfBookmarkStart 42 00153 # define rtfBookmarkEnd 43 00154 # define rtfPict 44 00155 # define rtfObject 45 00156 # define rtfObjClass 46 00157 # define rtfObjName 47 00158 # define rtfObjTime 48 /* new in 1.10 */ 00159 # define rtfObjData 49 00160 # define rtfObjAlias 50 00161 # define rtfObjSection 51 00162 # define rtfObjResult 52 00163 # define rtfObjItem 53 /* new in 1.10 */ 00164 # define rtfObjTopic 54 /* new in 1.10 */ 00165 # define rtfDrawObject 55 /* new in 1.10 */ 00166 # define rtfFootnote 56 00167 # define rtfAnnotRefStart 57 /* new in 1.10 */ 00168 # define rtfAnnotRefEnd 58 /* new in 1.10 */ 00169 # define rtfAnnotID 59 /* reclassified in 1.10 */ 00170 # define rtfAnnotAuthor 60 /* new in 1.10 */ 00171 # define rtfAnnotation 61 /* reclassified in 1.10 */ 00172 # define rtfAnnotRef 62 /* new in 1.10 */ 00173 # define rtfAnnotTime 63 /* new in 1.10 */ 00174 # define rtfAnnotIcon 64 /* new in 1.10 */ 00175 # define rtfField 65 00176 # define rtfFieldInst 66 00177 # define rtfFieldResult 67 00178 # define rtfDataField 68 /* new in 1.10 */ 00179 # define rtfIndex 69 00180 # define rtfIndexText 70 00181 # define rtfIndexRange 71 00182 # define rtfTOC 72 00183 # define rtfNeXTGraphic 73 00184 # define rtfGenerator 74 00185 # define rtfNestTableProps 75 00186 # define rtfNoNestTables 76 00187 # define rtfMaxDestination 77 /* highest dest + 1 */ 00188 00189 # define rtfFontFamily 4 00190 # define rtfFFNil 0 00191 # define rtfFFRoman 1 00192 # define rtfFFSwiss 2 00193 # define rtfFFModern 3 00194 # define rtfFFScript 4 00195 # define rtfFFDecor 5 00196 # define rtfFFTech 6 00197 # define rtfFFBidirectional 7 /* new in 1.10 */ 00198 00199 # define rtfColorName 5 00200 # define rtfRed 0 00201 # define rtfGreen 1 00202 # define rtfBlue 2 00203 00204 # define rtfSpecialChar 6 00205 /* special chars seen in \info destination */ 00206 # define rtfIIntVersion 0 00207 # define rtfICreateTime 1 00208 # define rtfIRevisionTime 2 00209 # define rtfIPrintTime 3 00210 # define rtfIBackupTime 4 00211 # define rtfIEditTime 5 00212 # define rtfIYear 6 00213 # define rtfIMonth 7 00214 # define rtfIDay 8 00215 # define rtfIHour 9 00216 # define rtfIMinute 10 00217 # define rtfISecond 11 /* new in 1.10 */ 00218 # define rtfINPages 12 00219 # define rtfINWords 13 00220 # define rtfINChars 14 00221 # define rtfIIntID 15 00222 /* other special chars */ 00223 # define rtfCurHeadDate 16 00224 # define rtfCurHeadDateLong 17 00225 # define rtfCurHeadDateAbbrev 18 00226 # define rtfCurHeadTime 19 00227 # define rtfCurHeadPage 20 00228 # define rtfSectNum 21 /* new in 1.10 */ 00229 # define rtfCurFNote 22 00230 # define rtfCurAnnotRef 23 00231 # define rtfFNoteSep 24 00232 # define rtfFNoteCont 25 00233 # define rtfCell 26 00234 # define rtfRow 27 00235 # define rtfPar 28 00236 # define rtfSect 29 00237 # define rtfPage 30 00238 # define rtfColumn 31 00239 # define rtfLine 32 00240 # define rtfSoftPage 33 /* new in 1.10 */ 00241 # define rtfSoftColumn 34 /* new in 1.10 */ 00242 # define rtfSoftLine 35 /* new in 1.10 */ 00243 # define rtfSoftLineHt 36 /* new in 1.10 */ 00244 # define rtfTab 37 00245 # define rtfEmDash 38 00246 # define rtfEnDash 39 00247 # define rtfEmSpace 40 /* new in 1.10 */ 00248 # define rtfEnSpace 41 /* new in 1.10 */ 00249 # define rtfBullet 42 00250 # define rtfLQuote 43 00251 # define rtfRQuote 44 00252 # define rtfLDblQuote 45 00253 # define rtfRDblQuote 46 00254 # define rtfFormula 47 00255 # define rtfNoBrkSpace 49 00256 # define rtfNoReqHyphen 50 00257 # define rtfNoBrkHyphen 51 00258 # define rtfOptDest 52 00259 # define rtfLTRMark 53 /* new in 1.10 */ 00260 # define rtfRTLMark 54 /* new in 1.10 */ 00261 # define rtfNoWidthJoiner 55 /* new in 1.10 */ 00262 # define rtfNoWidthNonJoiner 56 /* new in 1.10 */ 00263 # define rtfCurHeadPict 57 /* valid? */ 00264 /*# define rtfCurAnnot 58*/ /* apparently not used */ 00265 # define rtfUnicode 58 /* no better category*/ 00266 # define rtfNestCell 59 00267 # define rtfNestRow 60 00268 00269 # define rtfStyleAttr 7 00270 # define rtfAdditive 0 /* new in 1.10 */ 00271 # define rtfBasedOn 1 00272 # define rtfNext 2 00273 00274 # define rtfDocAttr 8 00275 # define rtfDefTab 0 00276 # define rtfHyphHotZone 1 00277 # define rtfHyphConsecLines 2 /* new in 1.10 */ 00278 # define rtfHyphCaps 3 /* new in 1.10 */ 00279 # define rtfHyphAuto 4 /* new in 1.10 */ 00280 # define rtfLineStart 5 00281 # define rtfFracWidth 6 00282 # define rtfMakeBackup 7 00283 # define rtfRTFDefault 8 00284 # define rtfPSOverlay 9 00285 # define rtfDocTemplate 10 /* new in 1.10 */ 00286 # define rtfDefLanguage 11 00287 # define rtfFENoteType 12 /* new in 1.10 */ 00288 # define rtfFNoteEndSect 13 00289 # define rtfFNoteEndDoc 14 00290 # define rtfFNoteText 15 00291 # define rtfFNoteBottom 16 00292 # define rtfENoteEndSect 17 /* new in 1.10 */ 00293 # define rtfENoteEndDoc 18 /* new in 1.10 */ 00294 # define rtfENoteText 19 /* new in 1.10 */ 00295 # define rtfENoteBottom 20 /* new in 1.10 */ 00296 # define rtfFNoteStart 21 00297 # define rtfENoteStart 22 /* new in 1.10 */ 00298 # define rtfFNoteRestartPage 23 /* new in 1.10 */ 00299 # define rtfFNoteRestart 24 00300 # define rtfFNoteRestartCont 25 /* new in 1.10 */ 00301 # define rtfENoteRestart 26 /* new in 1.10 */ 00302 # define rtfENoteRestartCont 27 /* new in 1.10 */ 00303 # define rtfFNoteNumArabic 28 /* new in 1.10 */ 00304 # define rtfFNoteNumLLetter 29 /* new in 1.10 */ 00305 # define rtfFNoteNumULetter 30 /* new in 1.10 */ 00306 # define rtfFNoteNumLRoman 31 /* new in 1.10 */ 00307 # define rtfFNoteNumURoman 32 /* new in 1.10 */ 00308 # define rtfFNoteNumChicago 33 /* new in 1.10 */ 00309 # define rtfENoteNumArabic 34 /* new in 1.10 */ 00310 # define rtfENoteNumLLetter 35 /* new in 1.10 */ 00311 # define rtfENoteNumULetter 36 /* new in 1.10 */ 00312 # define rtfENoteNumLRoman 37 /* new in 1.10 */ 00313 # define rtfENoteNumURoman 38 /* new in 1.10 */ 00314 # define rtfENoteNumChicago 39 /* new in 1.10 */ 00315 # define rtfPaperWidth 40 00316 # define rtfPaperHeight 41 00317 # define rtfPaperSize 42 /* new in 1.10 */ 00318 # define rtfLeftMargin 43 00319 # define rtfRightMargin 44 00320 # define rtfTopMargin 45 00321 # define rtfBottomMargin 46 00322 # define rtfFacingPage 47 00323 # define rtfGutterWid 48 00324 # define rtfMirrorMargin 49 00325 # define rtfLandscape 50 00326 # define rtfPageStart 51 00327 # define rtfWidowCtrl 52 00328 # define rtfLinkStyles 53 /* new in 1.10 */ 00329 # define rtfNoAutoTabIndent 54 /* new in 1.10 */ 00330 # define rtfWrapSpaces 55 /* new in 1.10 */ 00331 # define rtfPrintColorsBlack 56 /* new in 1.10 */ 00332 # define rtfNoExtraSpaceRL 57 /* new in 1.10 */ 00333 # define rtfNoColumnBalance 58 /* new in 1.10 */ 00334 # define rtfCvtMailMergeQuote 59 /* new in 1.10 */ 00335 # define rtfSuppressTopSpace 60 /* new in 1.10 */ 00336 # define rtfSuppressPreParSpace 61 /* new in 1.10 */ 00337 # define rtfCombineTblBorders 62 /* new in 1.10 */ 00338 # define rtfTranspMetafiles 63 /* new in 1.10 */ 00339 # define rtfSwapBorders 64 /* new in 1.10 */ 00340 # define rtfShowHardBreaks 65 /* new in 1.10 */ 00341 # define rtfFormProtected 66 /* new in 1.10 */ 00342 # define rtfAllProtected 67 /* new in 1.10 */ 00343 # define rtfFormShading 68 /* new in 1.10 */ 00344 # define rtfFormDisplay 69 /* new in 1.10 */ 00345 # define rtfPrintData 70 /* new in 1.10 */ 00346 # define rtfRevProtected 71 /* new in 1.10 */ 00347 # define rtfRevisions 72 00348 # define rtfRevDisplay 73 00349 # define rtfRevBar 74 00350 # define rtfAnnotProtected 75 /* new in 1.10 */ 00351 # define rtfRTLDoc 76 /* new in 1.10 */ 00352 # define rtfLTRDoc 77 /* new in 1.10 */ 00353 # define rtfAnsiCodePage 78 00354 # define rtfUTF8RTF 79 00355 00356 # define rtfSectAttr 9 00357 # define rtfSectDef 0 00358 # define rtfENoteHere 1 00359 # define rtfPrtBinFirst 2 00360 # define rtfPrtBin 3 00361 # define rtfSectStyleNum 4 /* new in 1.10 */ 00362 # define rtfNoBreak 5 00363 # define rtfColBreak 6 00364 # define rtfPageBreak 7 00365 # define rtfEvenBreak 8 00366 # define rtfOddBreak 9 00367 # define rtfColumns 10 00368 # define rtfColumnSpace 11 00369 # define rtfColumnNumber 12 /* new in 1.10 */ 00370 # define rtfColumnSpRight 13 /* new in 1.10 */ 00371 # define rtfColumnWidth 14 /* new in 1.10 */ 00372 # define rtfColumnLine 15 00373 # define rtfLineModulus 16 00374 # define rtfLineDist 17 00375 # define rtfLineStarts 18 00376 # define rtfLineRestart 19 00377 # define rtfLineRestartPg 20 00378 # define rtfLineCont 21 00379 # define rtfSectPageWid 22 00380 # define rtfSectPageHt 23 00381 # define rtfSectMarginLeft 24 00382 # define rtfSectMarginRight 25 00383 # define rtfSectMarginTop 26 00384 # define rtfSectMarginBottom 27 00385 # define rtfSectMarginGutter 28 00386 # define rtfSectLandscape 29 00387 # define rtfTitleSpecial 30 00388 # define rtfHeaderY 31 00389 # define rtfFooterY 32 00390 # define rtfPageStarts 33 00391 # define rtfPageCont 34 00392 # define rtfPageRestart 35 00393 # define rtfPageNumRight 36 /* renamed in 1.10 */ 00394 # define rtfPageNumTop 37 00395 # define rtfPageDecimal 38 00396 # define rtfPageURoman 39 00397 # define rtfPageLRoman 40 00398 # define rtfPageULetter 41 00399 # define rtfPageLLetter 42 00400 # define rtfPageNumHyphSep 43 /* new in 1.10 */ 00401 # define rtfPageNumSpaceSep 44 /* new in 1.10 */ 00402 # define rtfPageNumColonSep 45 /* new in 1.10 */ 00403 # define rtfPageNumEmdashSep 46 /* new in 1.10 */ 00404 # define rtfPageNumEndashSep 47 /* new in 1.10 */ 00405 # define rtfTopVAlign 48 00406 # define rtfBottomVAlign 49 00407 # define rtfCenterVAlign 50 00408 # define rtfJustVAlign 51 00409 # define rtfRTLSect 52 /* new in 1.10 */ 00410 # define rtfLTRSect 53 /* new in 1.10 */ 00411 00412 # define rtfTblAttr 10 00413 # define rtfRowDef 0 00414 # define rtfRowGapH 1 00415 # define rtfCellPos 2 00416 # define rtfMergeRngFirst 3 00417 # define rtfMergePrevious 4 00418 # define rtfRowLeft 5 00419 # define rtfRowRight 6 00420 # define rtfRowCenter 7 00421 # define rtfRowLeftEdge 8 00422 # define rtfRowHt 9 00423 # define rtfRowHeader 10 /* new in 1.10 */ 00424 # define rtfRowKeep 11 /* new in 1.10 */ 00425 # define rtfRTLRow 12 /* new in 1.10 */ 00426 # define rtfLTRRow 13 /* new in 1.10 */ 00427 # define rtfRowBordTop 14 /* new in 1.10 */ 00428 # define rtfRowBordLeft 15 /* new in 1.10 */ 00429 # define rtfRowBordBottom 16 /* new in 1.10 */ 00430 # define rtfRowBordRight 17 /* new in 1.10 */ 00431 # define rtfRowBordHoriz 18 /* new in 1.10 */ 00432 # define rtfRowBordVert 19 /* new in 1.10 */ 00433 # define rtfCellBordBottom 20 00434 # define rtfCellBordTop 21 00435 # define rtfCellBordLeft 22 00436 # define rtfCellBordRight 23 00437 # define rtfCellShading 24 00438 # define rtfCellBgPatH 25 00439 # define rtfCellBgPatV 26 00440 # define rtfCellFwdDiagBgPat 27 00441 # define rtfCellBwdDiagBgPat 28 00442 # define rtfCellHatchBgPat 29 00443 # define rtfCellDiagHatchBgPat 30 00444 # define rtfCellDarkBgPatH 31 00445 # define rtfCellDarkBgPatV 32 00446 # define rtfCellFwdDarkBgPat 33 00447 # define rtfCellBwdDarkBgPat 34 00448 # define rtfCellDarkHatchBgPat 35 00449 # define rtfCellDarkDiagHatchBgPat 36 00450 # define rtfCellBgPatLineColor 37 00451 # define rtfCellBgPatColor 38 00452 00453 # define rtfParAttr 11 00454 # define rtfParDef 0 00455 # define rtfStyleNum 1 00456 # define rtfHyphenate 2 /* new in 1.10 */ 00457 # define rtfInTable 3 00458 # define rtfKeep 4 00459 # define rtfNoWidowControl 5 /* new in 1.10 */ 00460 # define rtfKeepNext 6 00461 # define rtfOutlineLevel 7 /* new in 1.10 */ 00462 # define rtfNoLineNum 8 00463 # define rtfPBBefore 9 00464 # define rtfSideBySide 10 00465 # define rtfQuadLeft 11 00466 # define rtfQuadRight 12 00467 # define rtfQuadJust 13 00468 # define rtfQuadCenter 14 00469 # define rtfFirstIndent 15 00470 # define rtfLeftIndent 16 00471 # define rtfRightIndent 17 00472 # define rtfSpaceBefore 18 00473 # define rtfSpaceAfter 19 00474 # define rtfSpaceBetween 20 00475 # define rtfSpaceMultiply 21 /* new in 1.10 */ 00476 # define rtfSubDocument 22 /* new in 1.10 */ 00477 # define rtfRTLPar 23 /* new in 1.10 */ 00478 # define rtfLTRPar 24 /* new in 1.10 */ 00479 # define rtfTabPos 25 00480 # define rtfTabLeft 26 /* new in 1.10 */ 00481 # define rtfTabRight 27 00482 # define rtfTabCenter 28 00483 # define rtfTabDecimal 29 00484 # define rtfTabBar 30 00485 # define rtfLeaderDot 31 00486 # define rtfLeaderHyphen 32 00487 # define rtfLeaderUnder 33 00488 # define rtfLeaderThick 34 00489 # define rtfLeaderEqual 35 00490 # define rtfParLevel 36 /* new in 1.10 */ 00491 # define rtfParBullet 37 /* new in 1.10 */ 00492 # define rtfParSimple 38 /* new in 1.10 */ 00493 # define rtfParNumCont 39 /* new in 1.10 */ 00494 # define rtfParNumOnce 40 /* new in 1.10 */ 00495 # define rtfParNumAcross 41 /* new in 1.10 */ 00496 # define rtfParHangIndent 42 /* new in 1.10 */ 00497 # define rtfParNumRestart 43 /* new in 1.10 */ 00498 # define rtfParNumCardinal 44 /* new in 1.10 */ 00499 # define rtfParNumDecimal 45 /* new in 1.10 */ 00500 # define rtfParNumULetter 46 /* new in 1.10 */ 00501 # define rtfParNumURoman 47 /* new in 1.10 */ 00502 # define rtfParNumLLetter 48 /* new in 1.10 */ 00503 # define rtfParNumLRoman 49 /* new in 1.10 */ 00504 # define rtfParNumOrdinal 50 /* new in 1.10 */ 00505 # define rtfParNumOrdinalText 51 /* new in 1.10 */ 00506 # define rtfParNumBold 52 /* new in 1.10 */ 00507 # define rtfParNumItalic 53 /* new in 1.10 */ 00508 # define rtfParNumAllCaps 54 /* new in 1.10 */ 00509 # define rtfParNumSmallCaps 55 /* new in 1.10 */ 00510 # define rtfParNumUnder 56 /* new in 1.10 */ 00511 # define rtfParNumDotUnder 57 /* new in 1.10 */ 00512 # define rtfParNumDbUnder 58 /* new in 1.10 */ 00513 # define rtfParNumNoUnder 59 /* new in 1.10 */ 00514 # define rtfParNumWordUnder 60 /* new in 1.10 */ 00515 # define rtfParNumStrikethru 61 /* new in 1.10 */ 00516 # define rtfParNumForeColor 62 /* new in 1.10 */ 00517 # define rtfParNumFont 63 /* new in 1.10 */ 00518 # define rtfParNumFontSize 64 /* new in 1.10 */ 00519 # define rtfParNumIndent 65 /* new in 1.10 */ 00520 # define rtfParNumSpacing 66 /* new in 1.10 */ 00521 # define rtfParNumInclPrev 67 /* new in 1.10 */ 00522 # define rtfParNumCenter 68 /* new in 1.10 */ 00523 # define rtfParNumLeft 69 /* new in 1.10 */ 00524 # define rtfParNumRight 70 /* new in 1.10 */ 00525 # define rtfParNumStartAt 71 /* new in 1.10 */ 00526 # define rtfBorderTop 72 00527 # define rtfBorderBottom 73 00528 # define rtfBorderLeft 74 00529 # define rtfBorderRight 75 00530 # define rtfBorderBetween 76 00531 # define rtfBorderBar 77 00532 # define rtfBorderBox 78 00533 # define rtfBorderSingle 79 00534 # define rtfBorderThick 80 00535 # define rtfBorderShadow 81 00536 # define rtfBorderDouble 82 00537 # define rtfBorderDot 83 00538 # define rtfBorderDash 84 /* new in 1.10 */ 00539 # define rtfBorderHair 85 00540 # define rtfBorderWidth 86 00541 # define rtfBorderColor 87 00542 # define rtfBorderSpace 88 00543 # define rtfShading 89 00544 # define rtfBgPatH 90 00545 # define rtfBgPatV 91 00546 # define rtfFwdDiagBgPat 92 00547 # define rtfBwdDiagBgPat 93 00548 # define rtfHatchBgPat 94 00549 # define rtfDiagHatchBgPat 95 00550 # define rtfDarkBgPatH 96 00551 # define rtfDarkBgPatV 97 00552 # define rtfFwdDarkBgPat 98 00553 # define rtfBwdDarkBgPat 99 00554 # define rtfDarkHatchBgPat 100 00555 # define rtfDarkDiagHatchBgPat 101 00556 # define rtfBgPatLineColor 102 00557 # define rtfBgPatColor 103 00558 # define rtfNestLevel 104 00559 00560 # define rtfCharAttr 12 00561 # define rtfPlain 0 00562 # define rtfBold 1 00563 # define rtfAllCaps 2 00564 # define rtfDeleted 3 00565 # define rtfSubScript 4 00566 # define rtfSubScrShrink 5 /* new in 1.10 */ 00567 # define rtfNoSuperSub 6 /* new in 1.10 */ 00568 # define rtfExpand 7 00569 # define rtfExpandTwips 8 /* new in 1.10 */ 00570 # define rtfKerning 9 /* new in 1.10 */ 00571 # define rtfFontNum 10 00572 # define rtfFontSize 11 00573 # define rtfItalic 12 00574 # define rtfOutline 13 00575 # define rtfRevised 14 00576 # define rtfRevAuthor 15 /* new in 1.10 */ 00577 # define rtfRevDTTM 16 /* new in 1.10 */ 00578 # define rtfSmallCaps 17 00579 # define rtfShadow 18 00580 # define rtfStrikeThru 19 00581 # define rtfUnderline 20 00582 # define rtfDotUnderline 21 /* renamed in 1.10 */ 00583 # define rtfDbUnderline 22 00584 # define rtfNoUnderline 23 00585 # define rtfWordUnderline 24 /* renamed in 1.10 */ 00586 # define rtfSuperScript 25 00587 # define rtfSuperScrShrink 26 /* new in 1.10 */ 00588 # define rtfInvisible 27 00589 # define rtfForeColor 28 00590 # define rtfBackColor 29 00591 # define rtfRTLChar 30 /* new in 1.10 */ 00592 # define rtfLTRChar 31 /* new in 1.10 */ 00593 # define rtfCharStyleNum 32 /* new in 1.10 */ 00594 # define rtfCharCharSet 33 /* new in 1.10 */ 00595 # define rtfLanguage 34 00596 # define rtfGray 35 00597 # define rtfUnicodeLength 36 00598 00599 # define rtfPictAttr 13 00600 # define rtfMacQD 0 00601 # define rtfPMMetafile 1 00602 # define rtfWinMetafile 2 00603 # define rtfDevIndBitmap 3 00604 # define rtfWinBitmap 4 00605 # define rtfEmfBlip 5 00606 # define rtfPixelBits 6 00607 # define rtfBitmapPlanes 7 00608 # define rtfBitmapWid 8 00609 # define rtfPicWid 9 00610 # define rtfPicHt 10 00611 # define rtfPicGoalWid 11 00612 # define rtfPicGoalHt 12 00613 # define rtfPicScaleX 13 00614 # define rtfPicScaleY 14 00615 # define rtfPicScaled 15 00616 # define rtfPicCropTop 16 00617 # define rtfPicCropBottom 17 00618 # define rtfPicCropLeft 18 00619 # define rtfPicCropRight 19 00620 # define rtfPicMFHasBitmap 20 /* new in 1.10 */ 00621 # define rtfPicMFBitsPerPixel 21 /* new in 1.10 */ 00622 # define rtfPicBinary 22 00623 00624 # define rtfBookmarkAttr 14 00625 # define rtfBookmarkFirstCol 0 00626 # define rtfBookmarkLastCol 1 00627 00628 # define rtfNeXTGrAttr 15 00629 # define rtfNeXTGWidth 0 00630 # define rtfNeXTGHeight 1 00631 00632 # define rtfFieldAttr 16 00633 # define rtfFieldDirty 0 00634 # define rtfFieldEdited 1 00635 # define rtfFieldLocked 2 00636 # define rtfFieldPrivate 3 00637 # define rtfFieldAlt 4 /* new in 1.10 */ 00638 00639 # define rtfTOCAttr 17 00640 # define rtfTOCType 0 00641 # define rtfTOCLevel 1 00642 00643 # define rtfPosAttr 18 00644 # define rtfAbsWid 0 00645 # define rtfAbsHt 1 00646 # define rtfRPosMargH 2 00647 # define rtfRPosPageH 3 00648 # define rtfRPosColH 4 00649 # define rtfPosX 5 00650 # define rtfPosNegX 6 /* new in 1.10 */ 00651 # define rtfPosXCenter 7 00652 # define rtfPosXInside 8 00653 # define rtfPosXOutSide 9 00654 # define rtfPosXRight 10 00655 # define rtfPosXLeft 11 00656 # define rtfRPosMargV 12 00657 # define rtfRPosPageV 13 00658 # define rtfRPosParaV 14 00659 # define rtfPosY 15 00660 # define rtfPosNegY 16 /* new in 1.10 */ 00661 # define rtfPosYInline 17 00662 # define rtfPosYTop 18 00663 # define rtfPosYCenter 19 00664 # define rtfPosYBottom 20 00665 # define rtfNoWrap 21 00666 # define rtfDistFromTextAll 22 /* renamed in 1.10 */ 00667 # define rtfDistFromTextX 23 /* new in 1.10 */ 00668 # define rtfDistFromTextY 24 /* new in 1.10 */ 00669 # define rtfTextDistY 25 00670 # define rtfDropCapLines 26 /* new in 1.10 */ 00671 # define rtfDropCapType 27 /* new in 1.10 */ 00672 00673 # define rtfObjAttr 19 00674 # define rtfObjEmb 0 00675 # define rtfObjLink 1 00676 # define rtfObjAutoLink 2 00677 # define rtfObjSubscriber 3 00678 # define rtfObjPublisher 4 /* new in 1.10 */ 00679 # define rtfObjICEmb 5 00680 # define rtfObjLinkSelf 6 00681 # define rtfObjLock 7 00682 # define rtfObjUpdate 8 /* new in 1.10 */ 00683 # define rtfObjHt 9 00684 # define rtfObjWid 10 00685 # define rtfObjSetSize 11 00686 # define rtfObjAlign 12 /* new in 1.10 */ 00687 # define rtfObjTransposeY 13 00688 # define rtfObjCropTop 14 00689 # define rtfObjCropBottom 15 00690 # define rtfObjCropLeft 16 00691 # define rtfObjCropRight 17 00692 # define rtfObjScaleX 18 00693 # define rtfObjScaleY 19 00694 # define rtfObjResRTF 20 00695 # define rtfObjResPict 21 00696 # define rtfObjResBitmap 22 00697 # define rtfObjResText 23 00698 # define rtfObjResMerge 24 00699 # define rtfObjBookmarkPubObj 25 00700 # define rtfObjPubAutoUpdate 26 00701 00702 # define rtfFNoteAttr 20 /* new in 1.10 */ 00703 # define rtfFNAlt 0 /* new in 1.10 */ 00704 00705 # define rtfKeyCodeAttr 21 /* new in 1.10 */ 00706 # define rtfAltKey 0 /* new in 1.10 */ 00707 # define rtfShiftKey 1 /* new in 1.10 */ 00708 # define rtfControlKey 2 /* new in 1.10 */ 00709 # define rtfFunctionKey 3 /* new in 1.10 */ 00710 00711 # define rtfACharAttr 22 /* new in 1.10 */ 00712 # define rtfACBold 0 /* new in 1.10 */ 00713 # define rtfACAllCaps 1 /* new in 1.10 */ 00714 # define rtfACForeColor 2 /* new in 1.10 */ 00715 # define rtfACSubScript 3 /* new in 1.10 */ 00716 # define rtfACExpand 4 /* new in 1.10 */ 00717 # define rtfACFontNum 5 /* new in 1.10 */ 00718 # define rtfACFontSize 6 /* new in 1.10 */ 00719 # define rtfACItalic 7 /* new in 1.10 */ 00720 # define rtfACLanguage 8 /* new in 1.10 */ 00721 # define rtfACOutline 9 /* new in 1.10 */ 00722 # define rtfACSmallCaps 10 /* new in 1.10 */ 00723 # define rtfACShadow 11 /* new in 1.10 */ 00724 # define rtfACStrikeThru 12 /* new in 1.10 */ 00725 # define rtfACUnderline 13 /* new in 1.10 */ 00726 # define rtfACDotUnderline 14 /* new in 1.10 */ 00727 # define rtfACDbUnderline 15 /* new in 1.10 */ 00728 # define rtfACNoUnderline 16 /* new in 1.10 */ 00729 # define rtfACWordUnderline 17 /* new in 1.10 */ 00730 # define rtfACSuperScript 18 /* new in 1.10 */ 00731 00732 # define rtfFontAttr 23 /* new in 1.10 */ 00733 # define rtfFontCharSet 0 /* new in 1.10 */ 00734 # define rtfFontPitch 1 /* new in 1.10 */ 00735 # define rtfFontCodePage 2 /* new in 1.10 */ 00736 # define rtfFTypeNil 3 /* new in 1.10 */ 00737 # define rtfFTypeTrueType 4 /* new in 1.10 */ 00738 00739 # define rtfFileAttr 24 /* new in 1.10 */ 00740 # define rtfFileNum 0 /* new in 1.10 */ 00741 # define rtfFileRelPath 1 /* new in 1.10 */ 00742 # define rtfFileOSNum 2 /* new in 1.10 */ 00743 00744 # define rtfFileSource 25 /* new in 1.10 */ 00745 # define rtfSrcMacintosh 0 /* new in 1.10 */ 00746 # define rtfSrcDOS 1 /* new in 1.10 */ 00747 # define rtfSrcNTFS 2 /* new in 1.10 */ 00748 # define rtfSrcHPFS 3 /* new in 1.10 */ 00749 # define rtfSrcNetwork 4 /* new in 1.10 */ 00750 00751 /* 00752 * Drawing attributes 00753 */ 00754 00755 # define rtfDrawAttr 26 /* new in 1.10 */ 00756 # define rtfDrawLock 0 /* new in 1.10 */ 00757 # define rtfDrawPageRelX 1 /* new in 1.10 */ 00758 # define rtfDrawColumnRelX 2 /* new in 1.10 */ 00759 # define rtfDrawMarginRelX 3 /* new in 1.10 */ 00760 # define rtfDrawPageRelY 4 /* new in 1.10 */ 00761 # define rtfDrawColumnRelY 5 /* new in 1.10 */ 00762 # define rtfDrawMarginRelY 6 /* new in 1.10 */ 00763 # define rtfDrawHeight 7 /* new in 1.10 */ 00764 00765 # define rtfDrawBeginGroup 8 /* new in 1.10 */ 00766 # define rtfDrawGroupCount 9 /* new in 1.10 */ 00767 # define rtfDrawEndGroup 10 /* new in 1.10 */ 00768 # define rtfDrawArc 11 /* new in 1.10 */ 00769 # define rtfDrawCallout 12 /* new in 1.10 */ 00770 # define rtfDrawEllipse 13 /* new in 1.10 */ 00771 # define rtfDrawLine 14 /* new in 1.10 */ 00772 # define rtfDrawPolygon 15 /* new in 1.10 */ 00773 # define rtfDrawPolyLine 16 /* new in 1.10 */ 00774 # define rtfDrawRect 17 /* new in 1.10 */ 00775 # define rtfDrawTextBox 18 /* new in 1.10 */ 00776 00777 # define rtfDrawOffsetX 19 /* new in 1.10 */ 00778 # define rtfDrawSizeX 20 /* new in 1.10 */ 00779 # define rtfDrawOffsetY 21 /* new in 1.10 */ 00780 # define rtfDrawSizeY 22 /* new in 1.10 */ 00781 00782 # define rtfCOAngle 23 /* new in 1.10 */ 00783 # define rtfCOAccentBar 24 /* new in 1.10 */ 00784 # define rtfCOBestFit 25 /* new in 1.10 */ 00785 # define rtfCOBorder 26 /* new in 1.10 */ 00786 # define rtfCOAttachAbsDist 27 /* new in 1.10 */ 00787 # define rtfCOAttachBottom 28 /* new in 1.10 */ 00788 # define rtfCOAttachCenter 29 /* new in 1.10 */ 00789 # define rtfCOAttachTop 30 /* new in 1.10 */ 00790 # define rtfCOLength 31 /* new in 1.10 */ 00791 # define rtfCONegXQuadrant 32 /* new in 1.10 */ 00792 # define rtfCONegYQuadrant 33 /* new in 1.10 */ 00793 # define rtfCOOffset 34 /* new in 1.10 */ 00794 # define rtfCOAttachSmart 35 /* new in 1.10 */ 00795 # define rtfCODoubleLine 36 /* new in 1.10 */ 00796 # define rtfCORightAngle 37 /* new in 1.10 */ 00797 # define rtfCOSingleLine 38 /* new in 1.10 */ 00798 # define rtfCOTripleLine 39 /* new in 1.10 */ 00799 00800 # define rtfDrawTextBoxMargin 40 /* new in 1.10 */ 00801 # define rtfDrawTextBoxText 41 /* new in 1.10 */ 00802 # define rtfDrawRoundRect 42 /* new in 1.10 */ 00803 00804 # define rtfDrawPointX 43 /* new in 1.10 */ 00805 # define rtfDrawPointY 44 /* new in 1.10 */ 00806 # define rtfDrawPolyCount 45 /* new in 1.10 */ 00807 00808 # define rtfDrawArcFlipX 46 /* new in 1.10 */ 00809 # define rtfDrawArcFlipY 47 /* new in 1.10 */ 00810 00811 # define rtfDrawLineBlue 48 /* new in 1.10 */ 00812 # define rtfDrawLineGreen 49 /* new in 1.10 */ 00813 # define rtfDrawLineRed 50 /* new in 1.10 */ 00814 # define rtfDrawLinePalette 51 /* new in 1.10 */ 00815 # define rtfDrawLineDashDot 52 /* new in 1.10 */ 00816 # define rtfDrawLineDashDotDot 53 /* new in 1.10 */ 00817 # define rtfDrawLineDash 54 /* new in 1.10 */ 00818 # define rtfDrawLineDot 55 /* new in 1.10 */ 00819 # define rtfDrawLineGray 56 /* new in 1.10 */ 00820 # define rtfDrawLineHollow 57 /* new in 1.10 */ 00821 # define rtfDrawLineSolid 58 /* new in 1.10 */ 00822 # define rtfDrawLineWidth 59 /* new in 1.10 */ 00823 00824 # define rtfDrawHollowEndArrow 60 /* new in 1.10 */ 00825 # define rtfDrawEndArrowLength 61 /* new in 1.10 */ 00826 # define rtfDrawSolidEndArrow 62 /* new in 1.10 */ 00827 # define rtfDrawEndArrowWidth 63 /* new in 1.10 */ 00828 # define rtfDrawHollowStartArrow 64 /* new in 1.10 */ 00829 # define rtfDrawStartArrowLength 65 /* new in 1.10 */ 00830 # define rtfDrawSolidStartArrow 66 /* new in 1.10 */ 00831 # define rtfDrawStartArrowWidth 67 /* new in 1.10 */ 00832 00833 # define rtfDrawBgFillBlue 68 /* new in 1.10 */ 00834 # define rtfDrawBgFillGreen 69 /* new in 1.10 */ 00835 # define rtfDrawBgFillRed 70 /* new in 1.10 */ 00836 # define rtfDrawBgFillPalette 71 /* new in 1.10 */ 00837 # define rtfDrawBgFillGray 72 /* new in 1.10 */ 00838 # define rtfDrawFgFillBlue 73 /* new in 1.10 */ 00839 # define rtfDrawFgFillGreen 74 /* new in 1.10 */ 00840 # define rtfDrawFgFillRed 75 /* new in 1.10 */ 00841 # define rtfDrawFgFillPalette 76 /* new in 1.10 */ 00842 # define rtfDrawFgFillGray 77 /* new in 1.10 */ 00843 # define rtfDrawFillPatIndex 78 /* new in 1.10 */ 00844 00845 # define rtfDrawShadow 79 /* new in 1.10 */ 00846 # define rtfDrawShadowXOffset 80 /* new in 1.10 */ 00847 # define rtfDrawShadowYOffset 81 /* new in 1.10 */ 00848 00849 /* 00850 * index entry attributes 00851 */ 00852 00853 # define rtfIndexAttr 27 /* new in 1.10 */ 00854 # define rtfIndexNumber 0 /* new in 1.10 */ 00855 # define rtfIndexBold 1 /* reclassified in 1.10 */ 00856 # define rtfIndexItalic 2 /* reclassified in 1.10 */ 00857 00858 00859 /* 00860 * \wmetafile argument values 00861 */ 00862 00863 # define rtfWmMmText 1 00864 # define rtfWmMmLometric 2 00865 # define rtfWmMmHimetric 3 00866 # define rtfWmMmLoenglish 4 00867 # define rtfWmMmHienglish 5 00868 # define rtfWmMmTwips 6 00869 # define rtfWmMmIsotropic 7 00870 # define rtfWmMmAnisotropic 8 00871 00872 /* 00873 * \pmmetafile argument values 00874 */ 00875 00876 # define rtfPmPuArbitrary 4 00877 # define rtfPmPuPels 8 00878 # define rtfPmPuLometric 12 00879 # define rtfPmPuHimetric 16 00880 # define rtfPmPuLoenglish 20 00881 # define rtfPmPuHienglish 24 00882 # define rtfPmPuTwips 28 00883 00884 /* 00885 * \lang argument values 00886 */ 00887 00888 # define rtfLangNoLang 0x0400 00889 # define rtfLangAlbanian 0x041c 00890 # define rtfLangArabic 0x0401 00891 # define rtfLangBahasa 0x0421 00892 # define rtfLangBelgianDutch 0x0813 00893 # define rtfLangBelgianFrench 0x080c 00894 # define rtfLangBrazilianPortuguese 0x0416 00895 # define rtfLangBulgarian 0x0402 00896 # define rtfLangCatalan 0x0403 00897 # define rtfLangLatinCroatoSerbian 0x041a 00898 # define rtfLangCzech 0x0405 00899 # define rtfLangDanish 0x0406 00900 # define rtfLangDutch 0x0413 00901 # define rtfLangAustralianEnglish 0x0c09 00902 # define rtfLangUKEnglish 0x0809 00903 # define rtfLangUSEnglish 0x0409 00904 # define rtfLangFinnish 0x040b 00905 # define rtfLangFrench 0x040c 00906 # define rtfLangCanadianFrench 0x0c0c 00907 # define rtfLangGerman 0x0407 00908 # define rtfLangGreek 0x0408 00909 # define rtfLangHebrew 0x040d 00910 # define rtfLangHungarian 0x040e 00911 # define rtfLangIcelandic 0x040f 00912 # define rtfLangItalian 0x0410 00913 # define rtfLangJapanese 0x0411 00914 # define rtfLangKorean 0x0412 00915 # define rtfLangBokmalNorwegian 0x0414 00916 # define rtfLangNynorskNorwegian 0x0814 00917 # define rtfLangPolish 0x0415 00918 # define rtfLangPortuguese 0x0816 00919 # define rtfLangRhaetoRomanic 0x0417 00920 # define rtfLangRomanian 0x0418 00921 # define rtfLangRussian 0x0419 00922 # define rtfLangCyrillicSerboCroatian 0x081a 00923 # define rtfLangSimplifiedChinese 0x0804 00924 # define rtfLangSlovak 0x041b 00925 # define rtfLangCastilianSpanish 0x040a 00926 # define rtfLangMexicanSpanish 0x080a 00927 # define rtfLangSwedish 0x041d 00928 # define rtfLangSwissFrench 0x100c 00929 # define rtfLangSwissGerman 0x0807 00930 # define rtfLangSwissItalian 0x0810 00931 # define rtfLangThai 0x041e 00932 # define rtfLangTraditionalChinese 0x0404 00933 # define rtfLangTurkish 0x041f 00934 # define rtfLangUrdu 0x0420 00935 00936 /* 00937 * Style types 00938 */ 00939 00940 # define rtfParStyle 0 /* the default */ 00941 # define rtfCharStyle 1 00942 # define rtfSectStyle 2 00943 00944 /* 00945 * RTF font, color and style structures. Used for font table, 00946 * color table, and stylesheet processing. 00947 */ 00948 00949 typedef struct RTFFont RTFFont; 00950 typedef struct RTFColor RTFColor; 00951 typedef struct RTFStyle RTFStyle; 00952 typedef struct RTFStyleElt RTFStyleElt; 00953 typedef struct RTFBorder RTFBorder; 00954 typedef struct RTFCell RTFCell; 00955 typedef struct RTFTable RTFTable; 00956 00957 struct RTFFont 00958 { 00959 char *rtfFName; /* font name */ 00960 char *rtfFAltName; /* font alternate name */ 00961 int rtfFNum; /* font number */ 00962 int rtfFFamily; /* font family */ 00963 int rtfFCharSet; /* font charset */ 00964 int rtfFPitch; /* font pitch */ 00965 int rtfFType; /* font type */ 00966 int rtfFCodePage; /* font code page */ 00967 RTFFont *rtfNextFont; /* next font in list */ 00968 }; 00969 00970 00971 /* 00972 * Color values are -1 if the default color for the color 00973 * number should be used. The default color is writer-dependent. 00974 */ 00975 00976 struct RTFColor 00977 { 00978 int rtfCNum; /* color number */ 00979 int rtfCRed; /* red value */ 00980 int rtfCGreen; /* green value */ 00981 int rtfCBlue; /* blue value */ 00982 RTFColor *rtfNextColor; /* next color in list */ 00983 }; 00984 00985 00986 struct RTFStyle 00987 { 00988 char *rtfSName; /* style name */ 00989 int rtfSType; /* style type */ 00990 int rtfSAdditive; /* whether or not style is additive */ 00991 int rtfSNum; /* style number */ 00992 int rtfSBasedOn; /* style this one's based on */ 00993 int rtfSNextPar; /* style next paragraph style */ 00994 RTFStyleElt *rtfSSEList; /* list of style words */ 00995 int rtfExpanding; /* non-zero = being expanded */ 00996 RTFStyle *rtfNextStyle; /* next style in style list */ 00997 }; 00998 00999 01000 struct RTFStyleElt 01001 { 01002 int rtfSEClass; /* token class */ 01003 int rtfSEMajor; /* token major number */ 01004 int rtfSEMinor; /* token minor number */ 01005 int rtfSEParam; /* control symbol parameter */ 01006 char *rtfSEText; /* text of symbol */ 01007 RTFStyleElt *rtfNextSE; /* next element in style */ 01008 }; 01009 01010 struct RTFBorder 01011 { 01012 int width; 01013 int color; 01014 }; 01015 01016 struct RTFCell 01017 { 01018 int rightBoundary; 01019 RTFBorder border[4]; 01020 }; 01021 01022 01023 struct RTFTable 01024 { 01025 RTFCell cells[MAX_TABLE_CELLS]; 01026 int numCellsDefined; 01027 01028 int gapH, leftEdge; 01029 /* borders for the table row */ 01030 RTFBorder border[6]; 01031 01032 /* Used in v1.0 - v3.0 */ 01033 int numCellsInserted; 01034 01035 /* v4.1 */ 01036 /* tableRowStart may be the start row paragraph of the table row, 01037 * or it may store the end of the previous row if it may still be 01038 * continued, otherwise NULL is stored. */ 01039 ME_DisplayItem *tableRowStart; 01040 01041 /* Table definitions are stored as a stack to support nested tables. */ 01042 RTFTable *parent; 01043 }; 01044 01045 01046 # define RTFBorderTypeNone 0x00 01047 # define RTFBorderTypePara 0x10 /* for \brdrX control words */ 01048 # define RTFBorderTypeRow 0x20 /* for \trbrdrX control words */ 01049 # define RTFBorderTypeCell 0x30 /* for \clbrdrX control words */ 01050 # define RTFBorderTypeMask 0xf0 01051 01052 /* The X in the control words \brdrX \trbrdrX and \clbrdrX mentioned above 01053 * should be one of t, l, b, r which stand for top, left, bottom, right 01054 * respectively. */ 01055 # define RTFBorderSideTop 0x00 01056 # define RTFBorderSideLeft 0x01 01057 # define RTFBorderSideBottom 0x02 01058 # define RTFBorderSideRight 0x03 01059 # define RTFBorderSideHorizontal 0x04 01060 # define RTFBorderSideVertical 0x05 01061 # define RTFBorderSideMask 0x0f 01062 01063 /* Here are the values from the border types and sides put together. */ 01064 # define RTFBorderParaTop 0x10 01065 # define RTFBorderParaLeft 0x11 01066 # define RTFBorderParaBottom 0x12 01067 # define RTFBorderParaRight 0x13 01068 # define RTFBorderRowTop 0x20 01069 # define RTFBorderRowLeft 0x21 01070 # define RTFBorderRowBottom 0x22 01071 # define RTFBorderRowRight 0x23 01072 # define RTFBorderRowHorizontal 0x24 01073 # define RTFBorderRowVertical 0x25 01074 # define RTFBorderCellTop 0x30 01075 # define RTFBorderCellLeft 0x31 01076 # define RTFBorderCellBottom 0x32 01077 # define RTFBorderCellRight 0x33 01078 01079 /* 01080 * Return pointer to new element of type t, or NULL 01081 * if no memory available. 01082 */ 01083 01084 # define New(t) (heap_alloc (sizeof (t))) 01085 01086 /* Parser stack size */ 01087 01088 # define maxStack 32 01089 01090 struct _RTF_Info; 01091 typedef struct _RTF_Info RTF_Info; 01092 01093 typedef void (*RTFFuncPtr) (RTF_Info *); /* generic function pointer */ 01094 01095 01096 /* RTF parser stack element */ 01097 struct tagRTFState { 01098 ME_Style *style; 01099 int codePage; 01100 int unicodeLength; 01101 }; 01102 typedef struct tagRTFState RTFState; 01103 01104 01105 struct _RTF_Info { 01106 /* 01107 * Public variables (listed in rtf.h) 01108 */ 01109 01110 /* 01111 * Information pertaining to last token read by RTFToken. The 01112 * text is exactly as it occurs in the input file, e.g., "\{" 01113 * will be found in rtfTextBuf as "\{", even though it means "{". 01114 * These variables are also set when styles are reprocessed. 01115 */ 01116 01117 int rtfClass; 01118 int rtfMajor; 01119 int rtfMinor; 01120 int rtfParam; 01121 int rtfFormat; 01122 char *rtfTextBuf; 01123 int rtfTextLen; 01124 01125 int rtfLineNum; 01126 int rtfLinePos; 01127 01128 01129 /* 01130 * Private stuff 01131 */ 01132 01133 int pushedChar; /* pushback char if read too far */ 01134 01135 int pushedClass; /* pushed token info for RTFUngetToken() */ 01136 int pushedMajor; 01137 int pushedMinor; 01138 int pushedParam; 01139 char *pushedTextBuf; 01140 01141 int prevChar; 01142 int bumpLine; 01143 01144 /* Document-wide attributes */ 01145 RTFFont *fontList; /* these lists MUST be */ 01146 RTFColor *colorList; /* initialized to NULL */ 01147 RTFStyle *styleList; 01148 int ansiCodePage; /* ANSI codepage used in conversion to Unicode */ 01149 int defFont; 01150 01151 /* Character attributes */ 01152 int unicodeLength; /* The length of ANSI representation of Unicode characters */ 01153 int codePage; /* Current codepage for text conversion */ 01154 01155 ME_InStream *stream; 01156 01157 ME_TextEditor *editor; 01158 ME_Style *style; 01159 01160 RTFFuncPtr ccb[rtfMaxClass]; /* class callbacks */ 01161 01162 RTFFuncPtr dcb[rtfMaxDestination]; /* destination callbacks */ 01163 01164 RTFFuncPtr readHook; 01165 01166 DWORD dwOutputCount; 01167 WCHAR OutputBuffer[0x1000]; 01168 01169 DWORD dwCPOutputCount; 01170 DWORD dwMaxCPOutputCount; 01171 char *cpOutputBuffer; 01172 01173 RTFState stack[maxStack]; 01174 int stackTop; 01175 BOOL styleChanged; 01176 LPRICHEDITOLE lpRichEditOle; 01177 01178 RTFTable *tableDef; 01179 int nestingLevel; 01180 BOOL canInheritInTbl; 01181 int borderType; /* value corresponds to the RTFBorder constants. */ 01182 }; 01183 01184 01185 /* 01186 * Public RTF reader routines 01187 */ 01188 01189 void RTFInit (RTF_Info *) DECLSPEC_HIDDEN; 01190 void RTFDestroy(RTF_Info *info) DECLSPEC_HIDDEN; 01191 void RTFSetDestinationCallback (RTF_Info *, int, RTFFuncPtr) DECLSPEC_HIDDEN; 01192 void RTFRead (RTF_Info *) DECLSPEC_HIDDEN; 01193 int RTFGetToken (RTF_Info *) DECLSPEC_HIDDEN; /* writer should rarely need this */ 01194 void RTFSetReadHook (RTF_Info *, RTFFuncPtr) DECLSPEC_HIDDEN; 01195 void RTFRouteToken (RTF_Info *) DECLSPEC_HIDDEN; 01196 void RTFSkipGroup (RTF_Info *) DECLSPEC_HIDDEN; 01197 void RTFReadGroup (RTF_Info *) DECLSPEC_HIDDEN; 01198 int RTFCheckCM (const RTF_Info *, int, int) DECLSPEC_HIDDEN; 01199 int RTFCheckCMM (const RTF_Info *, int, int, int) DECLSPEC_HIDDEN; 01200 int RTFCheckMM (const RTF_Info *, int, int) DECLSPEC_HIDDEN; 01201 RTFFont *RTFGetFont (const RTF_Info *, int) DECLSPEC_HIDDEN; 01202 RTFColor *RTFGetColor (const RTF_Info *, int) DECLSPEC_HIDDEN; 01203 int RTFCharToHex ( char) DECLSPEC_HIDDEN; 01204 01205 void RTFFlushOutputBuffer( RTF_Info *info ) DECLSPEC_HIDDEN; 01206 void RTFSetEditStream(RTF_Info *info, ME_InStream *stream) DECLSPEC_HIDDEN; 01207 01208 void WriterInit (RTF_Info *) DECLSPEC_HIDDEN; 01209 int BeginFile (RTF_Info *) DECLSPEC_HIDDEN; 01210 01211 int RTFCharSetToCodePage(RTF_Info *info, int charset) DECLSPEC_HIDDEN; 01212 01213 void LookupInit (void) DECLSPEC_HIDDEN; 01214 void LookupCleanup (void) DECLSPEC_HIDDEN; 01215 01216 #endif Generated on Mon May 28 2012 04:25:37 for ReactOS by
1.7.6.1
|