From 3b4321e0bd6090f1e83bf13111d6f6158e49d667 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Tue, 20 Jan 2004 12:09:08 +0000 Subject: Method to preallocate document space. --- src/Document.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Document.h') diff --git a/src/Document.h b/src/Document.h index f5436ab4f..18b47eaf5 100644 --- a/src/Document.h +++ b/src/Document.h @@ -87,7 +87,7 @@ public: userData = 0; } }; - + enum charClassification { ccSpace, ccNewLine, ccWord, ccPunctuation }; private: @@ -193,6 +193,7 @@ public: int NextWordStart(int pos, int delta); int NextWordEnd(int pos, int delta); int Length() { return cb.Length(); } + void Allocate(int newSize) { cb.Allocate(newSize*2); } long FindText(int minPos, int maxPos, const char *s, bool caseSensitive, bool word, bool wordStart, bool regExp, bool posix, int *length); long FindText(int iMessage, unsigned long wParam, long lParam); @@ -200,7 +201,7 @@ public: int LinesTotal(); void ChangeCase(Range r, bool makeUpperCase); - + void SetDefaultCharClasses(); void SetCharClasses(unsigned char *chars, charClassification newCharClass); void SetStylingBits(int bits); -- cgit v1.2.3