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.

107 lines
4.2 KiB

  1. /************************************************************/
  2. /* Windows Write, Copyright 1985-1992 Microsoft Corporation */
  3. /************************************************************/
  4. #ifdef ONLINEHELP
  5. #define wwMax 3
  6. #else
  7. #define wwMax 2
  8. #endif
  9. #define wwNil (15)
  10. #define itrMaxCache 32
  11. /* Window create modes */
  12. #define wcmHoriz 0
  13. #define wcmVert 1
  14. #define wcmFtn 2
  15. typeCP CpSelectCursor(), CpGetCache(), CpHintCache(), CpParaBounds();
  16. typeCP CpFirstSty(), CpLimSty(), CpBeginLine(), CpFromDlTc();
  17. typeCP CpFromCursor(), CpEdge(), CpInsPoint();
  18. typeCP CpFirstFtn(), CpMacText();
  19. /* WWD reorg. CS Sept 1 */
  20. struct WWD
  21. { /* Window descriptor */
  22. unsigned char fDirty : 1; /* ww needs updating */
  23. unsigned char fCpBad : 1; /* cpFirst needs updating */
  24. unsigned char fWrite : 1; /* Can edit this window */
  25. /* true iff lower of a split pair. False means window is not split */
  26. unsigned char fLower : 1;
  27. /* true means window is split and this is the upper pane */
  28. unsigned char fSplit : 1;
  29. /* in the top window false means the bottom half has the active selection */
  30. /* used for window activation. remembered at deactivation */
  31. unsigned char fActive : 1;
  32. unsigned char fFtn : 1; /* This is a footnote window */
  33. unsigned char fRuler : 1; /* Draw tab and margin ruler */
  34. #ifdef SPLITTERS /* Only if we have split windows */
  35. /* points to lower ww if fSplit, to upper ww if fLower */
  36. unsigned char ww;
  37. #endif
  38. unsigned char fEditHeader: 1; /* We are editing the running head */
  39. unsigned char fEditFooter: 1; /* We are editing the running foot */
  40. unsigned char dcpDepend; /* hot spot for first line */
  41. unsigned char dlMac; /* number of actual dls for this ww */
  42. unsigned char dlMax; /* number of allocated dls for this ww */
  43. unsigned char doc;
  44. int xpMac; /* window rel position of last displayable pixel +1 */
  45. /* note: area starts at: xpSelBar, see dispdefs */
  46. int ichCpFirst; /* ich within cpFirst */
  47. /* first pixel pos to display; determines horizontal scroll */
  48. int xpMin;
  49. /* these will be changed to yp's later */
  50. int ypMac; /* pos of bottom of window */
  51. int ypMin; /* pos of top of writeable area of window */
  52. /* invalid band in the window */
  53. int ypFirstInval;
  54. int ypLastInval;
  55. typeCP cpFirst; /* First cp in ww */
  56. typeCP cpMin; /* Min cp for this ww if fFtn */
  57. typeCP cpMac; /* Mac cp for this ww if fFtn */
  58. unsigned char drElevator; /* dr where elevator is currently */
  59. unsigned char fScrap : 1; /* on for scrap window */
  60. /* new fields, consolidating various arrays */
  61. struct SEL sel; /* current selection in ww */
  62. /* must be at end of struct, see cwWWDclr kludge below */
  63. #ifndef SAND /* MEMO fields */
  64. HWND wwptr; /* window handle */
  65. HWND hHScrBar; /* Handle to horiz scroll bar */
  66. HWND hVScrBar; /* Handle to vert scroll bar */
  67. HDC hDC; /* Handle to device context */
  68. unsigned char sbHbar; /* Type of horiz scroll bar (SB_CTL or SB_HORIZ) */
  69. unsigned char sbVbar; /* Type of vert scroll bar (SB_CTL or SB_VERT) */
  70. #else
  71. WINDOWPTR wwptr; /* Sand window handle */
  72. #endif
  73. /* heap pointer to array of edl's. */
  74. struct EDL (**hdndl)[];
  75. };
  76. #define cwWWD (sizeof(struct WWD) / sizeof(int))
  77. #define cwWWDclr ((sizeof(struct WWD) - (4*sizeof(HANDLE)) - (2*sizeof(char)) - sizeof(int)) / sizeof(int))
  78. /* These macros will gain code size advantage from the fixed usage
  79. of rgwwd in MEMO, while permitting easy conversion to multiple
  80. document windows in CASHMERE. Only code that does not have to support both
  81. the clipboard and the document should use these macros */
  82. extern int wwClipboard;
  83. #ifdef ONLINEHELP
  84. extern int wwHelp;
  85. #define wwdHelp (rgwwd [ wwHelp ])
  86. #endif
  87. #define wwDocument 0
  88. #define wwdCurrentDoc (rgwwd [wwDocument])
  89. #define wwdClipboard (rgwwd [wwClipboard])
  90.