From c15fc3e71af59805f4dbd8b154cbdee9db9db463 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Thu, 1 Jan 2009 21:54:10 +0000 Subject: Added flexible gap size for text buffer (STR #2046) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6618 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- FL/Fl_Text_Buffer.H | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'FL') diff --git a/FL/Fl_Text_Buffer.H b/FL/Fl_Text_Buffer.H index 4101b2954..967cda148 100644 --- a/FL/Fl_Text_Buffer.H +++ b/FL/Fl_Text_Buffer.H @@ -97,7 +97,7 @@ typedef void (*Fl_Text_Predelete_Cb)(int pos, int nDeleted, void* cbArg); */ class FL_EXPORT Fl_Text_Buffer { public: - Fl_Text_Buffer(int requestedSize = 0); + Fl_Text_Buffer(int requestedSize = 0, int preferredGapSize = 1024); ~Fl_Text_Buffer(); /** Returns the number of characters in the buffer. */ @@ -312,6 +312,9 @@ class FL_EXPORT Fl_Text_Buffer { use it */ char mCanUndo; /**< if this buffer is used for attributes, it must not do any undo calls */ + int mPreferredGapSize; /**< the default allocation for the text gap is 1024 + bytes and should only be increased if frequent + and large changes in buffer size are expected */ }; #endif -- cgit v1.2.3