1 /************************************************************************/
2 /*									*/
3 /*  Positioned Objects and Frames					*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef	DOC_FRAME_PROPERTIES_H
8 #   define	DOC_FRAME_PROPERTIES_H
9 
10 #   include	"docPropVal.h"
11 
12 typedef enum FrameWrapStyle
13     {
14     FWSwrapWRAP= 0,
15     FWSwrapNOWRAP,
16     FWSwrapOVERLAY,
17 
18     FWSwrap_COUNT
19     } FrameWrapStyle;
20 
21 typedef struct FrameProperties
22     {
23     int			fpWideTwips;
24     int			fpHighTwips;
25 
26     int			fpXTwips;
27     int			fpYTwips;
28 
29     int			fpDistanceFromTextTwipsLeft;
30     int			fpDistanceFromTextTwipsRight;
31     int			fpDistanceFromTextTwipsTop;
32     int			fpDistanceFromTextTwipsBottom;
33     unsigned char	fpDistanceFromTextSet;
34 #			define DISTsetLEFT	(1<<0)
35 #			define DISTsetRIGHT	(1<<1)
36 #			define DISTsetTOP	(1<<2)
37 #			define DISTsetBOTTOM	(1<<3)
38 
39     unsigned char	fpIsSet;
40 #   define DOCisFRAME( fp ) ( (fp)->fpIsSet != 0 )
41 
42     unsigned char	fpXReference;
43     unsigned char	fpXPosition;
44 
45     unsigned char	fpYReference;
46     unsigned char	fpYPosition;
47     unsigned char	fpLockAnchor;
48 
49     unsigned char	fpFrameWrapStyle;
50     unsigned char	fpNoOverlap;
51 
52     unsigned char	fpTextFlowDirection;
53     } FrameProperties;
54 
55 /************************************************************************/
56 /*									*/
57 /*  Property numbers and masks.						*/
58 /*									*/
59 /************************************************************************/
60 
61 typedef enum TextFrameProperty
62     {
63     TFPprop_NONE= -1,
64 
65     TFPpropISSET= 0,
66 
67     TFPpropABSW,
68     TFPpropABSH,
69 
70     TFPpropNO_OVERLAP,
71 
72     TFPpropHORIZONTAL_REF,
73     TFPpropHORIZONTAL_POS,
74     TFPpropHORIZONTAL_ALIGN,
75 
76     TFPpropVERTICAL_REF,
77     TFPpropVERTICAL_POS,
78     TFPpropVERTICAL_ALIGN,
79     TFPpropLOCK_ANCHOR,
80 
81     TFPpropWRAP_STYLE,
82     TFPpropDFRMTXTL,
83     TFPpropDFRMTXTR,
84     TFPpropDFRMTXTT,
85     TFPpropDFRMTXTB,
86 
87     TFPpropTEXT_FLOW,
88 
89     TFPprop_COUNT,
90 
91     TFPprop_IGNORED,
92 
93     TFPprop_DFRMTXT,		/*  shortcut: read/write/tools only	*/
94     TFPprop_DFRMTXTX,		/*  shortcut: read/write/tools only	*/
95     TFPprop_DFRMTXTY,		/*  shortcut: read/write/tools only	*/
96 
97     TFPprop_FULL_COUNT
98     } TextFrameProperty;
99 
100 /************************************************************************/
101 /*									*/
102 /*  Routine declarations.						*/
103 /*									*/
104 /************************************************************************/
105 
106 extern const unsigned char docFrameYAllowed[FYpos_COUNT][FYref_COUNT];
107 
108 # define docCopyFrameProperties( to, from ) ( *(to)= *(from) )
109 # define docCleanFrameProperties( fp ) /* nothing */
110 
111 extern void docInitFrameProperties(	FrameProperties *	fp );
112 
113 extern int docSetFrameProperty(	FrameProperties *	fp,
114 				int			prop,
115 				int			arg );
116 
117 extern int docGetFrameProperty(	const FrameProperties *	fp,
118 				int			prop );
119 
120 #   endif	/*  DOC_FRAME_PROPERTIES_H	*/
121