From 1c6bfac2880b4f9b9b0691cf9cb44f426dedae65 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sat, 13 Mar 2010 03:40:05 +0000 Subject: Change definition of Sci_RangeToFormat to avoid reliance on Platform.h. --- include/Scintilla.h | 19 ++++++++++++------- src/Editor.cxx | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/include/Scintilla.h b/include/Scintilla.h index d1f4518fd..999cd86f5 100644 --- a/include/Scintilla.h +++ b/include/Scintilla.h @@ -905,23 +905,28 @@ struct Sci_TextToFind { #define TextRange Sci_TextRange #define TextToFind Sci_TextToFind -#ifdef PLATFORM_H +typedef void *Sci_SurfaceID; + +struct Sci_Rectangle { + int left; + int top; + int right; + int bottom; +}; /* This structure is used in printing and requires some of the graphics types * from Platform.h. Not needed by most client code. */ struct Sci_RangeToFormat { - SurfaceID hdc; - SurfaceID hdcTarget; - PRectangle rc; - PRectangle rcPage; + Sci_SurfaceID hdc; + Sci_SurfaceID hdcTarget; + Sci_Rectangle rc; + Sci_Rectangle rcPage; Sci_CharacterRange chrg; }; #define RangeToFormat Sci_RangeToFormat -#endif - struct Sci_NotifyHeader { /* Compatible with Windows NMHDR. * hwndFrom is really an environment specific window handle or pointer diff --git a/src/Editor.cxx b/src/Editor.cxx index 54fb6185b..ad0ca635b 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3536,7 +3536,7 @@ long Editor::FormatRange(bool draw, Sci_RangeToFormat *pfr) { int nPrintPos = pfr->chrg.cpMin; int visibleLine = 0; - int widthPrint = pfr->rc.Width() - vsPrint.fixedColumnWidth; + int widthPrint = pfr->rc.right - pfr->rc.left - vsPrint.fixedColumnWidth; if (printWrapState == eWrapNone) widthPrint = LineLayout::wrapWidthInfinite; -- cgit v1.2.3