aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2009-04-25 00:06:03 +0000
committernyamatongwe <devnull@localhost>2009-04-25 00:06:03 +0000
commit2be2df9859f5665beeeeeefe7fff98bc30dc42ca (patch)
tree1be70a94514df048b99f49c2bd24044a25b9c926
parent418117bbc0f7008a0641c6693bad5bdc823f072d (diff)
downloadscintilla-mirror-2be2df9859f5665beeeeeefe7fff98bc30dc42ca.tar.gz
Moved box folding constants into deprecated category. They have been
documented as deprecated for 3 years.
-rw-r--r--include/Scintilla.h13
-rw-r--r--include/Scintilla.iface12
-rw-r--r--src/Editor.cxx4
3 files changed, 18 insertions, 11 deletions
diff --git a/include/Scintilla.h b/include/Scintilla.h
index 27b4e3795..3d61be26f 100644
--- a/include/Scintilla.h
+++ b/include/Scintilla.h
@@ -398,10 +398,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_FOLDLEVELBASE 0x400
#define SC_FOLDLEVELWHITEFLAG 0x1000
#define SC_FOLDLEVELHEADERFLAG 0x2000
-#define SC_FOLDLEVELBOXHEADERFLAG 0x4000
-#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
-#define SC_FOLDLEVELCONTRACTED 0x10000
-#define SC_FOLDLEVELUNINDENT 0x20000
#define SC_FOLDLEVELNUMBERMASK 0x0FFF
#define SCI_SETFOLDLEVEL 2222
#define SCI_GETFOLDLEVEL 2223
@@ -419,7 +415,6 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam,
#define SC_FOLDFLAG_LINEAFTER_EXPANDED 0x0008
#define SC_FOLDFLAG_LINEAFTER_CONTRACTED 0x0010
#define SC_FOLDFLAG_LEVELNUMBERS 0x0040
-#define SC_FOLDFLAG_BOX 0x0001
#define SCI_SETFOLDFLAGS 2233
#define SCI_ENSUREVISIBLEENFORCEPOLICY 2234
#define SCI_SETTABINDENTS 2260
@@ -871,7 +866,7 @@ struct SCNotification {
}
#endif
-/* Deprecation section listing all API features that are deprecated and will
+/* Deprecation section listing all API features that are deprecated and
* will be removed completely in a future version.
* To enable these features define INCLUDE_DEPRECATED_FEATURES */
@@ -882,6 +877,12 @@ struct SCNotification {
#define CARET_XEVEN 0x08
#define CARET_XJUMPS 0x10
+#define SC_FOLDFLAG_BOX 0x0001
+#define SC_FOLDLEVELBOXHEADERFLAG 0x4000
+#define SC_FOLDLEVELBOXFOOTERFLAG 0x8000
+#define SC_FOLDLEVELCONTRACTED 0x10000
+#define SC_FOLDLEVELUNINDENT 0x20000
+
#define SCN_POSCHANGED 2012
#define SCN_CHECKBRACE 2007
diff --git a/include/Scintilla.iface b/include/Scintilla.iface
index 87783ccc0..5860944de 100644
--- a/include/Scintilla.iface
+++ b/include/Scintilla.iface
@@ -1014,10 +1014,6 @@ enu FoldLevel=SC_FOLDLEVEL
val SC_FOLDLEVELBASE=0x400
val SC_FOLDLEVELWHITEFLAG=0x1000
val SC_FOLDLEVELHEADERFLAG=0x2000
-val SC_FOLDLEVELBOXHEADERFLAG=0x4000
-val SC_FOLDLEVELBOXFOOTERFLAG=0x8000
-val SC_FOLDLEVELCONTRACTED=0x10000
-val SC_FOLDLEVELUNINDENT=0x20000
val SC_FOLDLEVELNUMBERMASK=0x0FFF
# Set the fold level of a line.
@@ -1061,7 +1057,6 @@ val SC_FOLDFLAG_LINEBEFORE_CONTRACTED=0x0004
val SC_FOLDFLAG_LINEAFTER_EXPANDED=0x0008
val SC_FOLDFLAG_LINEAFTER_CONTRACTED=0x0010
val SC_FOLDFLAG_LEVELNUMBERS=0x0040
-val SC_FOLDFLAG_BOX=0x0001
# Set some style options for folding.
fun void SetFoldFlags=2233(int flags,)
@@ -3562,6 +3557,13 @@ val CARET_XJUMPS=0x10
val SCN_CHECKBRACE=2007
evt void PosChanged=2012(int position)
+# Box folding support
+val SC_FOLDFLAG_BOX=0x0001
+val SC_FOLDLEVELBOXHEADERFLAG=0x4000
+val SC_FOLDLEVELBOXFOOTERFLAG=0x8000
+val SC_FOLDLEVELCONTRACTED=0x10000
+val SC_FOLDLEVELUNINDENT=0x20000
+
# SCLEX_HTML should be used in preference to these.
val SCLEX_ASP=29
val SCLEX_PHP=30
diff --git a/src/Editor.cxx b/src/Editor.cxx
index ae2c16137..aa6f0d52e 100644
--- a/src/Editor.cxx
+++ b/src/Editor.cxx
@@ -3102,7 +3102,9 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
ll->RestoreBracesHighlight(rangeLine, braces);
bool expanded = cs.GetExpanded(lineDoc);
+#ifdef INCLUDE_DEPRECATED_FEATURES
if ((foldFlags & SC_FOLDFLAG_BOX) == 0) {
+#endif
// Paint the line above the fold
if ((expanded && (foldFlags & SC_FOLDFLAG_LINEBEFORE_EXPANDED))
||
@@ -3123,6 +3125,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
surface->FillRectangle(rcFoldLine, vs.styles[STYLE_DEFAULT].fore.allocated);
}
}
+#ifdef INCLUDE_DEPRECATED_FEATURES
} else {
int FoldLevelCurr = (pdoc->GetLevel(lineDoc) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
int FoldLevelPrev = (pdoc->GetLevel(lineDoc - 1) & SC_FOLDLEVELNUMBERMASK) - SC_FOLDLEVELBASE;
@@ -3158,6 +3161,7 @@ void Editor::Paint(Surface *surfaceWindow, PRectangle rcArea) {
surface->FillRectangle(rcBoxLine, vs.styles[STYLE_DEFAULT].fore.allocated);
}
}
+#endif
// Draw the Caret
if (lineDoc == lineCaret) {