From 341e163afa67923ca42e083d176c726ea5ed5d3e Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Sun, 21 Apr 2013 16:13:28 +1000 Subject: Implement commonly needed folding methods based on code from SciTE. --- doc/ScintillaDoc.html | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) (limited to 'doc/ScintillaDoc.html') diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index 44b7449b7..9621ea19e 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -5183,6 +5183,10 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ SCI_GETFOLDEXPANDED(int line)
SCI_CONTRACTEDFOLDNEXT(int lineStart)
SCI_TOGGLEFOLD(int line)
+ SCI_FOLDLINE(int line, int action)
+ SCI_FOLDCHILDREN(int line, int action)
+ SCI_FOLDALL(int action)
+ SCI_EXPANDCHILDREN(int line, int level)
SCI_ENSUREVISIBLE(int line)
SCI_ENSUREVISIBLEENFORCEPOLICY(int line)
@@ -5340,6 +5344,56 @@ sptr_t CallScintilla(unsigned int iMessage, uptr_t wParam, sptr_t lParam){ until you had finished. See SciTEBase::FoldAll() and SciTEBase::Expand() for examples of the use of these messages.

+

SCI_FOLDLINE(int line, int action)
+ SCI_FOLDCHILDREN(int line, int action)
+ SCI_FOLDALL(int action)
+ These messages provide a higher-level approach to folding instead of setting expanded flags and showing + or hiding individual lines.

+

An individual fold can be contracted/expanded/toggled with SCI_FOLDLINE. + To affect all child folds as well call SCI_FOLDCHILDREN.

+

To affect the entire document call SCI_FOLDALL. With SC_FOLDACTION_TOGGLE + the first fold header in the document is examined to decide whether to expand or contract. +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SymbolValueEffect
SC_FOLDACTION_CONTRACT0Contract.
SC_FOLDACTION_EXPAND1Expand.
SC_FOLDACTION_TOGGLE2Toggle between contracted and expanded.
+

+ +

SCI_EXPANDCHILDREN(int line, int level)
+ This is used to respond to a change to a line causing its fold level or whether it is a header to change, + perhaps when adding or removing a '{'.

+

By the time the container has received the notification that the line has changed, + the fold level has already been set, so the container has to use the previous level in this call + so that any range hidden underneath this line can be shown. +

+

SCI_CONTRACTEDFOLDNEXT(int lineStart)
Search efficiently for lines that are contracted fold headers. This is useful when saving the user's folding when switching documents or saving folding with a file. -- cgit v1.2.3