Update Scintilla from 3.5.2 to 3.5.5

This commit is contained in:
ARATA Mizuki
2015-04-25 23:49:22 +09:00
committed by Vadim Zeitlin
parent 4ce52bc7a2
commit 28e80e5b58
52 changed files with 3372 additions and 966 deletions

View File

@@ -449,6 +449,7 @@ void wxStyledTextCtrl::SetAnchor(int posAnchor)
// Retrieve the text of the line containing the caret.
// Returns the index of the caret on the line.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetCurLine(int* linePos) {
int len = LineLength(GetCurrentLine());
if (!len) {
@@ -1069,6 +1070,43 @@ bool wxStyledTextCtrl::IndicatorGetUnder(int indic) const
return SendMsg(SCI_INDICGETUNDER, indic, 0) != 0;
}
// Set a hover indicator to plain, squiggle or TT.
void wxStyledTextCtrl::IndicatorSetHoverStyle(int indic, int style)
{
SendMsg(SCI_INDICSETHOVERSTYLE, indic, style);
}
// Retrieve the hover style of an indicator.
int wxStyledTextCtrl::IndicatorGetHoverStyle(int indic) const
{
return SendMsg(SCI_INDICGETHOVERSTYLE, indic, 0);
}
// Set the foreground hover colour of an indicator.
void wxStyledTextCtrl::IndicatorSetHoverForeground(int indic, const wxColour& fore)
{
SendMsg(SCI_INDICSETHOVERFORE, indic, wxColourAsLong(fore));
}
// Retrieve the foreground hover colour of an indicator.
wxColour wxStyledTextCtrl::IndicatorGetHoverForeground(int indic) const
{
long c = SendMsg(SCI_INDICGETHOVERFORE, indic, 0);
return wxColourFromLong(c);
}
// Set the attributes of an indicator.
void wxStyledTextCtrl::IndicatorSetFlags(int indic, int flags)
{
SendMsg(SCI_INDICSETFLAGS, indic, flags);
}
// Retrieve the attributes of an indicator.
int wxStyledTextCtrl::IndicatorGetFlags(int indic) const
{
return SendMsg(SCI_INDICGETFLAGS, indic, 0);
}
// Set the foreground colour of all whitespace and whether to use this setting.
void wxStyledTextCtrl::SetWhitespaceForeground(bool useSetting, const wxColour& fore)
{
@@ -1833,6 +1871,24 @@ int wxStyledTextCtrl::GetTargetEnd() const
return SendMsg(SCI_GETTARGETEND, 0, 0);
}
// Sets both the start and end of the target in one call.
void wxStyledTextCtrl::SetTargetRange(int start, int end)
{
SendMsg(SCI_SETTARGETRANGE, start, end);
}
// Retrieve the text in the target.
wxString wxStyledTextCtrl::GetTargetText() const {
int startPos = GetTargetStart();
int endPos = GetTargetEnd();
wxMemoryBuffer mbuf(endPos-startPos+1); // leave room for the null...
char* buf = (char*)mbuf.GetWriteBuf(endPos-startPos+1);
SendMsg(SCI_GETTARGETTEXT, 0, (sptr_t)buf);
mbuf.UngetWriteBuf(endPos-startPos);
mbuf.AppendByte(0);
return stc2wx(buf);
}
// Replace the target text with the argument text.
// Text is counted so it can contain NULs.
// Returns the length of the replacement text.
@@ -2320,6 +2376,7 @@ int wxStyledTextCtrl::GetMultiPaste() const
}
// Retrieve the value of a tag from a regular expression search.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetTag(int tagNumber) const {
const int msg = SCI_GETTAG;
int len = SendMsg(msg, tagNumber, (sptr_t)NULL);
@@ -3531,18 +3588,6 @@ int wxStyledTextCtrl::GetGapPosition() const
return SendMsg(SCI_GETGAPPOSITION, 0, 0);
}
// Always interpret keyboard input as Unicode
void wxStyledTextCtrl::SetKeysUnicode(bool keysUnicode)
{
SendMsg(SCI_SETKEYSUNICODE, keysUnicode, 0);
}
// Are keys always interpreted as Unicode?
bool wxStyledTextCtrl::GetKeysUnicode() const
{
return SendMsg(SCI_GETKEYSUNICODE, 0, 0) != 0;
}
// Set the alpha fill colour of the given indicator.
void wxStyledTextCtrl::IndicatorSetAlpha(int indicator, int alpha)
{
@@ -4211,6 +4256,7 @@ void wxStyledTextCtrl::SetRepresentation(const wxString& encodedCharacter, const
}
// Set the way a character is drawn.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetRepresentation(const wxString& encodedCharacter) const {
int msg = SCI_GETREPRESENTATION;
int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(encodedCharacter), (sptr_t)NULL);
@@ -4324,6 +4370,7 @@ void* wxStyledTextCtrl::PrivateLexerCall(int operation, void* pointer) {
}
// Retrieve a '\n' separated list of properties understood by the current lexer.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::PropertyNames() const {
const int msg = SCI_PROPERTYNAMES;
int len = SendMsg(msg, 0, (sptr_t)NULL);
@@ -4344,6 +4391,7 @@ int wxStyledTextCtrl::PropertyType(const wxString& name)
}
// Describe a property.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const {
const int msg = SCI_DESCRIBEPROPERTY;
int len = SendMsg(msg, (sptr_t)(const char*)wx2stc(name), (sptr_t)NULL);
@@ -4358,6 +4406,7 @@ wxString wxStyledTextCtrl::DescribeProperty(const wxString& name) const {
}
// Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
// Result is NUL-terminated.
wxString wxStyledTextCtrl::DescribeKeyWordSets() const {
const int msg = SCI_DESCRIBEKEYWORDSETS;
int len = SendMsg(msg, 0, (sptr_t)NULL);
@@ -4428,6 +4477,7 @@ int wxStyledTextCtrl::DistanceToSecondaryStyles() const
}
// Get the set of base styles that can be extended with sub styles
// Result is NUL-terminated.
wxString wxStyledTextCtrl::GetSubStyleBases() const {
int msg = SCI_GETSUBSTYLEBASES;
int len = SendMsg(msg, 0, (sptr_t)NULL);
@@ -5380,7 +5430,7 @@ wxStyledTextEvent::wxStyledTextEvent(const wxStyledTextEvent& event):
/*static*/ wxVersionInfo wxStyledTextCtrl::GetLibraryVersionInfo()
{
return wxVersionInfo("Scintilla", 3, 5, 2, "Scintilla 3.5.2");
return wxVersionInfo("Scintilla", 3, 5, 5, "Scintilla 3.5.5");
}
#endif // wxUSE_STC