diff options
| author | nyamatongwe <devnull@localhost> | 2003-01-01 05:25:59 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2003-01-01 05:25:59 +0000 | 
| commit | a8c1cf08e4700ea74c2b97f8e393af68fe5dc286 (patch) | |
| tree | 8d2918e65ba317deb7cc79f8a9be7317bf30789e /src/Editor.cxx | |
| parent | 4cb12c84a0682f82fcd5fc113a5a87ea42ece5c1 (diff) | |
| download | scintilla-mirror-a8c1cf08e4700ea74c2b97f8e393af68fe5dc286.tar.gz | |
Changed wrapped printing to be more similar to wrapped display.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 16 | 
1 files changed, 8 insertions, 8 deletions
| diff --git a/src/Editor.cxx b/src/Editor.cxx index 9f10e3894..01c850176 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -285,7 +285,7 @@ Editor::Editor() {  	printMagnification = 0;  	printColourMode = SC_PRINT_NORMAL; -	printWraps = true; +	printWrapState = eWrapWord;  	cursorMode = SC_CURSORNORMAL;  	controlCharSymbol = 0;	/* Draw the control characters */ @@ -2442,7 +2442,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  	int nPrintPos = pfr->chrg.cpMin;  	int visibleLine = 0;  	int widthPrint = pfr->rc.Width() - lineNumberWidth; -	if (!printWraps) +	if (printWrapState == eWrapNone)  		widthPrint = LineLayout::wrapWidthInfinite;  	while (lineDoc <= linePrintLast && ypos < pfr->rc.bottom) { @@ -2484,7 +2484,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  			}  		} -		if (draw && lineNumberWidth &&  +		if (draw && lineNumberWidth &&  			(ypos + vsPrint.lineHeight <= pfr->rc.bottom) &&  			(visibleLine >= 0)) {  			char number[100]; @@ -2517,7 +2517,7 @@ long Editor::FormatRange(bool draw, RangeToFormat *pfr) {  				visibleLine++;  				if (iwl == ll.lines-1)  					nPrintPos = pdoc->LineStart(lineDoc + 1); -				else  +				else  					nPrintPos += ll.LineStart(iwl+1) - ll.LineStart(iwl);  			}  		} @@ -4965,12 +4965,12 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  	case SCI_GETPRINTCOLOURMODE:  		return printColourMode; -	case SCI_SETPRINTWRAPS: -		printWraps = wParam != 0; +	case SCI_SETPRINTWRAPMODE: +		printWrapState = (wParam == SC_WRAP_WORD) ? eWrapWord : eWrapNone;  		break; -	case SCI_GETPRINTWRAPS: -		return printWraps; +	case SCI_GETPRINTWRAPMODE: +		return printWrapState;  	case SCI_GETSTYLEAT:  		if (static_cast<short>(wParam) >= pdoc->Length()) | 
