diff options
author | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-04-22 12:04:49 +0000 |
---|---|---|
committer | XhmikosR <xhmikosr@users.sourceforge.net> | 2011-04-22 12:04:49 +0000 |
commit | 7876d7699e3f321eaa392f69dfb685748938d214 (patch) | |
tree | 37c1dd8a3e5e7d631f5b744db7008e74b388afa5 | |
parent | 0e65071b050165e844bbf7f972e55d9f596fb0e3 (diff) | |
download | notepad2-mod-7876d7699e3f321eaa392f69dfb685748938d214.zip notepad2-mod-7876d7699e3f321eaa392f69dfb685748938d214.tar.gz notepad2-mod-7876d7699e3f321eaa392f69dfb685748938d214.tar.bz2 |
update scintilla
git-svn-id: https://notepad2-mod.googlecode.com/svn/trunk@477 28bd50df-7adb-d945-0439-6e466c6a13cc
-rw-r--r-- | scintilla/include/Scintilla.h | 2 | ||||
-rw-r--r-- | scintilla/include/Scintilla.iface | 6 | ||||
-rw-r--r-- | scintilla/lexers/LexHTML.cxx | 2 | ||||
-rw-r--r-- | scintilla/lexlib/SparseState.h | 4 | ||||
-rw-r--r-- | scintilla/src/Editor.cxx | 10 | ||||
-rw-r--r-- | scintilla/src/Indicator.cxx | 2 | ||||
-rw-r--r-- | scintilla/src/Indicator.h | 3 |
7 files changed, 24 insertions, 5 deletions
diff --git a/scintilla/include/Scintilla.h b/scintilla/include/Scintilla.h index 1f07bbe..a4ccd40 100644 --- a/scintilla/include/Scintilla.h +++ b/scintilla/include/Scintilla.h @@ -709,6 +709,8 @@ typedef sptr_t (*SciFnDirect)(sptr_t ptr, unsigned int iMessage, uptr_t wParam, #define SCI_GETKEYSUNICODE 2522
#define SCI_INDICSETALPHA 2523
#define SCI_INDICGETALPHA 2524
+#define SCI_INDICSETOUTLINEALPHA 2558
+#define SCI_INDICGETOUTLINEALPHA 2559
#define SCI_SETEXTRAASCENT 2525
#define SCI_GETEXTRAASCENT 2526
#define SCI_SETEXTRADESCENT 2527
diff --git a/scintilla/include/Scintilla.iface b/scintilla/include/Scintilla.iface index 805c0ea..5f900d0 100644 --- a/scintilla/include/Scintilla.iface +++ b/scintilla/include/Scintilla.iface @@ -1890,6 +1890,12 @@ set void IndicSetAlpha=2523(int indicator, int alpha) # Get the alpha fill colour of the given indicator.
get int IndicGetAlpha=2524(int indicator,)
+# Set the alpha outline colour of the given indicator.
+set void IndicSetOutlineAlpha=2558(int indicator, int alpha)
+
+# Get the alpha outline colour of the given indicator.
+get int IndicGetOutlineAlpha=2559(int indicator,)
+
# Set extra ascent for each line
set void SetExtraAscent=2525(int extraAscent,)
diff --git a/scintilla/lexers/LexHTML.cxx b/scintilla/lexers/LexHTML.cxx index 242a37d..258a248 100644 --- a/scintilla/lexers/LexHTML.cxx +++ b/scintilla/lexers/LexHTML.cxx @@ -755,7 +755,7 @@ static void ColouriseHyperTextDoc(unsigned int startPos, int length, int initSty levelCurrent--;
}
} else if ((ch == '{') || (ch == '}') || (foldComment && (ch == '/') && (chNext == '*')) ) {
- levelCurrent += ((ch == '{') || (ch == '/') ) ? 1 : -1;
+ levelCurrent += (((ch == '{') || (ch == '/') ) ? 1 : -1);
}
} else if (((state == SCE_HPHP_COMMENT) || (state == SCE_HJ_COMMENT)) && foldComment && (ch == '*') && (chNext == '/')) {
levelCurrent--;
diff --git a/scintilla/lexlib/SparseState.h b/scintilla/lexlib/SparseState.h index 2dff071..4939f1c 100644 --- a/scintilla/lexlib/SparseState.h +++ b/scintilla/lexlib/SparseState.h @@ -43,12 +43,12 @@ public: }
void Set(int position, T value) {
Delete(position);
- if ((states.size() == 0) || (value != states[states.size()-1].value)) {
+ if (states.empty() || (value != states[states.size()-1].value)) {
states.push_back(State(position, value));
}
}
T ValueAt(int position) {
- if (!states.size())
+ if (states.empty())
return T();
if (position < states[0].position)
return T();
diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index 7528483..e2d7d31 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -8229,6 +8229,16 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_INDICGETALPHA:
return (wParam <= INDIC_MAX) ? vs.indicators[wParam].fillAlpha : 0;
+ case SCI_INDICSETOUTLINEALPHA:
+ if (wParam <= INDIC_MAX && lParam >=0 && lParam <= 255) {
+ vs.indicators[wParam].outlineAlpha = lParam;
+ InvalidateStyleRedraw();
+ }
+ break;
+
+ case SCI_INDICGETOUTLINEALPHA:
+ return (wParam <= INDIC_MAX) ? vs.indicators[wParam].outlineAlpha : 0;
+
case SCI_SETINDICATORCURRENT:
pdoc->decorations.SetCurrentIndicator(wParam);
break;
diff --git a/scintilla/src/Indicator.cxx b/scintilla/src/Indicator.cxx index 17c60fc..4657acb 100644 --- a/scintilla/src/Indicator.cxx +++ b/scintilla/src/Indicator.cxx @@ -72,7 +72,7 @@ void Indicator::Draw(Surface *surface, const PRectangle &rc, const PRectangle &r rcBox.top = rcLine.top + 1;
rcBox.left = rc.left;
rcBox.right = rc.right;
- surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, 50, 0);
+ surface->AlphaRectangle(rcBox, 1, fore.allocated, fillAlpha, fore.allocated, outlineAlpha, 0);
} else { // Either INDIC_PLAIN or unknown
surface->MoveTo(rc.left, ymid);
surface->LineTo(rc.right, ymid);
diff --git a/scintilla/src/Indicator.h b/scintilla/src/Indicator.h index 4af686b..f320b80 100644 --- a/scintilla/src/Indicator.h +++ b/scintilla/src/Indicator.h @@ -20,7 +20,8 @@ public: bool under;
ColourPair fore;
int fillAlpha;
- Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30) {
+ int outlineAlpha;
+ Indicator() : style(INDIC_PLAIN), under(false), fore(ColourDesired(0,0,0)), fillAlpha(30), outlineAlpha(50) {
}
void Draw(Surface *surface, const PRectangle &rc, const PRectangle &rcLine);
};
|