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.

105 lines
3.8 KiB

  1. #ifndef LSFETCH_DEFINED
  2. #define LSFETCH_DEFINED
  3. #include "lsdefs.h"
  4. #include "lsfrun.h"
  5. #include "lsesc.h"
  6. #include "fmtres.h"
  7. #include "plsdnode.h"
  8. #include "lstflow.h"
  9. #include "plssubl.h"
  10. #include "tabutils.h"
  11. #include "chnutils.h"
  12. #include "lsffi.h"
  13. #define InitFormattingContext(plsc, urLeft, cpLimStart) \
  14. InitLineTabsContext((plsc)->lstabscontext,(plsc)->urRightMarginBreak, \
  15. (cpLimStart),\
  16. (plsc)->grpfManager & fFmiResolveTabsAsWord97);\
  17. InitSublineChunkContext((plsc)->plslineCur->lssubl.plschunkcontext,\
  18. urLeft, 0);\
  19. (plsc)->lslistcontext.plsdnToFinish = NULL;\
  20. (plsc)->lslistcontext.plssublCurrent = &((plsc)->plslineCur->lssubl);\
  21. (plsc)->lslistcontext.plssublCurrent->cpLim = (cpLimStart);\
  22. (plsc)->lslistcontext.plssublCurrent->urCur = (urLeft);\
  23. (plsc)->lslistcontext.plssublCurrent->urColumnMax = (plsc)->urRightMarginBreak;\
  24. (plsc)->lslistcontext.nDepthFormatLineCurrent = 1;\
  25. Assert((plsc)->lslistcontext.plssublCurrent->vrCur == 0);\
  26. Assert((plsc)->lslistcontext.plssublCurrent->plsdnLast == NULL);
  27. LSERR FetchAppendEscResumeCore(
  28. PLSC plsc, /* IN: LineServices context */
  29. long urColumnMax, /* IN: urColumnMax */
  30. const LSESC* plsesc, /* IN: escape characters */
  31. DWORD clsesc, /* IN: # of escape characters */
  32. const BREAKREC* rgbreakrec, /* IN: input array of break records */
  33. DWORD cbreakrec, /* IN: number of records in input array */
  34. FMTRES* pfmtres, /* OUT: result of last formatter*/
  35. LSCP* pcpLim, /* OUT: cpLim */
  36. PLSDNODE* pplsdnFirst, /* OUT: plsdnFirst */
  37. PLSDNODE* pplsdnLast, /* OUT: plsdnLast */
  38. long* pur); /* OUT: result pen position */
  39. LSERR FetchAppendEscCore(
  40. PLSC plsc, /* IN: LineServices context */
  41. long urColumnMax, /* IN: urColumnMax */
  42. const LSESC* plsesc, /* IN: escape characters */
  43. DWORD clsesc, /* IN: # of escape characters */
  44. FMTRES* pfmtres, /* OUT: result of last formatter*/
  45. LSCP* pcpLim, /* OUT: cpLim */
  46. PLSDNODE* pplsdnFirst, /* OUT: plsdnFirst */
  47. PLSDNODE* pplsdnLast, /* OUT: plsdnLast */
  48. long* pur); /* OUT: result pen position */
  49. LSERR QuickFormatting(
  50. PLSC plsc, /* IN: LineServices context */
  51. LSFRUN* plsfrun, /* IN: already featched run */
  52. long urColumnMax, /* IN: urColumnMax */
  53. BOOL* pfGeneral, /* OUT: quick formatting was stopped: we should general formatting */
  54. BOOL* pfHardStop, /* OUT: formatting has been stoped due to special situation, not because
  55. exceeded margin*/
  56. LSCP* pcpLim, /* OUT: cpLim */
  57. long* pur); /* OUT: result pen position */
  58. LSERR ProcessOneRun(
  59. PLSC plsc, /* IN: LineServices context */
  60. long urColumnMax, /* IN: urColumnMax */
  61. const LSFRUN* plsfrun, /* IN: given run */
  62. const BREAKREC* rgbreakrec, /* IN: input array of break records */
  63. DWORD cbreakrec, /* IN: number of records in input array */
  64. FMTRES* pfmtres); /* OUT: result of last formatter*/
  65. LSERR CreateSublineCore(
  66. PLSC plsc, /* IN: LS context */
  67. LSCP cpFirst, /* IN: cpFirst */
  68. long urColumnMax, /* IN: urColumnMax */
  69. LSTFLOW lstflow, /* IN: text flow */
  70. BOOL); /* IN: fContiguos */
  71. LSERR FinishSublineCore(
  72. PLSSUBL); /* IN: subline to finish */
  73. LSERR FormatAnm(
  74. PLSC plsc, /* IN: LS context */
  75. PLSFRUN plsfrunMainText);
  76. LSERR InitializeAutoDecTab(
  77. PLSC plsc, /* IN: LS context */
  78. long durAutoDecimalTab); /* IN:auto decimal tab offset */
  79. LSERR HandleTab(
  80. PLSC plsc); /* IN: LS context */
  81. LSERR CloseCurrentBorder(PLSC plsc); /* IN: LS context */
  82. long RightMarginIncreasing(PLSC plsc, long urColumnMax);
  83. #endif /* LSFETCH_DEFINED */