1 /************************************************************************/ 2 /* */ 3 /* Text Editor Describes a run of text. */ 4 /* */ 5 /************************************************************************/ 6 7 # ifndef DOC_TEXT_PARTICULE_H 8 # define DOC_TEXT_PARTICULE_H 9 10 /************************************************************************/ 11 /* */ 12 /* An homogenous piece of text. Without hyphenation, it will not be */ 13 /* divided over lines. */ 14 /* It consists of some characters and then some spaces. */ 15 /* */ 16 /************************************************************************/ 17 18 typedef enum DocParticuleKind 19 { 20 DOCkindUNKNOWN= 0, 21 22 DOCkindSPAN, 23 DOCkindTAB, 24 DOCkindOBJECT, 25 DOCkindFIELDHEAD, 26 DOCkindFIELDTAIL, 27 DOCkindLINEBREAK, 28 DOCkindPAGEBREAK, 29 DOCkindCOLUMNBREAK, 30 DOCkindCHFTNSEP, 31 DOCkindCHFTNSEPC, 32 DOCkindOPT_HYPH, 33 34 DOCkindLTR_MARK, 35 DOCkindRTL_MARK, 36 37 DOCkind_PARA_END, 38 DOCkind_COUNT 39 } DocParticuleKind; 40 41 typedef struct TextParticule 42 { 43 /** 44 * String offset of the particule 45 */ 46 unsigned short tpStroff; 47 /** 48 * Number of bytes in the particule 49 */ 50 unsigned short tpStrlen; 51 unsigned char tpKind; 52 unsigned char tpFlags; 53 # define TPflagLEFT_BORDER 0x01 54 # define TPflagRIGHT_BORDER 0x02 55 # define TPflagXMATCH_LEFT 0x04 56 # define TPflagXMATCH_RIGHT 0x08 57 unsigned short tpTwipsWide; 58 /********************************************/ 59 /* Cannot hold A0 in landscape: 67336 tw */ 60 /* Left and right vertical text borders */ 61 /* are included in the width. */ 62 /********************************************/ 63 short tpXContentXPixels; 64 /********************************************/ 65 /* On screen drawing: to correct for */ 66 /* differences between Screen and */ 67 /* PostScript font. Relative to paragraph */ 68 /* frame. This is the offset of the text. */ 69 /* if the particule has a left text border */ 70 /* that border is drawn left of this */ 71 /* offset. */ 72 /* Must be signed: particules can protrude */ 73 /* to the left of the paragraph frame. */ 74 /********************************************/ 75 int tpObjectNumber; 76 int tpTextAttrNr; 77 } TextParticule; 78 79 # endif 80