1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111
|
/************************************************************************/
/* */
/* Tabs in a ruler. */
/* */
/************************************************************************/
# ifndef DOC_TAB_STOP_H
# define DOC_TAB_STOP_H
typedef enum TabAlignment
{
DOCtaLEFT= 0,
DOCtaRIGHT,
DOCtaCENTRE,
DOCtaDECIMAL,
DOCtaBAR,
DOCta_COUNT
} TabAlignment;
# define DOCta_BITS 4
typedef enum TabLeader
{
DOCtlNONE= 0,
DOCtlDOTS,
DOCtlUNDERLINE,
DOCtlHYPH,
DOCtlTHICK,
DOCtlEQUAL,
DOCtl_COUNT
} TabLeader;
# define DOCtl_BITS 4
typedef struct TabStop
{
int tsTwips;
int tsPixels;
unsigned int tsAlignment:DOCta_BITS;
unsigned int tsLeader:DOCtl_BITS;
unsigned int tsFromStyleOrList:1;
} TabStop;
typedef enum TabProperty
{
TABpropX= 0,
TABpropALIGN,
TABpropLEADER,
TABpropFROM_STYLE,
TABprop_COUNT
} TabProperty;
typedef struct TabStopList
{
TabStop * tslTabStops;
short int tslTabStopCount;
} TabStopList;
/************************************************************************/
/* */
/* Routine declarations. */
/* */
/************************************************************************/
extern void docInitTabStop( TabStop * ts );
void docInitTabStopList( TabStopList * tsl );
void docCleanTabStopList( TabStopList * tsl );
extern int docAddTabToList( TabStopList * tsl,
const TabStop * tsNew );
extern int docAddTabToListPixels( TabStopList * tsl,
const TabStop * tsNew );
extern void docDeleteTabFromList( TabStopList * tsl,
int n );
extern int docCopyTabStopList( int * pChanged,
TabStopList * to,
const TabStopList * from,
int pixels );
extern void docCompareTabStopLists( int * pDifferent,
const TabStopList * tsl1,
const TabStopList * from );
extern int docNextTabStop( TabStop * pTs,
int * pX,
int * pTab,
const TabStopList * tsl,
int x0Geometry,
int x0TextLines,
int tabInterval,
int xPosition );
extern int docRulerMergeTabs( TabStopList * tsl,
double xfac,
int x0GeometryPixels,
int tabCount,
const TabStop * tabStops );
# endif /* DOC_TAB_STOP_H */
|