Source code of Windows XP (NT5)
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.

96 lines
3.2 KiB

  1. #ifndef DISPMISC_DEFINED
  2. #define DISPMISC_DEFINED
  3. #include "lsidefs.h"
  4. #include "plsdnode.h"
  5. #include "plssubl.h"
  6. #include "lstflow.h"
  7. // Rectangle (usually clip rectangle) in local coordinate system
  8. //
  9. // U grows to the right, v grows up, so normally upLeft < upRight, vpTop > vpBottom
  10. // Upper left corner belongs to the rectangle, lower right corner doesn't.
  11. // That means:
  12. // upRight - upLeft equals dupLength.
  13. // Rectangle that contains one point (0,0) is {0,0,-1,1}.
  14. // Shading rectangle for dnode starting at (u0,v0) is {u0, v0+dvpAscent, u0+dupLen, v0-dvpDescent}
  15. // Note this last line reflects the big LS convention:
  16. // v0+dvpAscent belongs to line, v0-dvpDescent doesn't.
  17. typedef struct tagRECTUV
  18. {
  19. long upLeft;
  20. long vpTop;
  21. long upRight;
  22. long vpBottom;
  23. } RECTUV;
  24. typedef const RECTUV* PCRECTUV;
  25. typedef RECTUV* PRECTUV;
  26. /* CreateDisplayTree sets plsdnUpTemp in sublines to be displayed with given subline,
  27. * rejects wrong sublines, submitted for display, sets fAcceptedForDisplay in good ones
  28. */
  29. void CreateDisplayTree(PLSSUBL); /* IN: the uppermost subline */
  30. /* DestroyDisplayTree nulls plsdnUpTemp in sublines displayed with given subline.
  31. */
  32. void DestroyDisplayTree(PLSSUBL); /* IN: the uppermost subline */
  33. /* AdvanceToNextNode moves to the next dnode to be displayed (maybe changing sublines),
  34. * updating current pen, returning pointer to the next dnode
  35. */
  36. PLSDNODE AdvanceToNextDnode(PLSDNODE, /* IN: current dnode */
  37. LSTFLOW, /* IN: current (main) text flow */
  38. POINTUV*); /* INOUT: current pen position (u,v) */
  39. PLSDNODE AdvanceToFirstDnode(PLSSUBL, /* IN: main subline */
  40. LSTFLOW, /* IN: current (main) text flow */
  41. POINTUV*); /* INOUT: current pen position (u,v) */
  42. /* AdvanceToNextSubmittingDnode moves to the next dnode which submitted for display,
  43. * updating current pen, returning pointer to the next dnode
  44. */
  45. PLSDNODE AdvanceToNextSubmittingDnode(
  46. PLSDNODE, /* IN: current dnode */
  47. LSTFLOW, /* IN: current (main) text flow */
  48. POINTUV*); /* INOUT: current pen position (u,v) */
  49. PLSDNODE AdvanceToFirstSubmittingDnode(
  50. PLSSUBL, /* IN: main subline */
  51. LSTFLOW, /* IN: current (main) text flow */
  52. POINTUV*); /* INOUT: current pen position (u,v) */
  53. // NB Victork - following functions were used only for upClipLeft, upClipRight optimization.
  54. // If we'll decide that we do need that optimization after Word integration - I'll uncomment.
  55. #ifdef NEVER
  56. /* RectUVFromRectXY calculates (clip) rectangle in local (u,v) coordinates given
  57. (clip) rectangle in (x,y) and point of origin */
  58. void RectUVFromRectXY(const POINT*, /* IN: point of origin for local coordinates (x,y) */
  59. const RECT*, /* IN: input rectangle (x,y) */
  60. LSTFLOW, /* IN: local text flow */
  61. PRECTUV); /* OUT: output rectangle (u,v) */
  62. /* RectXYFromRectUV calculates rectangle in (x,y) coordinates given
  63. rectangle in local (u,v) coordinates and point of origin (x,y) */
  64. void RectXYFromRectUV(const POINT*, /* IN: point of origin for local coordinates (x,y) */
  65. PCRECTUV, /* IN: input rectangle (u,v) */
  66. LSTFLOW, /* IN: local text flow */
  67. RECT*); /* OUT: output rectangle (x,y) */
  68. #endif /* NEVER */
  69. #endif