Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.5 KiB

  1. #ifndef LSDNODE_DEFINED
  2. #define LSDNODE_DEFINED
  3. #include "lsidefs.h"
  4. #include "plsdnode.h"
  5. #include "pdobj.h"
  6. #include "objdim.h"
  7. #include "plsrun.h"
  8. #include "lschp.h"
  9. #include "plssubl.h"
  10. #define klsdnReal 0
  11. #define klsdnPenBorder 1
  12. #define tagLSDNODE Tag('L','S','D', 'N')
  13. #define FIsLSDNODE(plsdn) (FHasTag(plsdn,tagLSDNODE))
  14. struct lsdnode
  15. {
  16. DWORD tag;
  17. PLSDNODE plsdnNext,plsdnPrev;
  18. LSCP cpFirst;
  19. LSCP cpLimOriginal; /* is not equal to cpFirst + dcp in a case when
  20. glyph context goes across hidden text */
  21. PLSSUBL plssubl; /* subline which contains this dnode */
  22. LSDCP dcp; /* */
  23. UINT klsdn : 1; /* klsdnReal, klsdnPenBorder */
  24. UINT fAdvancedPen : 1; /* advanced pen, valid only if kldnPenBorder and not fBorder */
  25. UINT fBorderNode : 1; /* border, valid only if kldnPenBorder */
  26. UINT fOpenBorder :1; /* open or close border, valid only if fBorder */
  27. UINT fRigidDup : 1; /* Rigid dup is set */
  28. UINT fTab : 1; /* tab */
  29. UINT icaltbd : 8; /* index in the lscaltbd array in lsc.h */
  30. UINT fEndOfColumn : 1; /* dnode represents end of column */
  31. UINT fEndOfSection : 1; /* dnode represents end of section */
  32. UINT fEndOfPage : 1; /* dnode represents end of page */
  33. UINT fEndOfPara : 1; /* dnode represents end of paragraph */
  34. UINT fAltEndOfPara : 1; /* dnode represents alternative end of paragraphe */
  35. UINT fSoftCR : 1; /* dnode represents end of line */
  36. UINT fInsideBorder: 1; /* is true if dnode is inside bordered sequence or one
  37. of the dnodes under him is inside bordered sequence */
  38. UINT fAutoDecTab: 1; /* auto decimal tab */
  39. UINT fTabForAutonumber: 1; /* tab which is added at the end of autonumber */
  40. UINT fBorderMovedFromTrailingArea: 1;/* closing border which was moved to the begining of
  41. trailing area */
  42. UINT pad1 : 8;
  43. union /* variant record */
  44. {
  45. struct /* valid iff klsdn==klsdnReal */
  46. {
  47. LSCHP lschp;
  48. PLSRUN plsrun;
  49. OBJDIM objdim;
  50. long dup; /* width of object in pres pixels */
  51. PDOBJ pdobj;
  52. struct
  53. {
  54. DWORD cSubline; /* number of sublines */
  55. PLSSUBL* rgpsubl; /* array of such sublines */
  56. BOOL fUseForJustification;
  57. BOOL fUseForCompression;
  58. BOOL fUseForDisplay;
  59. BOOL fUseForDecimalTab;
  60. BOOL fUseForTrailingArea;
  61. } * pinfosubl; /* information how object participates in
  62. justification or display*/
  63. } real;
  64. struct /* valid iff klsdn==klsdnPen */
  65. {
  66. long dup,dvp;
  67. long dur,dvr;
  68. } pen;
  69. } u;
  70. };
  71. #define FIsDnodeReal(plsdn) (Assert(FIsLSDNODE(plsdn)), ((plsdn)->klsdn == klsdnReal))
  72. #define FIsDnodePen(plsdn) (Assert(FIsLSDNODE(plsdn)), \
  73. (((plsdn)->klsdn == klsdnPenBorder) && \
  74. (!(plsdn)->fBorderNode)))
  75. #define FIsDnodeBorder(plsdn) (Assert(FIsLSDNODE(plsdn)), \
  76. (((plsdn)->klsdn == klsdnPenBorder) && \
  77. ((plsdn)->fBorderNode)))
  78. #define FIsDnodeOpenBorder(plsdn) (FIsDnodeBorder(plsdn) && \
  79. ((plsdn)->fOpenBorder))
  80. #define FIsDnodeCloseBorder(plsdn) (FIsDnodeBorder(plsdn) && \
  81. !((plsdn)->fOpenBorder))
  82. #define FIsDnodeSplat(plsdn) ((plsdn)->fEndOfSection || \
  83. (plsdn)->fEndOfColumn || (plsdn)->fEndOfPage )
  84. #define FIsDnodeEndPara(plsdn) (plsdn)->fEndOfPara
  85. #define FIsDnodeAltEndPara(plsdn) (plsdn)->fAltEndOfPara
  86. #define FIsDnodeSoftCR(plsdn) (plsdn)->fSoftCr
  87. #endif /* !LSDNODE_DEFINED */