aboutsummaryrefslogtreecommitdiffhomepage
path: root/doc/ScintillaDoc.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ScintillaDoc.html')
-rw-r--r--doc/ScintillaDoc.html20
1 files changed, 18 insertions, 2 deletions
diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html
index 9826e769c..c610b9c70 100644
--- a/doc/ScintillaDoc.html
+++ b/doc/ScintillaDoc.html
@@ -4770,6 +4770,8 @@ struct Sci_RangeToFormat {
<code><a class="message" href="#SCI_GETDIRECTFUNCTION">SCI_GETDIRECTFUNCTION</a><br />
<a class="message" href="#SCI_GETDIRECTPOINTER">SCI_GETDIRECTPOINTER</a><br />
<a class="message" href="#SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</a><br />
+ <a class="message" href="#SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int position, int rangeLength)</a><br />
+ <a class="message" href="#SCI_GETGAPPOSITION">SCI_GETGAPPOSITION</a><br />
</code>
<p>On Windows, the message-passing scheme used to communicate between the container and
@@ -4815,8 +4817,13 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
pass in the direct pointer associated with the target window.</p>
<p><b id="SCI_GETCHARACTERPOINTER">SCI_GETCHARACTERPOINTER</b><br />
- Move the gap within Scintilla so that the text of the document is stored consecutively
- and ensure there is a NUL character after the text, then return a pointer to the first character.
+ <b id="SCI_GETRANGEPOINTER">SCI_GETRANGEPOINTER(int position, int rangeLength)</b><br />
+ <b id="SCI_GETGAPPOSITION">SCI_GETGAPPOSITION</b><br />
+ Grant temporary direct read-only access to the memory used by Scintilla to store
+ the document.</p>
+ <p><code>SCI_GETCHARACTERPOINTER</code> moves the gap within Scintilla so that the
+ text of the document is stored consecutively
+ and ensure there is a NUL character after the text, then returns a pointer to the first character.
Applications may then pass this to a function that accepts a character pointer such as a regular
expression search or a parser. The pointer should <em>not</em> be written to as that may desynchronize
the internal state of Scintilla.</p>
@@ -4833,6 +4840,15 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){
each replacement then the operation will become O(n^2) rather than O(n). Instead, all
matches should be found and remembered, then all the replacements performed.</p>
+ <p><code>SCI_GETRANGEPOINTER</code> provides direct access to just the
+ range requested. The gap is not moved unless it is within the requested range so this call
+ can be faster than <code>SCI_GETCHARACTERPOINTER</code>.
+ This can be used by application code that is able to act on blocks of text or ranges of lines.</p>
+
+ <p><code>SCI_GETGAPPOSITION</code> returns the current gap position.
+ This is a hint that applications can use to avoid calling <code>SCI_GETRANGEPOINTER</code>
+ with a range that contains the gap and consequent costs of moving the gap.</p>
+
<h2 id="MultipleViews">Multiple views</h2>
<p>A Scintilla window and the document that it displays are separate entities. When you create