diff --git a/PythonScript/project/PythonScript2010.vcxproj b/PythonScript/project/PythonScript2010.vcxproj
index ff30fcea..ba6af2d9 100644
--- a/PythonScript/project/PythonScript2010.vcxproj
+++ b/PythonScript/project/PythonScript2010.vcxproj
@@ -399,7 +399,6 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py
CppHeader
-
Document
@@ -489,7 +488,6 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py
-
diff --git a/PythonScript/project/PythonScript2010.vcxproj.filters b/PythonScript/project/PythonScript2010.vcxproj.filters
index 5e05c978..717324d7 100644
--- a/PythonScript/project/PythonScript2010.vcxproj.filters
+++ b/PythonScript/project/PythonScript2010.vcxproj.filters
@@ -46,7 +46,6 @@
PythonTests
-
PythonTests\Tests
@@ -129,7 +128,7 @@
Source Files
- Header Files
+ Source Files
Source Files
@@ -202,9 +201,6 @@
Header Files
-
- Header Files
-
Header Files
@@ -293,7 +289,7 @@
Header Files
- Source Files
+ Header Files
PythonTests
@@ -326,7 +322,7 @@
PythonTests\Tests
- Source Files
+ Header Files
PythonTests\Tests
@@ -368,13 +364,13 @@
PythonTests\Tests
- Source Files
+ Header Files
Header Files
- Source Files
+ Header Files
Header Files
diff --git a/PythonScript/src/AboutDialog2.cpp b/PythonScript/src/AboutDialog2.cpp
index e7e3d111..db72ff11 100644
--- a/PythonScript/src/AboutDialog2.cpp
+++ b/PythonScript/src/AboutDialog2.cpp
@@ -50,13 +50,13 @@ INT_PTR CALLBACK AboutDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*
}
case WM_CTLCOLORDLG:
- return (LONG)m_hbrBackground;
+ return (INT_PTR)m_hbrBackground;
case WM_CTLCOLORSTATIC:
{
HDC hdcStatic = (HDC)wParam;
SetBkMode(hdcStatic, TRANSPARENT);
- return (LONG)m_hbrBackground;
+ return (INT_PTR)m_hbrBackground;
}
case WM_COMMAND :
diff --git a/PythonScript/src/ConsoleDialog.cpp b/PythonScript/src/ConsoleDialog.cpp
index 2584e20e..eddc9106 100644
--- a/PythonScript/src/ConsoleDialog.cpp
+++ b/PythonScript/src/ConsoleDialog.cpp
@@ -253,14 +253,14 @@ void ConsoleDialog::historyPrevious()
{
size_t length = GetWindowTextLength(m_hInput);
TCHAR *buffer = new TCHAR[length + 1];
- GetWindowText(m_hInput, buffer, length + 1);
+ GetWindowText(m_hInput, buffer, (int)length + 1);
// Not an empty string and different from orig
if (buffer[0] && (m_historyIter == m_history.end() || *m_historyIter != buffer))
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
- m_changes.insert(std::pair(m_currentHistory, tstring(buffer)));
+ m_changes.insert(std::pair(m_currentHistory, tstring(buffer)));
}
else
{
@@ -302,7 +302,7 @@ void ConsoleDialog::historyNext()
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
- m_changes.insert(std::pair(m_currentHistory, tstring(buffer)));
+ m_changes.insert(std::pair(m_currentHistory, tstring(buffer)));
}
else
{
@@ -413,9 +413,9 @@ void ConsoleDialog::runStatement()
{
HWND hText = ::GetDlgItem(_hSelf, IDC_INPUT);
- size_t length = GetWindowTextLengthW(hText);
+ size_t length = GetWindowTextLength(hText);
TCHAR *buffer = new TCHAR[length + 1];
- GetWindowText(hText, buffer, length + 1);
+ GetWindowText(hText, buffer, (int)length + 1);
historyAdd(buffer);
std::shared_ptr charBuffer = WcharMbcsConverter::tchar2char(buffer);
delete [] buffer;
@@ -450,7 +450,7 @@ void ConsoleDialog::createOutputWindow(HWND hParentWindow)
{
m_scintilla = (HWND)::SendMessage(_hParent, NPPM_CREATESCINTILLAHANDLE, 0, reinterpret_cast(hParentWindow));
- LONG currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
+ LONG_PTR currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
SetWindowLongPtr(m_scintilla, GWL_STYLE, currentStyle | WS_TABSTOP);
diff --git a/PythonScript/src/ConstString.h b/PythonScript/src/ConstString.h
index 89aa7504..d056e6e2 100644
--- a/PythonScript/src/ConstString.h
+++ b/PythonScript/src/ConstString.h
@@ -12,7 +12,7 @@
template
class ConstString {
public:
- typedef unsigned int size_type;
+ typedef size_t size_type;
ConstString() : _length(0), _str(0) { }
ConstString(const CharT* str, size_type length) : _length(length), _str(str) { }
ConstString(const ConstString& source) {
@@ -52,10 +52,10 @@ class ConstString {
template
bool operator==(const ConstString& a, const ConstString& b)
{
- unsigned int a_length = a.length();
+ size_t a_length = a.length();
if (a_length != b.length())
return false;
- for (unsigned int i = 0; i < a_length; i++)
+ for (size_t i = 0; i < a_length; i++)
if (a[i] != b[i])
return false;
return true;
diff --git a/PythonScript/src/CreateWrapper.py b/PythonScript/src/CreateWrapper.py
index f90bae6f..e555a815 100644
--- a/PythonScript/src/CreateWrapper.py
+++ b/PythonScript/src/CreateWrapper.py
@@ -17,7 +17,7 @@
# SetWrapMode - modes
# SetLengthForEncode, TargetAsUTF8 - these want wrapping up, and excluding
# CreateDocument etc, move to advanced?
-# Return PyNone in FindText
+# Return PyNone in FindText
# DONE - excluded Type: formatrange
# DONE Type: textrange
@@ -32,45 +32,45 @@
types = {
'string' : 'boost::python::object',
- 'position' : 'int',
- 'cells' : 'ScintillaCells',
+ 'position' : 'int',
+ 'cells' : 'ScintillaCells',
'colour' : 'boost::python::tuple',
- 'keymod' : 'int' # Temporary hack - need this to be a real type
+ 'keymod' : 'int', # Temporary hack - need this to be a real type
}
castsL = {
- 'boost::python::object' : lambda name: "reinterpret_cast(string" + name + ".c_str())",
+ 'boost::python::object' : lambda name: "reinterpret_cast(string%s.c_str())" % name,
# Hack - assume a tuple is a colour
- 'boost::python::tuple': lambda name: "static_cast(rgb" + name + ")".format(name)
+ 'boost::python::tuple': lambda name: "static_cast(rgb%s)" % name
}
castsW = {
- 'boost::python::object' : lambda name: "reinterpret_cast(string" + name + ".c_str())",
+ 'boost::python::object' : lambda name: "reinterpret_cast(string%s.c_str())" % name,
# Hack - assume a tuple is a colour
- 'boost::python::tuple': lambda name: "static_cast(rgb" + name + ")".format(name)
-}
+ 'boost::python::tuple': lambda name: "static_cast(rgb%s)" % name
+}
castsRet = {
- 'bool' : lambda val: 'return 0 != (' + val + ')',
- 'boost::python::tuple': lambda val: 'int retVal = (int)' + val + ';\n' + '\treturn boost::python::make_tuple(COLOUR_RED(retVal), COLOUR_GREEN(retVal), COLOUR_BLUE(retVal))'
+ 'bool' : lambda val: 'return 0 != (%s)' % val,
+ 'boost::python::tuple': lambda val: 'int retVal = (int)%s;\n\treturn boost::python::make_tuple(COLOUR_RED(retVal), COLOUR_GREEN(retVal), COLOUR_BLUE(retVal))' % val
}
-# Must be kept in sync with pythonTypeExplosions
+# Must be kept in sync with pythonTypeExplosions
typeExplosions = {
#'colour' : lambda name: 'int {0}Red, int {0}Green, int {0}Blue'.format(name),
- 'findtext' : lambda name: 'int start, int end, boost::python::object {0}'.format(name),
+ 'findtext' : lambda name: 'int start, int end, boost::python::object %s' % name,
'textrange' : lambda name: 'int start, int end'
}
# Must be kept in sync with typeExplosions
pythonTypeExplosions = {
#'colour' : lambda name: 'int {0}Red, int {0}Green, int {0}Blue'.format(name),
- 'findtext' : lambda name: 'start, end, {0}'.format(name),
+ 'findtext' : lambda name: 'start, end, %s' % name,
'textrange' : lambda name: 'start, end'
}
withGilConversions = {
- 'boost::python::object' : lambda name: '\tstd::string string{0} = getStringFromObject({0});\n'.format(name),
+ 'boost::python::object' : lambda name: '\tstd::string string{0} = getStringFromObject({0});\n'.format(name),
'boost::python::tuple' : lambda name: '\tCOLORREF rgb{0} = MAKECOLOUR({0});\n'.format(name),
}
@@ -104,47 +104,53 @@ def withGilParam(out, type, name):
def checkDisallowedInCallback(v, out):
disallowedMessage = disallowedInCallback.get(v['Name'], None)
if disallowedMessage:
- out.write('\tnotAllowedInCallback("{0} is not allowed in a synchronous callback. {1}");\n'.format(formatPythonName(v['Name']), disallowedMessage))
+ out.write(''' notAllowedInCallback("{0} is not allowed in a synchronous callback. {1}");\n'''.format(formatPythonName(v['Name']), disallowedMessage))
def traceCall(v, out):
- out.write('\tDEBUG_TRACE(L"ScintillaWrapper::{}\\n");\n'.format(v['Name']))
+ out.write(''' DEBUG_TRACE(L"ScintillaWrapper::{}\\n");\n'''.format(v['Name']))
def cellsBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write("\treturn callScintilla(" + symbolName(v) + ", " + v["Param2Name"] + ".length(), reinterpret_cast(" + v["Param2Name"] + ".cells()));\n")
-
+ out.write(''' return callScintilla({0}, {1}.length(), reinterpret_cast({1}.cells()));\n'''.format(symbolName(v),v["Param2Name"]))
+
def constString(v, out):
#out.write("\tconst char *raw = boost::python::extract(" + v["Param2Name"] + ".attr(\"__str__\")());\n")
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write("\tstd::string s = getStringFromObject({0});\n".format(v["Param2Name"]))
- out.write("\treturn callScintilla(" + symbolName(v) + ", s.size(), reinterpret_cast(s.c_str()));\n");
-
+ out.write(
+''' std::string s = getStringFromObject({0});
+ return callScintilla({1}, s.size(), reinterpret_cast(s.c_str()));
+'''.format(v["Param2Name"], symbolName(v)))
+
def retString(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write("\tPythonCompatibleStrBuffer result(callScintilla(" + symbolName(v) + ") + 1);\n")
- out.write("\t// result.size() does not depend on the order of evaluation here\n")
- out.write("\t//lint -e{864}\n")
- out.write("\tcallScintilla(" + symbolName(v) + ", result.size(), reinterpret_cast(*result));\n")
- out.write("\treturn boost::python::str(result.c_str());\n")
+ out.write(
+''' PythonCompatibleStrBuffer result(callScintilla({0}) + 1);
+ // result.size() does not depend on the order of evaluation here
+ //lint -e{{864}}
+ callScintilla({0}, result.size(), reinterpret_cast(*result));
+ return boost::python::str(result.c_str());
+'''.format(symbolName(v)))
def getLineBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write("\tint lineCount = callScintilla(SCI_GETLINECOUNT);\n")
- out.write("\tif (line >= lineCount)\n")
- out.write("\t{\n")
- out.write("\t\tthrow out_of_bounds_exception();\n")
- out.write("\t}\n")
- out.write("\telse\n")
- out.write("\t{\n")
- out.write("\t\tPythonCompatibleStrBuffer result(callScintilla(SCI_LINELENGTH, line));\n")
- out.write("\t\tcallScintilla(" + symbolName(v) + ", line, reinterpret_cast(*result));\n")
- out.write("\t\treturn boost::python::str(result.c_str());\n")
- out.write("\t}\n")
-
+ out.write(
+''' intptr_t lineCount = callScintilla(SCI_GETLINECOUNT);
+ if (line >= lineCount)
+ {{
+ throw out_of_bounds_exception();
+ }}
+ else
+ {{
+ PythonCompatibleStrBuffer result(callScintilla(SCI_LINELENGTH, line));
+ callScintilla({0}, line, reinterpret_cast(*result));
+ return boost::python::str(result.c_str());
+ }}
+'''.format(symbolName(v)))
+
def retStringNoLength(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
@@ -158,9 +164,9 @@ def retStringNoLength(v, out):
out.write(v["Param2Name"]);
out.write("));\n")
-
+
out.write("\tcallScintilla(" + symbolName(v) + ", ")
-
+
if v["Param1Type"] or v["Param2Type"]:
if v["Param1Type"]:
out.write(v["Param1Name"]);
@@ -176,94 +182,115 @@ def retStringNoLength(v, out):
def retStringFromKey(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write('\tstd::string keyString = getStringFromObject({0});\n'.format(v["Param1Name"]))
-
- out.write("\tPythonCompatibleStrBuffer result(callScintilla({0}, reinterpret_cast(keyString.c_str()), 0));\n".format(symbolName(v)))
-
- out.write("\tcallScintilla({0}, reinterpret_cast(keyString.c_str()), reinterpret_cast(*result));\n".format(symbolName(v)))
-
- out.write("\treturn boost::python::str(result.c_str());\n")
-
+ out.write(
+''' std::string keyString = getStringFromObject({0});
+ PythonCompatibleStrBuffer result(callScintilla({1}, reinterpret_cast(keyString.c_str()), 0));
+ callScintilla({1}, reinterpret_cast(keyString.c_str()), reinterpret_cast(*result));
+ return boost::python::str(result.c_str());
+'''.format(v["Param1Name"], symbolName(v)))
+
+def retStringFromEnc(v, out):
+ traceCall(v, out)
+ checkDisallowedInCallback(v, out)
+ out.write(
+''' std::string encString = getStringFromObject({0});
+ PythonCompatibleStrBuffer result(callScintilla({1}, reinterpret_cast(encString.c_str()), 0));
+ callScintilla({1}, reinterpret_cast(encString.c_str()), reinterpret_cast(*result));
+ return boost::python::str(result.c_str());
+'''.format(v["Param1Name"], symbolName(v)))
def findTextBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write('\tstd::string search = getStringFromObject({0});\n'.format(v['Param2Name']))
- out.write('\tSci_TextToFind src;\n')
- out.write('\tsrc.chrg.cpMin = start;\n')
- out.write('\tsrc.chrg.cpMax = end;\n')
- out.write('\t// We assume findText won\'t write to this buffer - it should be const\n')
- out.write('\tsrc.lpstrText = const_cast(search.c_str());\n')
- out.write('\tint result = callScintilla({0}, {1}, reinterpret_cast(&src));\n'.format(symbolName(v), v["Param1Name"]))
- out.write('\tif (-1 == result)\n')
- out.write('\t{\n\t\treturn boost::python::object();\n\t}\n')
- out.write('\telse\n\t{\n\t\treturn boost::python::make_tuple(src.chrgText.cpMin, src.chrgText.cpMax);\n\t}\n')
-
+ out.write(
+''' std::string search = getStringFromObject({0});
+ Sci_TextToFind src;
+ src.chrg.cpMin = start;
+ src.chrg.cpMax = end;
+ // We assume findText won\'t write to this buffer - it should be const
+ src.lpstrText = const_cast(search.c_str());
+ intptr_t result = callScintilla({1}, {2}, reinterpret_cast(&src));
+ if (-1 == result)
+ {{
+ return boost::python::object();
+ }}
+ else
+ {{
+ return boost::python::make_tuple(src.chrgText.cpMin, src.chrgText.cpMax);
+ }}
+'''.format(v['Param2Name'], symbolName(v), v["Param1Name"]))
+
def getTextRangeBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write('\tSci_TextRange src;\n')
- out.write('\tif (end == -1)\n')
- out.write('\t{\n')
- out.write('\t\tend = GetLength();\n')
- out.write('\t}\n')
- out.write('\n')
- out.write('\tif (end < start)\n')
- out.write('\t{\n')
- out.write('\t\tint temp = start;\n')
- out.write('\t\tstart = end;\n')
- out.write('\t\tend = temp;\n')
- out.write('\t}\n')
- out.write("\tPythonCompatibleStrBuffer result((end-start) + 1);\n")
- out.write('\tsrc.chrg.cpMin = start;\n')
- out.write('\tsrc.chrg.cpMax = end;\n')
- out.write('\tsrc.lpstrText = *result;\n')
- out.write('\tcallScintilla({0}, 0, reinterpret_cast(&src));\n'.format(symbolName(v)))
- out.write('\treturn boost::python::str(result.c_str());\n')
-
+ out.write(
+''' Sci_TextRange src;
+ if (end == -1)
+ {{
+ end = GetLength();
+ }}
+
+ if (end < start)
+ {{
+ int temp = start;
+ start = end;
+ end = temp;
+ }}
+ PythonCompatibleStrBuffer result((end-start) + 1);
+ src.chrg.cpMin = start;
+ src.chrg.cpMax = end;
+ src.lpstrText = *result;
+ callScintilla({0}, 0, reinterpret_cast(&src));
+ return boost::python::str(result.c_str());
+'''.format(symbolName(v)))
+
def getStyledTextBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write('\tSci_TextRange src;\n')
- out.write('\tif (end < start)\n')
- out.write('\t{\n')
- out.write('\t\tint temp = start;\n')
- out.write('\t\tstart = end;\n')
- out.write('\t\tend = temp;\n')
- out.write('\t}\n')
- out.write('\tsrc.chrg.cpMin = start;\n')
- out.write('\tsrc.chrg.cpMax = end;\n')
- out.write('\tsrc.lpstrText = new char[size_t(((end-start) * 2) + 2)];\n')
- out.write('\tcallScintilla({0}, 0, reinterpret_cast(&src));\n'.format(symbolName(v)))
- out.write('\tboost::python::list styles;\n')
- out.write("\tPythonCompatibleStrBuffer result(end-start);\n")
- out.write('\tfor(idx_t pos = 0; pos < result.size() - 1; pos++)\n')
- out.write('\t{\n')
- out.write('\t\t(*result)[pos] = src.lpstrText[pos * 2];\n')
- out.write('\t\tstyles.append((int)(src.lpstrText[(pos * 2) + 1]));\n')
- out.write('\t}\n')
- out.write('\tboost::python::str resultStr(result.c_str());\n')
- out.write('\tdelete [] src.lpstrText;\n')
- out.write('\treturn boost::python::make_tuple(resultStr, styles);\n')
+ out.write(
+''' Sci_TextRange src;
+ if (end < start)
+ {{
+ int temp = start;
+ start = end;
+ end = temp;
+ }}
+ src.chrg.cpMin = start;
+ src.chrg.cpMax = end;
+ src.lpstrText = new char[size_t(((end-start) * 2) + 2)];
+ callScintilla({0}, 0, reinterpret_cast(&src));
+ boost::python::list styles;
+ PythonCompatibleStrBuffer result(end-start);
+ for(idx_t pos = 0; pos < result.size() - 1; pos++)
+ {{
+ (*result)[pos] = src.lpstrText[pos * 2];
+ styles.append((int)(src.lpstrText[(pos * 2) + 1]));
+ }}
+ boost::python::str resultStr(result.c_str());
+ delete [] src.lpstrText;
+ return boost::python::make_tuple(resultStr, styles);
+'''.format(symbolName(v)))
def annotationSetTextBody(v, out):
traceCall(v, out)
checkDisallowedInCallback(v, out)
- out.write('\tconst char *newText;\n')
- out.write('\tstd::string s;\n')
- out.write('\tif ({0}.is_none())\n'.format(v["Param2Name"]))
- out.write('\t{\n')
- out.write('\t\tnewText = NULL;\n')
- out.write('\t}\n')
- out.write('\telse\n')
- out.write('\t{\n')
- out.write("\t\ts = getStringFromObject({0});\n".format(v["Param2Name"]))
- out.write('\t\tnewText = s.c_str();\n')
- out.write('\t}\n')
- out.write("\tcallScintilla({0}, static_cast({1}), reinterpret_cast(newText));\n".format(symbolName(v), v["Param1Name"]));
+ out.write(
+''' const char *newText;
+ std::string s;
+ if ({0}.is_none())
+ {{
+ newText = NULL;
+ }}
+ else
+ {{
+ s = getStringFromObject({1});
+ newText = s.c_str();
+ }}
+ callScintilla({2}, static_cast({3}), reinterpret_cast(newText));
+'''.format(v["Param2Name"], v["Param2Name"], symbolName(v), v["Param1Name"]))
def standardBody(v, out):
- # We always release the GIL. For standard getters, this shouldn't really be necessary.
+ # We always release the GIL. For standard getters, this shouldn't really be necessary.
# However, it doesn't appear to affect performance to dramatically (yet!), so we'll leave it in until
# we need to optimise.
traceCall(v, out)
@@ -275,33 +302,28 @@ def standardBody(v, out):
if v["Param2Type"] != '' and v["Param1Type"] == '':
call += ', 0'
-
+
if v["Param1Type"]:
call += ', ' + castWparam(v["Param1Type"], v["Param1Name"])
-
+
if v["Param2Type"]:
call += ', ' + castLparam(v["Param2Type"], v["Param2Name"])
call += ")"
-
- if (v["ReturnType"] != 'void'):
- out.write('\t')
- out.write(castReturn(v["ReturnType"], call))
- else:
- out.write('\t' + call)
- out.write(";\n")
-
+ out.write('\t{0};\n'.format(castReturn(v["ReturnType"], call) if (v["ReturnType"] != 'void') else call))
+
+
def mapType(t):
return types.get(t, t)
-
+
def mapCompare(t, s):
if (t == s or t == '' or (t is None and s == '')):
return True
else:
return False
-
+
def mapSignature(s):
-
+
for t in argumentMap:
if mapCompare(t[0], s[0]) and mapCompare(t[1], s[1]) and mapCompare(t[2], s[2]) and mapCompare(t[3], s[3]):
return t[4]
@@ -309,33 +331,33 @@ def mapSignature(s):
# Explodes a type to more parameters - e.g. colour
def explodeType(ty, name):
- return typeExplosions.get(ty, lambda name: ty + " " + name)(name)
+ return typeExplosions.get(ty, lambda name: ty + " " + name)(name)
def explodePythonType(ty, name):
- return pythonTypeExplosions.get(ty, lambda name: name)(name)
+ return pythonTypeExplosions.get(ty, lambda name: name)(name)
def writeParams(param1Type, param1Name, param2Type, param2Name):
retVal = ""
if param1Type:
retVal += explodeType(param1Type, param1Name)
-
+
if param2Type:
retVal += ', '
if param2Type:
retVal += explodeType(param2Type, param2Name)
-
+
return retVal
def writePythonParams(param1Type, param1Name, param2Type, param2Name):
retVal = ""
if param1Type:
retVal += explodePythonType(param1Type, param1Name)
-
+
if param2Type:
retVal += ', '
if param2Type:
retVal += explodePythonType(param2Type, param2Name)
-
+
return retVal
def getPythonParamNamesQuoted(param1Type, param1Name, param2Type, param2Name):
@@ -343,7 +365,7 @@ def getPythonParamNamesQuoted(param1Type, param1Name, param2Type, param2Name):
if mappedSig:
param1Type = mappedSig[1]
param2Type = mappedSig[2]
-
+
pythonParams = writePythonParams(param1Type, param1Name, param2Type, param2Name)
quotedParams = ", ".join(['"' + p.strip() + '"' for p in pythonParams.split(',')])
@@ -351,20 +373,21 @@ def getPythonParamNamesQuoted(param1Type, param1Name, param2Type, param2Name):
argumentMap = [
-# (firstParamType, firstParamName, secondParamType, secondParamName) : ( returnType, FirstParamType, SecondParamType, bodyFunction)
- ('int', 'length', 'string', '', ('int', '', 'boost::python::object', constString)),
- ('int', 'length', 'stringresult', '', ('boost::python::str', '' , '', retString)),
- ('string', 'key', 'stringresult', '', ('boost::python::str', 'boost::python::object' , '', retStringFromKey)),
- ('int', 'length', 'stringresult', '', ('boost::python::str', '' , '', retStringNoLength)),
- ('int', '', 'stringresult', '', ('boost::python::str', 'int', '', retStringNoLength)),
- ('', '', 'stringresult', '', ('boost::python::str', '', '', retStringNoLength)),
- ('int', 'length', 'cells', '', ('int', '', 'ScintillaCells', cellsBody)),
- ('int', '', 'findtext', 'ft', ('boost::python::object', 'int', 'findtext', findTextBody)),
- ('', '', 'textrange', 'tr', ('boost::python::str', '', 'textrange', getTextRangeBody)),
+# (firstParamType,firstParamName, secondParamType, secondParamName):(returnType, FirstParamType, SecondParamType, bodyFunction)
+ ('int', 'length', 'string', '', ('int', '', 'boost::python::object', constString)),
+ ('int', 'length', 'stringresult', '', ('boost::python::str', '' , '', retString)),
+ ('string', 'key', 'stringresult', '', ('boost::python::str', 'boost::python::object','', retStringFromKey)),
+ ('string', 'encodedCharacter', 'stringresult', '', ('boost::python::str', 'boost::python::object','', retStringFromEnc)),
+ ('int', 'length', 'stringresult', '', ('boost::python::str', '' , '', retStringNoLength)),
+ ('int', '', 'stringresult', '', ('boost::python::str', 'int', '', retStringNoLength)),
+ ('', '', 'stringresult', '', ('boost::python::str', '', '', retStringNoLength)),
+ ('int', 'length', 'cells', '', ('int', '', 'ScintillaCells', cellsBody)),
+ ('int', '', 'findtext', 'ft', ('boost::python::object', 'int', 'findtext', findTextBody)),
+ ('', '', 'textrange', 'tr', ('boost::python::str', '', 'textrange', getTextRangeBody)),
]
-
+
specialCases = {
'GetStyledText' : ('boost::python::tuple', 'int', 'start', 'int', 'end', getStyledTextBody),
@@ -383,12 +406,12 @@ def formatPythonName(name):
def getPythonSignature(v):
sig = "{0}(".format(formatPythonName(v["Name"]))
-
+
sig += writePythonParams(v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"])
sig += ")"
if v["ReturnType"] and v["ReturnType"] != "void":
sig += " -> " + v["ReturnType"].replace("boost::python::", "")
-
+
return sig
def emptyIsVoid(var):
@@ -398,93 +421,102 @@ def emptyIsVoid(var):
def writeCppFile(f,out):
- out.write('#include "stdafx.h"\n')
- out.write('#include "ScintillaWrapper.h"\n')
- out.write('#include "Scintilla.h"\n')
- out.write('#include "GILManager.h"\n')
- out.write('\n')
- out.write('namespace NppPythonScript\n')
- out.write('{\n')
- out.write('// Helper class\n')
- out.write('class PythonCompatibleStrBuffer\n')
- out.write('{\n')
- out.write('public:\n')
- out.write('\tinline explicit PythonCompatibleStrBuffer(size_t length) :\n')
- out.write('\t\tm_bufferLen(length + 1),\n')
- out.write('\t\tm_bufferPtr(new char[m_bufferLen])\n')
- out.write('\t{\n')
- out.write('\t\tif (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = \'\\0\';\n')
- out.write('\t}\n')
- out.write('\tinline explicit PythonCompatibleStrBuffer(int length) :\n')
- out.write('\t\tm_bufferLen(length >= 0 ? (size_t)(length+1) : 0),\n')
- out.write('\t\tm_bufferPtr(new char[m_bufferLen])\n')
- out.write('\t{\n')
- out.write('\t\tif (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = \'\\0\';\n')
- out.write('\t}\n')
- out.write('\tinline ~PythonCompatibleStrBuffer() { delete [] m_bufferPtr; }\n')
- out.write('\tinline char* operator*() { return m_bufferPtr; }\n')
- out.write('\tinline const char* c_str() const { return m_bufferPtr; }\n')
- out.write('\tinline size_t size() const { return m_bufferLen; }\n')
- out.write('private:\n')
- out.write('\tPythonCompatibleStrBuffer(); // default constructor disabled\n')
- out.write('\tPythonCompatibleStrBuffer(const PythonCompatibleStrBuffer&); // copy constructor disabled\n')
- out.write('\tPythonCompatibleStrBuffer& operator = (const PythonCompatibleStrBuffer&); // Disable assignment operator disabled\n')
- out.write('\tsize_t m_bufferLen;\n')
- out.write('\tchar* m_bufferPtr;\n')
- out.write('};\n')
- out.write('\n')
-
+ out.write(
+'''#include "stdafx.h"
+#include "ScintillaWrapper.h"
+#include "Scintilla.h"
+#include "GILManager.h"
+
+namespace NppPythonScript
+{
+// Helper class
+class PythonCompatibleStrBuffer
+{
+public:
+ inline explicit PythonCompatibleStrBuffer(size_t length) :
+ m_bufferLen(length + 1),
+ m_bufferPtr(new char[m_bufferLen])
+ {
+ if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = \'\\0\';
+ }
+ inline explicit PythonCompatibleStrBuffer(int length) :
+ m_bufferLen(length >= 0 ? (size_t)(length+1) : 0),
+ m_bufferPtr(new char[m_bufferLen])
+ {
+ if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = \'\\0\';
+ }
+ inline explicit PythonCompatibleStrBuffer(LRESULT length) :
+ m_bufferLen(length >= 0 ? (size_t)(length+1) : 0),
+ m_bufferPtr(new char[m_bufferLen])
+ {
+ if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = \'\\0\';
+ }
+ inline ~PythonCompatibleStrBuffer() { delete [] m_bufferPtr; }
+ inline char* operator*() { return m_bufferPtr; }
+ inline const char* c_str() const { return m_bufferPtr; }
+ inline size_t size() const { return m_bufferLen; }
+private:
+ PythonCompatibleStrBuffer() = delete; // default constructor disabled
+ PythonCompatibleStrBuffer(const PythonCompatibleStrBuffer&) = delete; // copy constructor disabled
+ PythonCompatibleStrBuffer& operator = (const PythonCompatibleStrBuffer&) = delete; // Disable assignment operator disabled
+ size_t m_bufferLen;
+ char* m_bufferPtr;
+};
+
+''')
uniqueCombinations = {}
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
-
+
if v["Name"] in exclusions:
continue
if not uniqueCombinations.get((v["ReturnType"], v["Param1Type"], v["Param2Type"])):
- uniqueCombinations[(v["ReturnType"], v["Param1Type"], v["Param2Type"])] = []
+ uniqueCombinations[(v["ReturnType"], v["Param1Type"], v["Param2Type"])] = []
uniqueCombinations[(v["ReturnType"], v["Param1Type"], v["Param2Type"])].append(v["Name"])
if v["Name"] in specialCases:
- (v["ReturnType"], v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"], body) = specialCases[v["Name"]]
+ (v["ReturnType"], v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"], body) = specialCases[v["Name"]]
else:
sig = mapSignature((v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"]))
returnType = "int"
if sig is not None:
- v["ReturnType"] = sig[0]
+ print '{:<45} {} ==>> {}'.format(v["Name"], v["ReturnType"], sig[0])
+ v["ReturnType"] = 'intptr_t' if sig[0] == 'int' else sig[0]
v["Param1Type"] = sig[1]
v["Param2Type"] = sig[2]
body = sig[3]
else:
+ print '{:<45} {} -->> {}'.format(v["Name"], v["ReturnType"], mapType(v["ReturnType"]))
#if !checkStandardTypeIsKnown(v["ReturnType", v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"]):
# print("Warning: unrecognised parameter combination for {0}({1} {2}, {3} {4})".format(v["Name"], v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"]))
- v["ReturnType"] = mapType(v["ReturnType"])
+ v["ReturnType"] = 'intptr_t' if v["ReturnType"] in ['int', 'position'] else mapType(v["ReturnType"])
v["Param1Type"] = mapType(v["Param1Type"])
v["Param2Type"] = mapType(v["Param2Type"])
body = standardBody
-
+
out.write("/** " + "\n * ".join(v["Comment"]) + "\n */\n")
-
+
out.write(getSignature(v))
out.write("\n{\n")
body(v, out)
out.write("}\n\n")
-
+
out.write('}\n')
- print "Unique combinations:"
- for k in uniqueCombinations:
- print str(k) + ' (%s)' % ", ".join(uniqueCombinations[k][:4])
+ # print "Unique combinations:"
+ # for k in uniqueCombinations:
+ # print str(k) + ' (%s)' % ", ".join(uniqueCombinations[k][:4])
"""
for k in uniqueCombinations:
comb = [c[0].lower() + c[1:] for c in uniqueCombinations[k][:4]]
print ' def test_scintillawrapper_{0}_{1}_{2}(self):'.format(k[0], emptyIsVoid(k[1]), emptyIsVoid(k[2]))
print ' pass'
print ' # call one of the following: {}\n'.format(", ".join(comb[:4]))
-
+
print ' def callback_scintillawrapper_{0}_{1}_{2}(self, args):'.format(k[0], emptyIsVoid(k[1]), emptyIsVoid(k[2]))
print ' # call one of the following: {}'.format(", ".join(comb[:4]))
print ' self.callbackCalled = True\n'
@@ -494,8 +526,8 @@ def writeCppFile(f,out):
print ' editor.write("test");'
print ' time.sleep(0.1)'
print ' self.assertEqual(self.callbackCalled, True)\n'
- """
-
+ """
+
def writeHFile(f,out):
@@ -503,10 +535,10 @@ def writeHFile(f,out):
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
-
+
if v["Name"] in exclusions:
continue
-
+
sig = mapSignature((v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"]))
returnType = "int"
if sig is not None:
@@ -522,25 +554,25 @@ def writeHFile(f,out):
v["Param1Type"] = mapType(v["Param1Type"])
v["Param2Type"] = mapType(v["Param2Type"])
body = standardBody
-
+
out.write("\t/** " + "\n\t * ".join(v["Comment"]) + "\n */\n")
-
+
out.write("\t");
out.write(getSignature(v).replace(' ScintillaWrapper::', ' '))
out.write(";\n\n")
-
+
def writeBoostWrapFile(f,out):
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
-
+
if v["Name"] in exclusions:
continue
-
+
out.write('\t\t.def("{0}", &ScintillaWrapper::{1}, '.format(formatPythonName(v["Name"]), v["Name"]))
# TODO: This is getting really nasty. We need to refactor this whole file.
- # We need to
+ # We need to
quotedParams = getPythonParamNamesQuoted(v['Param1Type'], v['Param1Name'], v['Param2Type'], v['Param2Name'])
if quotedParams and quotedParams != '""':
out.write("boost::python::args({0}), ".format(quotedParams))
@@ -548,7 +580,7 @@ def writeBoostWrapFile(f,out):
out.write('\"')
out.write("\\n".join(v["Comment"]).replace('\\','\\\\').replace('"','\\"').replace('\\\\n', '\\n'))
out.write('\")\n')
-
+
def writeEnumsHFile(f, out):
for name in f.enums:
v = f.enums[name]
@@ -556,42 +588,42 @@ def writeEnumsHFile(f, out):
out.write('enum {0}\n'.format(name))
out.write('{\n\t')
join = ""
-
+
for val in v.get('Values'):
out.write('{0}PYSCR_{1} = {1}'.format(join, val[0]))
join = ',\n\t'
out.write('\n};\n\n')
- out.write("""\n/* The following is the enum of events/notifications.
+ out.write("""\n/* The following is the enum of events/notifications.
* Note that the PYSCN_XXX constants are NOT automatically generated (in ScintillaNotifications.h).
- * This is very deliberate.
+ * This is very deliberate.
* An error here indicates that a new notification has been added,
* and hence handler code should be added to the ScintillaWrapper::notify() function
*/\n""")
-
- join = ""
+
+ join = ""
out.write("enum ScintillaMessage\n")
out.write("{")
for name in f.order:
v = f.features[name]
- if v["Category"] != "Deprecated":
+ if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
out.write("%s\n\tPYSCR_SCI_%s = SCI_%s" % (join, name.upper(), name.upper()))
join = ","
- out.write("\n};\n")
-
+ out.write("\n};\n")
+
out.write("enum ScintillaNotification\n")
out.write("{")
-
+
join = ""
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
-
+
if v["FeatureType"] == "evt":
out.write("%s\n\tPYSCR_SCN_%s = PYSCN_%s" % (join, name.upper(), name.upper()))
join = ","
- out.write("\n};\n")
-
+ out.write("\n};\n")
+
def writeEnumsWrapperFile(f, out):
for name in f.enums:
v = f.enums[name]
@@ -616,38 +648,38 @@ def writeEnumsWrapperFile(f, out):
out.write(';\n\n')
out.write('\tboost::python::enum_("SCINTILLANOTIFICATION")'.format(name, name.upper()))
-
+
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] == "evt":
- out.write('\n\t\t.value("{0}", PYSCR_SCN_{1})'.format(name.upper(), name.upper()))
+ out.write('\n\t\t.value("{0}", PYSCR_SCN_{1})'.format(name.upper(), name.upper()))
out.write(';\n\n')
-
+
out.write('\tboost::python::enum_("SCINTILLAMESSAGE")'.format(name, name.upper()))
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
- out.write('\n\t\t.value("SCI_{0}", PYSCR_SCI_{1})'.format(name.upper(), name.upper()))
-
+ out.write('\n\t\t.value("SCI_{0}", PYSCR_SCI_{1})'.format(name.upper(), name.upper()))
+
out.write(';\n\n')
def writeScintillaDoc(f, out):
oldCat = ""
-
+
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["FeatureType"] in ["fun", "get", "set"]:
-
-
+
+
if v["Name"] in exclusions:
continue
-
+
if v["Name"] in specialCases:
- (v["ReturnType"], v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"], body) = specialCases[v["Name"]]
+ (v["ReturnType"], v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"], body) = specialCases[v["Name"]]
else:
sig = mapSignature((v["Param1Type"], v["Param1Name"], v["Param2Type"], v["Param2Name"]))
returnType = "int"
@@ -659,10 +691,10 @@ def writeScintillaDoc(f, out):
v["ReturnType"] = mapType(v["ReturnType"])
v["Param1Type"] = mapType(v["Param1Type"])
v["Param2Type"] = mapType(v["Param2Type"])
-
-
+
+
# out.write("/** " + "\n * ".join(v["Comment"]) + "\n */\n")
- out.write(".. method:: Editor.")
+ out.write(".. method:: Editor.")
out.write(getPythonSignature(v))
out.write("\n\n ")
out.write("\n ".join(v["Comment"]).replace('\\', '\\\\'))
@@ -675,7 +707,7 @@ def writeScintillaEnums(f, out):
v = f.enums[name]
if v.get('Values'):
out.write('{0}\n{1}\n\n.. _{0}:\n.. class:: {0}\n\n'.format(name.upper(), '-' * len(name)))
-
+
for val in v['Values']:
takeEnumValueFromPosition = None
for prefix in v['Value'].split(' '):
@@ -688,9 +720,9 @@ def writeScintillaEnums(f, out):
# Unfortunately, some of the prefixes are the complete symbol, which means we patch that here to just remove the SC_
if val[0] in ['SC_STARTACTION', 'SC_MULTISTEPUNDOREDO', 'SC_LASTSTEPINUNDOREDO', 'SC_MULTILINEUNDOREDO', 'SC_MODEVENTMASKALL']:
takeEnumValueFromPosition = len('SC_')
-
+
out.write('.. attribute:: {0}.{1}\n\n'.format(name.upper(), val[0][takeEnumValueFromPosition:].upper()))
-
+
def findEnum(f, name):
for enumName in f.enums:
for e in f.enums[enumName]["Value"].split(' '):
@@ -705,18 +737,18 @@ def findEnumValues(f):
v = f.features[name]
if v["FeatureType"] == 'enu':
f.enums[name] = { 'Name' : name, 'Value': v["Value"] }
-
+
for name in f.order:
-
+
v = f.features[name]
if v["FeatureType"] == 'val':
enum = findEnum(f, name)
-
+
if enum is not None:
if f.enums[enum].get("Values", None) == None:
f.enums[enum]["Values"] = []
f.enums[enum]["Values"] += [(name, v["Value"])]
-
+
def CopyWithInsertion(input, output, genfn, definition):
copying = 1
for line in input.readlines():
@@ -751,20 +783,14 @@ def Regenerate(filename, genfn, definition):
os.rename(tempname, filename)
-
-
-
-
-
-
f = Face.Face()
try:
-
+
f.ReadFromFile("Scintilla.iface")
findEnumValues(f)
- cpp = open("ScintillaWrapperGenerated.cpp", 'w')
- writeCppFile (f, cpp)
- cpp.close()
+ with open("ScintillaWrapperGenerated.cpp", 'w') as cpp:
+ writeCppFile (f, cpp)
+
Regenerate("ScintillaWrapper.h", writeHFile, f)
Regenerate("ScintillaPython.cpp", writeBoostWrapFile, f)
Regenerate("Enums.h", writeEnumsHFile, f)
@@ -775,4 +801,4 @@ def Regenerate(filename, genfn, definition):
#print("Maximum ID is %s" % max([x for x in f.values if int(x) < 3000]))
except:
raise
-
+
diff --git a/PythonScript/src/Enums.h b/PythonScript/src/Enums.h
index 0a3ff30d..ae8e2526 100644
--- a/PythonScript/src/Enums.h
+++ b/PythonScript/src/Enums.h
@@ -215,6 +215,14 @@ enum CaseInsensitiveBehaviour
PYSCR_SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE = SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE
};
+enum LineCache
+{
+ PYSCR_SC_CACHE_NONE = SC_CACHE_NONE,
+ PYSCR_SC_CACHE_CARET = SC_CACHE_CARET,
+ PYSCR_SC_CACHE_PAGE = SC_CACHE_PAGE,
+ PYSCR_SC_CACHE_DOCUMENT = SC_CACHE_DOCUMENT
+};
+
enum Ordering
{
PYSCR_SC_ORDER_PRESORTED = SC_ORDER_PRESORTED,
@@ -258,7 +266,8 @@ enum FoldFlag
PYSCR_SC_FOLDFLAG_LINEBEFORE_CONTRACTED = SC_FOLDFLAG_LINEBEFORE_CONTRACTED,
PYSCR_SC_FOLDFLAG_LINEAFTER_EXPANDED = SC_FOLDFLAG_LINEAFTER_EXPANDED,
PYSCR_SC_FOLDFLAG_LINEAFTER_CONTRACTED = SC_FOLDFLAG_LINEAFTER_CONTRACTED,
- PYSCR_SC_FOLDFLAG_LEVELNUMBERS = SC_FOLDFLAG_LEVELNUMBERS
+ PYSCR_SC_FOLDFLAG_LEVELNUMBERS = SC_FOLDFLAG_LEVELNUMBERS,
+ PYSCR_SC_FOLDFLAG_LINESTATE = SC_FOLDFLAG_LINESTATE
};
enum CaretStyle
@@ -268,18 +277,26 @@ enum CaretStyle
PYSCR_CARETSTYLE_BLOCK = CARETSTYLE_BLOCK
};
+enum MultiAutoComplete
+{
+ PYSCR_SC_MULTIAUTOC_ONCE = SC_MULTIAUTOC_ONCE,
+ PYSCR_SC_MULTIAUTOC_EACH = SC_MULTIAUTOC_EACH
+};
+
enum Status
{
PYSCR_SC_STATUS_OK = SC_STATUS_OK,
PYSCR_SC_STATUS_FAILURE = SC_STATUS_FAILURE,
- PYSCR_SC_STATUS_BADALLOC = SC_STATUS_BADALLOC
+ PYSCR_SC_STATUS_BADALLOC = SC_STATUS_BADALLOC,
+ PYSCR_SC_STATUS_WARN_START = SC_STATUS_WARN_START,
+ PYSCR_SC_STATUS_WARN_REGEX = SC_STATUS_WARN_REGEX
};
-enum FontWeight
+enum WrapVisualLocation
{
- PYSCR_SC_WEIGHT_NORMAL = SC_WEIGHT_NORMAL,
- PYSCR_SC_WEIGHT_SEMIBOLD = SC_WEIGHT_SEMIBOLD,
- PYSCR_SC_WEIGHT_BOLD = SC_WEIGHT_BOLD
+ PYSCR_SC_WRAPVISUALFLAGLOC_DEFAULT = SC_WRAPVISUALFLAGLOC_DEFAULT,
+ PYSCR_SC_WRAPVISUALFLAGLOC_END_BY_TEXT = SC_WRAPVISUALFLAGLOC_END_BY_TEXT,
+ PYSCR_SC_WRAPVISUALFLAGLOC_START_BY_TEXT = SC_WRAPVISUALFLAGLOC_START_BY_TEXT
};
enum Keys
@@ -320,7 +337,8 @@ enum AnnotationVisible
{
PYSCR_ANNOTATION_HIDDEN = ANNOTATION_HIDDEN,
PYSCR_ANNOTATION_STANDARD = ANNOTATION_STANDARD,
- PYSCR_ANNOTATION_BOXED = ANNOTATION_BOXED
+ PYSCR_ANNOTATION_BOXED = ANNOTATION_BOXED,
+ PYSCR_ANNOTATION_INDENTED = ANNOTATION_INDENTED
};
enum CharacterSet
@@ -357,6 +375,11 @@ enum PrintOption
PYSCR_SC_PRINT_COLOURONWHITEDEFAULTBG = SC_PRINT_COLOURONWHITEDEFAULTBG
};
+enum IndicFlag
+{
+ PYSCR_SC_INDICFLAG_VALUEFORE = SC_INDICFLAG_VALUEFORE
+};
+
enum MarkerSymbol
{
PYSCR_SC_MARK_CIRCLE = SC_MARK_CIRCLE,
@@ -394,6 +417,17 @@ enum MarkerSymbol
PYSCR_SC_MARK_CHARACTER = SC_MARK_CHARACTER
};
+enum MarkerOutline
+{
+ PYSCR_SC_MARKNUM_FOLDEREND = SC_MARKNUM_FOLDEREND,
+ PYSCR_SC_MARKNUM_FOLDEROPENMID = SC_MARKNUM_FOLDEROPENMID,
+ PYSCR_SC_MARKNUM_FOLDERMIDTAIL = SC_MARKNUM_FOLDERMIDTAIL,
+ PYSCR_SC_MARKNUM_FOLDERTAIL = SC_MARKNUM_FOLDERTAIL,
+ PYSCR_SC_MARKNUM_FOLDERSUB = SC_MARKNUM_FOLDERSUB,
+ PYSCR_SC_MARKNUM_FOLDER = SC_MARKNUM_FOLDER,
+ PYSCR_SC_MARKNUM_FOLDEROPEN = SC_MARKNUM_FOLDEROPEN
+};
+
enum IndicatorStyle
{
PYSCR_INDIC_PLAIN = INDIC_PLAIN,
@@ -411,6 +445,11 @@ enum IndicatorStyle
PYSCR_INDIC_DOTBOX = INDIC_DOTBOX,
PYSCR_INDIC_SQUIGGLEPIXMAP = INDIC_SQUIGGLEPIXMAP,
PYSCR_INDIC_COMPOSITIONTHICK = INDIC_COMPOSITIONTHICK,
+ PYSCR_INDIC_COMPOSITIONTHIN = INDIC_COMPOSITIONTHIN,
+ PYSCR_INDIC_FULLBOX = INDIC_FULLBOX,
+ PYSCR_INDIC_TEXTFORE = INDIC_TEXTFORE,
+ PYSCR_INDIC_IME = INDIC_IME,
+ PYSCR_INDIC_IME_MAX = INDIC_IME_MAX,
PYSCR_INDIC_MAX = INDIC_MAX,
PYSCR_INDIC_CONTAINER = INDIC_CONTAINER
};
@@ -543,6 +582,13 @@ enum Lexer
PYSCR_SCLEX_KVIRC = SCLEX_KVIRC,
PYSCR_SCLEX_RUST = SCLEX_RUST,
PYSCR_SCLEX_DMAP = SCLEX_DMAP,
+ PYSCR_SCLEX_AS = SCLEX_AS,
+ PYSCR_SCLEX_DMIS = SCLEX_DMIS,
+ PYSCR_SCLEX_REGISTRY = SCLEX_REGISTRY,
+ PYSCR_SCLEX_BIBTEX = SCLEX_BIBTEX,
+ PYSCR_SCLEX_SREC = SCLEX_SREC,
+ PYSCR_SCLEX_IHEX = SCLEX_IHEX,
+ PYSCR_SCLEX_TEHEX = SCLEX_TEHEX,
PYSCR_SCLEX_AUTOMATIC = SCLEX_AUTOMATIC
};
@@ -576,7 +622,8 @@ enum FindOption
PYSCR_SCFIND_MATCHCASE = SCFIND_MATCHCASE,
PYSCR_SCFIND_WORDSTART = SCFIND_WORDSTART,
PYSCR_SCFIND_REGEXP = SCFIND_REGEXP,
- PYSCR_SCFIND_POSIX = SCFIND_POSIX
+ PYSCR_SCFIND_POSIX = SCFIND_POSIX,
+ PYSCR_SCFIND_CXX11REGEX = SCFIND_CXX11REGEX
};
enum ModificationFlags
@@ -601,6 +648,8 @@ enum ModificationFlags
PYSCR_SC_MOD_CHANGEANNOTATION = SC_MOD_CHANGEANNOTATION,
PYSCR_SC_MOD_CONTAINER = SC_MOD_CONTAINER,
PYSCR_SC_MOD_LEXERSTATE = SC_MOD_LEXERSTATE,
+ PYSCR_SC_MOD_INSERTCHECK = SC_MOD_INSERTCHECK,
+ PYSCR_SC_MOD_CHANGETABSTOPS = SC_MOD_CHANGETABSTOPS,
PYSCR_SC_MODEVENTMASKALL = SC_MODEVENTMASKALL
};
@@ -631,22 +680,10 @@ enum WhiteSpace
PYSCR_SCWS_VISIBLEAFTERINDENT = SCWS_VISIBLEAFTERINDENT
};
-enum MarkerOutline
-{
- PYSCR_SC_MARKNUM_FOLDEREND = SC_MARKNUM_FOLDEREND,
- PYSCR_SC_MARKNUM_FOLDEROPENMID = SC_MARKNUM_FOLDEROPENMID,
- PYSCR_SC_MARKNUM_FOLDERMIDTAIL = SC_MARKNUM_FOLDERMIDTAIL,
- PYSCR_SC_MARKNUM_FOLDERTAIL = SC_MARKNUM_FOLDERTAIL,
- PYSCR_SC_MARKNUM_FOLDERSUB = SC_MARKNUM_FOLDERSUB,
- PYSCR_SC_MARKNUM_FOLDER = SC_MARKNUM_FOLDER,
- PYSCR_SC_MARKNUM_FOLDEROPEN = SC_MARKNUM_FOLDEROPEN
-};
-
-enum WrapVisualLocation
+enum IMEInteraction
{
- PYSCR_SC_WRAPVISUALFLAGLOC_DEFAULT = SC_WRAPVISUALFLAGLOC_DEFAULT,
- PYSCR_SC_WRAPVISUALFLAGLOC_END_BY_TEXT = SC_WRAPVISUALFLAGLOC_END_BY_TEXT,
- PYSCR_SC_WRAPVISUALFLAGLOC_START_BY_TEXT = SC_WRAPVISUALFLAGLOC_START_BY_TEXT
+ PYSCR_SC_IME_WINDOWED = SC_IME_WINDOWED,
+ PYSCR_SC_IME_INLINE = SC_IME_INLINE
};
enum FoldLevel
@@ -664,12 +701,11 @@ enum WrapIndentMode
PYSCR_SC_WRAPINDENT_INDENT = SC_WRAPINDENT_INDENT
};
-enum LineCache
+enum FontWeight
{
- PYSCR_SC_CACHE_NONE = SC_CACHE_NONE,
- PYSCR_SC_CACHE_CARET = SC_CACHE_CARET,
- PYSCR_SC_CACHE_PAGE = SC_CACHE_PAGE,
- PYSCR_SC_CACHE_DOCUMENT = SC_CACHE_DOCUMENT
+ PYSCR_SC_WEIGHT_NORMAL = SC_WEIGHT_NORMAL,
+ PYSCR_SC_WEIGHT_SEMIBOLD = SC_WEIGHT_SEMIBOLD,
+ PYSCR_SC_WEIGHT_BOLD = SC_WEIGHT_BOLD
};
enum MultiPaste
@@ -703,7 +739,8 @@ enum Wrap
{
PYSCR_SC_WRAP_NONE = SC_WRAP_NONE,
PYSCR_SC_WRAP_WORD = SC_WRAP_WORD,
- PYSCR_SC_WRAP_CHAR = SC_WRAP_CHAR
+ PYSCR_SC_WRAP_CHAR = SC_WRAP_CHAR,
+ PYSCR_SC_WRAP_WHITESPACE = SC_WRAP_WHITESPACE
};
enum SelectionMode
@@ -745,9 +782,9 @@ enum EndOfLine
};
-/* The following is the enum of events/notifications.
+/* The following is the enum of events/notifications.
* Note that the PYSCN_XXX constants are NOT automatically generated (in ScintillaNotifications.h).
- * This is very deliberate.
+ * This is very deliberate.
* An error here indicates that a new notification has been added,
* and hence handler code should be added to the ScintillaWrapper::notify() function
*/
@@ -756,6 +793,7 @@ enum ScintillaMessage
PYSCR_SCI_ADDTEXT = SCI_ADDTEXT,
PYSCR_SCI_ADDSTYLEDTEXT = SCI_ADDSTYLEDTEXT,
PYSCR_SCI_INSERTTEXT = SCI_INSERTTEXT,
+ PYSCR_SCI_CHANGEINSERTION = SCI_CHANGEINSERTION,
PYSCR_SCI_CLEARALL = SCI_CLEARALL,
PYSCR_SCI_DELETERANGE = SCI_DELETERANGE,
PYSCR_SCI_CLEARDOCUMENTSTYLE = SCI_CLEARDOCUMENTSTYLE,
@@ -791,7 +829,12 @@ enum ScintillaMessage
PYSCR_SCI_SETBUFFEREDDRAW = SCI_SETBUFFEREDDRAW,
PYSCR_SCI_SETTABWIDTH = SCI_SETTABWIDTH,
PYSCR_SCI_GETTABWIDTH = SCI_GETTABWIDTH,
+ PYSCR_SCI_CLEARTABSTOPS = SCI_CLEARTABSTOPS,
+ PYSCR_SCI_ADDTABSTOP = SCI_ADDTABSTOP,
+ PYSCR_SCI_GETNEXTTABSTOP = SCI_GETNEXTTABSTOP,
PYSCR_SCI_SETCODEPAGE = SCI_SETCODEPAGE,
+ PYSCR_SCI_GETIMEINTERACTION = SCI_GETIMEINTERACTION,
+ PYSCR_SCI_SETIMEINTERACTION = SCI_SETIMEINTERACTION,
PYSCR_SCI_MARKERDEFINE = SCI_MARKERDEFINE,
PYSCR_SCI_MARKERSETFORE = SCI_MARKERSETFORE,
PYSCR_SCI_MARKERSETBACK = SCI_MARKERSETBACK,
@@ -870,6 +913,12 @@ enum ScintillaMessage
PYSCR_SCI_INDICGETFORE = SCI_INDICGETFORE,
PYSCR_SCI_INDICSETUNDER = SCI_INDICSETUNDER,
PYSCR_SCI_INDICGETUNDER = SCI_INDICGETUNDER,
+ PYSCR_SCI_INDICSETHOVERSTYLE = SCI_INDICSETHOVERSTYLE,
+ PYSCR_SCI_INDICGETHOVERSTYLE = SCI_INDICGETHOVERSTYLE,
+ PYSCR_SCI_INDICSETHOVERFORE = SCI_INDICSETHOVERFORE,
+ PYSCR_SCI_INDICGETHOVERFORE = SCI_INDICGETHOVERFORE,
+ PYSCR_SCI_INDICSETFLAGS = SCI_INDICSETFLAGS,
+ PYSCR_SCI_INDICGETFLAGS = SCI_INDICGETFLAGS,
PYSCR_SCI_SETWHITESPACEFORE = SCI_SETWHITESPACEFORE,
PYSCR_SCI_SETWHITESPACEBACK = SCI_SETWHITESPACEBACK,
PYSCR_SCI_SETWHITESPACESIZE = SCI_SETWHITESPACESIZE,
@@ -987,6 +1036,8 @@ enum ScintillaMessage
PYSCR_SCI_GETTARGETSTART = SCI_GETTARGETSTART,
PYSCR_SCI_SETTARGETEND = SCI_SETTARGETEND,
PYSCR_SCI_GETTARGETEND = SCI_GETTARGETEND,
+ PYSCR_SCI_SETTARGETRANGE = SCI_SETTARGETRANGE,
+ PYSCR_SCI_GETTARGETTEXT = SCI_GETTARGETTEXT,
PYSCR_SCI_REPLACETARGET = SCI_REPLACETARGET,
PYSCR_SCI_REPLACETARGETRE = SCI_REPLACETARGETRE,
PYSCR_SCI_SEARCHINTARGET = SCI_SEARCHINTARGET,
@@ -1059,6 +1110,8 @@ enum ScintillaMessage
PYSCR_SCI_APPENDTEXT = SCI_APPENDTEXT,
PYSCR_SCI_GETTWOPHASEDRAW = SCI_GETTWOPHASEDRAW,
PYSCR_SCI_SETTWOPHASEDRAW = SCI_SETTWOPHASEDRAW,
+ PYSCR_SCI_GETPHASESDRAW = SCI_GETPHASESDRAW,
+ PYSCR_SCI_SETPHASESDRAW = SCI_SETPHASESDRAW,
PYSCR_SCI_SETFONTQUALITY = SCI_SETFONTQUALITY,
PYSCR_SCI_GETFONTQUALITY = SCI_GETFONTQUALITY,
PYSCR_SCI_SETFIRSTVISIBLELINE = SCI_SETFIRSTVISIBLELINE,
@@ -1230,6 +1283,8 @@ enum ScintillaMessage
PYSCR_SCI_AUTOCGETCURRENTTEXT = SCI_AUTOCGETCURRENTTEXT,
PYSCR_SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR = SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR,
PYSCR_SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR = SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR,
+ PYSCR_SCI_AUTOCSETMULTI = SCI_AUTOCSETMULTI,
+ PYSCR_SCI_AUTOCGETMULTI = SCI_AUTOCGETMULTI,
PYSCR_SCI_AUTOCSETORDER = SCI_AUTOCSETORDER,
PYSCR_SCI_AUTOCGETORDER = SCI_AUTOCGETORDER,
PYSCR_SCI_ALLOCATE = SCI_ALLOCATE,
@@ -1374,6 +1429,9 @@ enum ScintillaMessage
PYSCR_SCI_VCHOMEDISPLAYEXTEND = SCI_VCHOMEDISPLAYEXTEND,
PYSCR_SCI_GETCARETLINEVISIBLEALWAYS = SCI_GETCARETLINEVISIBLEALWAYS,
PYSCR_SCI_SETCARETLINEVISIBLEALWAYS = SCI_SETCARETLINEVISIBLEALWAYS,
+ PYSCR_SCI_SETLINEENDTYPESALLOWED = SCI_SETLINEENDTYPESALLOWED,
+ PYSCR_SCI_GETLINEENDTYPESALLOWED = SCI_GETLINEENDTYPESALLOWED,
+ PYSCR_SCI_GETLINEENDTYPESACTIVE = SCI_GETLINEENDTYPESACTIVE,
PYSCR_SCI_SETREPRESENTATION = SCI_SETREPRESENTATION,
PYSCR_SCI_GETREPRESENTATION = SCI_GETREPRESENTATION,
PYSCR_SCI_CLEARREPRESENTATION = SCI_CLEARREPRESENTATION,
@@ -1396,9 +1454,6 @@ enum ScintillaMessage
PYSCR_SCI_PROPERTYTYPE = SCI_PROPERTYTYPE,
PYSCR_SCI_DESCRIBEPROPERTY = SCI_DESCRIBEPROPERTY,
PYSCR_SCI_DESCRIBEKEYWORDSETS = SCI_DESCRIBEKEYWORDSETS,
- PYSCR_SCI_SETLINEENDTYPESALLOWED = SCI_SETLINEENDTYPESALLOWED,
- PYSCR_SCI_GETLINEENDTYPESALLOWED = SCI_GETLINEENDTYPESALLOWED,
- PYSCR_SCI_GETLINEENDTYPESACTIVE = SCI_GETLINEENDTYPESACTIVE,
PYSCR_SCI_GETLINEENDTYPESSUPPORTED = SCI_GETLINEENDTYPESSUPPORTED,
PYSCR_SCI_ALLOCATESUBSTYLES = SCI_ALLOCATESUBSTYLES,
PYSCR_SCI_GETSUBSTYLESSTART = SCI_GETSUBSTYLESSTART,
diff --git a/PythonScript/src/EnumsWrapper.cpp b/PythonScript/src/EnumsWrapper.cpp
index fd88da7d..f56489ab 100644
--- a/PythonScript/src/EnumsWrapper.cpp
+++ b/PythonScript/src/EnumsWrapper.cpp
@@ -209,6 +209,12 @@ void export_enums()
.value("RESPECTCASE", PYSCR_SC_CASEINSENSITIVEBEHAVIOUR_RESPECTCASE)
.value("IGNORECASE", PYSCR_SC_CASEINSENSITIVEBEHAVIOUR_IGNORECASE);
+ boost::python::enum_("LINECACHE")
+ .value("NONE", PYSCR_SC_CACHE_NONE)
+ .value("CARET", PYSCR_SC_CACHE_CARET)
+ .value("PAGE", PYSCR_SC_CACHE_PAGE)
+ .value("DOCUMENT", PYSCR_SC_CACHE_DOCUMENT);
+
boost::python::enum_("ORDERING")
.value("PRESORTED", PYSCR_SC_ORDER_PRESORTED)
.value("PERFORMSORT", PYSCR_SC_ORDER_PERFORMSORT)
@@ -241,22 +247,29 @@ void export_enums()
.value("LINEBEFORE_CONTRACTED", PYSCR_SC_FOLDFLAG_LINEBEFORE_CONTRACTED)
.value("LINEAFTER_EXPANDED", PYSCR_SC_FOLDFLAG_LINEAFTER_EXPANDED)
.value("LINEAFTER_CONTRACTED", PYSCR_SC_FOLDFLAG_LINEAFTER_CONTRACTED)
- .value("LEVELNUMBERS", PYSCR_SC_FOLDFLAG_LEVELNUMBERS);
+ .value("LEVELNUMBERS", PYSCR_SC_FOLDFLAG_LEVELNUMBERS)
+ .value("LINESTATE", PYSCR_SC_FOLDFLAG_LINESTATE);
boost::python::enum_("CARETSTYLE")
.value("INVISIBLE", PYSCR_CARETSTYLE_INVISIBLE)
.value("LINE", PYSCR_CARETSTYLE_LINE)
.value("BLOCK", PYSCR_CARETSTYLE_BLOCK);
+ boost::python::enum_("MULTIAUTOCOMPLETE")
+ .value("ONCE", PYSCR_SC_MULTIAUTOC_ONCE)
+ .value("EACH", PYSCR_SC_MULTIAUTOC_EACH);
+
boost::python::enum_("STATUS")
.value("OK", PYSCR_SC_STATUS_OK)
.value("FAILURE", PYSCR_SC_STATUS_FAILURE)
- .value("BADALLOC", PYSCR_SC_STATUS_BADALLOC);
+ .value("BADALLOC", PYSCR_SC_STATUS_BADALLOC)
+ .value("WARN_START", PYSCR_SC_STATUS_WARN_START)
+ .value("WARN_REGEX", PYSCR_SC_STATUS_WARN_REGEX);
- boost::python::enum_("FONTWEIGHT")
- .value("NORMAL", PYSCR_SC_WEIGHT_NORMAL)
- .value("SEMIBOLD", PYSCR_SC_WEIGHT_SEMIBOLD)
- .value("BOLD", PYSCR_SC_WEIGHT_BOLD);
+ boost::python::enum_("WRAPVISUALLOCATION")
+ .value("DEFAULT", PYSCR_SC_WRAPVISUALFLAGLOC_DEFAULT)
+ .value("END_BY_TEXT", PYSCR_SC_WRAPVISUALFLAGLOC_END_BY_TEXT)
+ .value("START_BY_TEXT", PYSCR_SC_WRAPVISUALFLAGLOC_START_BY_TEXT);
boost::python::enum_("KEYS")
.value("DOWN", PYSCR_SCK_DOWN)
@@ -291,7 +304,8 @@ void export_enums()
boost::python::enum_("ANNOTATIONVISIBLE")
.value("HIDDEN", PYSCR_ANNOTATION_HIDDEN)
.value("STANDARD", PYSCR_ANNOTATION_STANDARD)
- .value("BOXED", PYSCR_ANNOTATION_BOXED);
+ .value("BOXED", PYSCR_ANNOTATION_BOXED)
+ .value("INDENTED", PYSCR_ANNOTATION_INDENTED);
boost::python::enum_("CHARACTERSET")
.value("ANSI", PYSCR_SC_CHARSET_ANSI)
@@ -323,6 +337,9 @@ void export_enums()
.value("COLOURONWHITE", PYSCR_SC_PRINT_COLOURONWHITE)
.value("COLOURONWHITEDEFAULTBG", PYSCR_SC_PRINT_COLOURONWHITEDEFAULTBG);
+ boost::python::enum_("INDICFLAG")
+ .value("VALUEFORE", PYSCR_SC_INDICFLAG_VALUEFORE);
+
boost::python::enum_("MARKERSYMBOL")
.value("CIRCLE", PYSCR_SC_MARK_CIRCLE)
.value("ROUNDRECT", PYSCR_SC_MARK_ROUNDRECT)
@@ -358,6 +375,15 @@ void export_enums()
.value("BOOKMARK", PYSCR_SC_MARK_BOOKMARK)
.value("CHARACTER", PYSCR_SC_MARK_CHARACTER);
+ boost::python::enum_("MARKEROUTLINE")
+ .value("FOLDEREND", PYSCR_SC_MARKNUM_FOLDEREND)
+ .value("FOLDEROPENMID", PYSCR_SC_MARKNUM_FOLDEROPENMID)
+ .value("FOLDERMIDTAIL", PYSCR_SC_MARKNUM_FOLDERMIDTAIL)
+ .value("FOLDERTAIL", PYSCR_SC_MARKNUM_FOLDERTAIL)
+ .value("FOLDERSUB", PYSCR_SC_MARKNUM_FOLDERSUB)
+ .value("FOLDER", PYSCR_SC_MARKNUM_FOLDER)
+ .value("FOLDEROPEN", PYSCR_SC_MARKNUM_FOLDEROPEN);
+
boost::python::enum_("INDICATORSTYLE")
.value("PLAIN", PYSCR_INDIC_PLAIN)
.value("SQUIGGLE", PYSCR_INDIC_SQUIGGLE)
@@ -374,6 +400,11 @@ void export_enums()
.value("DOTBOX", PYSCR_INDIC_DOTBOX)
.value("SQUIGGLEPIXMAP", PYSCR_INDIC_SQUIGGLEPIXMAP)
.value("COMPOSITIONTHICK", PYSCR_INDIC_COMPOSITIONTHICK)
+ .value("COMPOSITIONTHIN", PYSCR_INDIC_COMPOSITIONTHIN)
+ .value("FULLBOX", PYSCR_INDIC_FULLBOX)
+ .value("TEXTFORE", PYSCR_INDIC_TEXTFORE)
+ .value("IME", PYSCR_INDIC_IME)
+ .value("IME_MAX", PYSCR_INDIC_IME_MAX)
.value("MAX", PYSCR_INDIC_MAX)
.value("CONTAINER", PYSCR_INDIC_CONTAINER);
@@ -500,6 +531,13 @@ void export_enums()
.value("KVIRC", PYSCR_SCLEX_KVIRC)
.value("RUST", PYSCR_SCLEX_RUST)
.value("DMAP", PYSCR_SCLEX_DMAP)
+ .value("AS", PYSCR_SCLEX_AS)
+ .value("DMIS", PYSCR_SCLEX_DMIS)
+ .value("REGISTRY", PYSCR_SCLEX_REGISTRY)
+ .value("BIBTEX", PYSCR_SCLEX_BIBTEX)
+ .value("SREC", PYSCR_SCLEX_SREC)
+ .value("IHEX", PYSCR_SCLEX_IHEX)
+ .value("TEHEX", PYSCR_SCLEX_TEHEX)
.value("AUTOMATIC", PYSCR_SCLEX_AUTOMATIC);
boost::python::enum_("MARGINOPTION")
@@ -525,7 +563,8 @@ void export_enums()
.value("MATCHCASE", PYSCR_SCFIND_MATCHCASE)
.value("WORDSTART", PYSCR_SCFIND_WORDSTART)
.value("REGEXP", PYSCR_SCFIND_REGEXP)
- .value("POSIX", PYSCR_SCFIND_POSIX);
+ .value("POSIX", PYSCR_SCFIND_POSIX)
+ .value("CXX11REGEX", PYSCR_SCFIND_CXX11REGEX);
boost::python::enum_("MODIFICATIONFLAGS")
.value("INSERTTEXT", PYSCR_SC_MOD_INSERTTEXT)
@@ -548,6 +587,8 @@ void export_enums()
.value("CHANGEANNOTATION", PYSCR_SC_MOD_CHANGEANNOTATION)
.value("CONTAINER", PYSCR_SC_MOD_CONTAINER)
.value("LEXERSTATE", PYSCR_SC_MOD_LEXERSTATE)
+ .value("INSERTCHECK", PYSCR_SC_MOD_INSERTCHECK)
+ .value("CHANGETABSTOPS", PYSCR_SC_MOD_CHANGETABSTOPS)
.value("MODEVENTMASKALL", PYSCR_SC_MODEVENTMASKALL);
boost::python::enum_("LINEENDTYPE")
@@ -569,19 +610,9 @@ void export_enums()
.value("VISIBLEALWAYS", PYSCR_SCWS_VISIBLEALWAYS)
.value("VISIBLEAFTERINDENT", PYSCR_SCWS_VISIBLEAFTERINDENT);
- boost::python::enum_("MARKEROUTLINE")
- .value("FOLDEREND", PYSCR_SC_MARKNUM_FOLDEREND)
- .value("FOLDEROPENMID", PYSCR_SC_MARKNUM_FOLDEROPENMID)
- .value("FOLDERMIDTAIL", PYSCR_SC_MARKNUM_FOLDERMIDTAIL)
- .value("FOLDERTAIL", PYSCR_SC_MARKNUM_FOLDERTAIL)
- .value("FOLDERSUB", PYSCR_SC_MARKNUM_FOLDERSUB)
- .value("FOLDER", PYSCR_SC_MARKNUM_FOLDER)
- .value("FOLDEROPEN", PYSCR_SC_MARKNUM_FOLDEROPEN);
-
- boost::python::enum_("WRAPVISUALLOCATION")
- .value("DEFAULT", PYSCR_SC_WRAPVISUALFLAGLOC_DEFAULT)
- .value("END_BY_TEXT", PYSCR_SC_WRAPVISUALFLAGLOC_END_BY_TEXT)
- .value("START_BY_TEXT", PYSCR_SC_WRAPVISUALFLAGLOC_START_BY_TEXT);
+ boost::python::enum_("IMEINTERACTION")
+ .value("WINDOWED", PYSCR_SC_IME_WINDOWED)
+ .value("INLINE", PYSCR_SC_IME_INLINE);
boost::python::enum_("FOLDLEVEL")
.value("BASE", PYSCR_SC_FOLDLEVELBASE)
@@ -594,11 +625,10 @@ void export_enums()
.value("SAME", PYSCR_SC_WRAPINDENT_SAME)
.value("INDENT", PYSCR_SC_WRAPINDENT_INDENT);
- boost::python::enum_("LINECACHE")
- .value("NONE", PYSCR_SC_CACHE_NONE)
- .value("CARET", PYSCR_SC_CACHE_CARET)
- .value("PAGE", PYSCR_SC_CACHE_PAGE)
- .value("DOCUMENT", PYSCR_SC_CACHE_DOCUMENT);
+ boost::python::enum_("FONTWEIGHT")
+ .value("NORMAL", PYSCR_SC_WEIGHT_NORMAL)
+ .value("SEMIBOLD", PYSCR_SC_WEIGHT_SEMIBOLD)
+ .value("BOLD", PYSCR_SC_WEIGHT_BOLD);
boost::python::enum_("MULTIPASTE")
.value("ONCE", PYSCR_SC_MULTIPASTE_ONCE)
@@ -624,7 +654,8 @@ void export_enums()
boost::python::enum_("WRAP")
.value("NONE", PYSCR_SC_WRAP_NONE)
.value("WORD", PYSCR_SC_WRAP_WORD)
- .value("CHAR", PYSCR_SC_WRAP_CHAR);
+ .value("CHAR", PYSCR_SC_WRAP_CHAR)
+ .value("WHITESPACE", PYSCR_SC_WRAP_WHITESPACE);
boost::python::enum_("SELECTIONMODE")
.value("STREAM", PYSCR_SC_SEL_STREAM)
@@ -689,6 +720,7 @@ void export_enums()
.value("SCI_ADDTEXT", PYSCR_SCI_ADDTEXT)
.value("SCI_ADDSTYLEDTEXT", PYSCR_SCI_ADDSTYLEDTEXT)
.value("SCI_INSERTTEXT", PYSCR_SCI_INSERTTEXT)
+ .value("SCI_CHANGEINSERTION", PYSCR_SCI_CHANGEINSERTION)
.value("SCI_CLEARALL", PYSCR_SCI_CLEARALL)
.value("SCI_DELETERANGE", PYSCR_SCI_DELETERANGE)
.value("SCI_CLEARDOCUMENTSTYLE", PYSCR_SCI_CLEARDOCUMENTSTYLE)
@@ -724,7 +756,12 @@ void export_enums()
.value("SCI_SETBUFFEREDDRAW", PYSCR_SCI_SETBUFFEREDDRAW)
.value("SCI_SETTABWIDTH", PYSCR_SCI_SETTABWIDTH)
.value("SCI_GETTABWIDTH", PYSCR_SCI_GETTABWIDTH)
+ .value("SCI_CLEARTABSTOPS", PYSCR_SCI_CLEARTABSTOPS)
+ .value("SCI_ADDTABSTOP", PYSCR_SCI_ADDTABSTOP)
+ .value("SCI_GETNEXTTABSTOP", PYSCR_SCI_GETNEXTTABSTOP)
.value("SCI_SETCODEPAGE", PYSCR_SCI_SETCODEPAGE)
+ .value("SCI_GETIMEINTERACTION", PYSCR_SCI_GETIMEINTERACTION)
+ .value("SCI_SETIMEINTERACTION", PYSCR_SCI_SETIMEINTERACTION)
.value("SCI_MARKERDEFINE", PYSCR_SCI_MARKERDEFINE)
.value("SCI_MARKERSETFORE", PYSCR_SCI_MARKERSETFORE)
.value("SCI_MARKERSETBACK", PYSCR_SCI_MARKERSETBACK)
@@ -803,6 +840,12 @@ void export_enums()
.value("SCI_INDICGETFORE", PYSCR_SCI_INDICGETFORE)
.value("SCI_INDICSETUNDER", PYSCR_SCI_INDICSETUNDER)
.value("SCI_INDICGETUNDER", PYSCR_SCI_INDICGETUNDER)
+ .value("SCI_INDICSETHOVERSTYLE", PYSCR_SCI_INDICSETHOVERSTYLE)
+ .value("SCI_INDICGETHOVERSTYLE", PYSCR_SCI_INDICGETHOVERSTYLE)
+ .value("SCI_INDICSETHOVERFORE", PYSCR_SCI_INDICSETHOVERFORE)
+ .value("SCI_INDICGETHOVERFORE", PYSCR_SCI_INDICGETHOVERFORE)
+ .value("SCI_INDICSETFLAGS", PYSCR_SCI_INDICSETFLAGS)
+ .value("SCI_INDICGETFLAGS", PYSCR_SCI_INDICGETFLAGS)
.value("SCI_SETWHITESPACEFORE", PYSCR_SCI_SETWHITESPACEFORE)
.value("SCI_SETWHITESPACEBACK", PYSCR_SCI_SETWHITESPACEBACK)
.value("SCI_SETWHITESPACESIZE", PYSCR_SCI_SETWHITESPACESIZE)
@@ -920,6 +963,8 @@ void export_enums()
.value("SCI_GETTARGETSTART", PYSCR_SCI_GETTARGETSTART)
.value("SCI_SETTARGETEND", PYSCR_SCI_SETTARGETEND)
.value("SCI_GETTARGETEND", PYSCR_SCI_GETTARGETEND)
+ .value("SCI_SETTARGETRANGE", PYSCR_SCI_SETTARGETRANGE)
+ .value("SCI_GETTARGETTEXT", PYSCR_SCI_GETTARGETTEXT)
.value("SCI_REPLACETARGET", PYSCR_SCI_REPLACETARGET)
.value("SCI_REPLACETARGETRE", PYSCR_SCI_REPLACETARGETRE)
.value("SCI_SEARCHINTARGET", PYSCR_SCI_SEARCHINTARGET)
@@ -992,6 +1037,8 @@ void export_enums()
.value("SCI_APPENDTEXT", PYSCR_SCI_APPENDTEXT)
.value("SCI_GETTWOPHASEDRAW", PYSCR_SCI_GETTWOPHASEDRAW)
.value("SCI_SETTWOPHASEDRAW", PYSCR_SCI_SETTWOPHASEDRAW)
+ .value("SCI_GETPHASESDRAW", PYSCR_SCI_GETPHASESDRAW)
+ .value("SCI_SETPHASESDRAW", PYSCR_SCI_SETPHASESDRAW)
.value("SCI_SETFONTQUALITY", PYSCR_SCI_SETFONTQUALITY)
.value("SCI_GETFONTQUALITY", PYSCR_SCI_GETFONTQUALITY)
.value("SCI_SETFIRSTVISIBLELINE", PYSCR_SCI_SETFIRSTVISIBLELINE)
@@ -1163,6 +1210,8 @@ void export_enums()
.value("SCI_AUTOCGETCURRENTTEXT", PYSCR_SCI_AUTOCGETCURRENTTEXT)
.value("SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR", PYSCR_SCI_AUTOCSETCASEINSENSITIVEBEHAVIOUR)
.value("SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR", PYSCR_SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR)
+ .value("SCI_AUTOCSETMULTI", PYSCR_SCI_AUTOCSETMULTI)
+ .value("SCI_AUTOCGETMULTI", PYSCR_SCI_AUTOCGETMULTI)
.value("SCI_AUTOCSETORDER", PYSCR_SCI_AUTOCSETORDER)
.value("SCI_AUTOCGETORDER", PYSCR_SCI_AUTOCGETORDER)
.value("SCI_ALLOCATE", PYSCR_SCI_ALLOCATE)
@@ -1307,6 +1356,9 @@ void export_enums()
.value("SCI_VCHOMEDISPLAYEXTEND", PYSCR_SCI_VCHOMEDISPLAYEXTEND)
.value("SCI_GETCARETLINEVISIBLEALWAYS", PYSCR_SCI_GETCARETLINEVISIBLEALWAYS)
.value("SCI_SETCARETLINEVISIBLEALWAYS", PYSCR_SCI_SETCARETLINEVISIBLEALWAYS)
+ .value("SCI_SETLINEENDTYPESALLOWED", PYSCR_SCI_SETLINEENDTYPESALLOWED)
+ .value("SCI_GETLINEENDTYPESALLOWED", PYSCR_SCI_GETLINEENDTYPESALLOWED)
+ .value("SCI_GETLINEENDTYPESACTIVE", PYSCR_SCI_GETLINEENDTYPESACTIVE)
.value("SCI_SETREPRESENTATION", PYSCR_SCI_SETREPRESENTATION)
.value("SCI_GETREPRESENTATION", PYSCR_SCI_GETREPRESENTATION)
.value("SCI_CLEARREPRESENTATION", PYSCR_SCI_CLEARREPRESENTATION)
@@ -1329,9 +1381,6 @@ void export_enums()
.value("SCI_PROPERTYTYPE", PYSCR_SCI_PROPERTYTYPE)
.value("SCI_DESCRIBEPROPERTY", PYSCR_SCI_DESCRIBEPROPERTY)
.value("SCI_DESCRIBEKEYWORDSETS", PYSCR_SCI_DESCRIBEKEYWORDSETS)
- .value("SCI_SETLINEENDTYPESALLOWED", PYSCR_SCI_SETLINEENDTYPESALLOWED)
- .value("SCI_GETLINEENDTYPESALLOWED", PYSCR_SCI_GETLINEENDTYPESALLOWED)
- .value("SCI_GETLINEENDTYPESACTIVE", PYSCR_SCI_GETLINEENDTYPESACTIVE)
.value("SCI_GETLINEENDTYPESSUPPORTED", PYSCR_SCI_GETLINEENDTYPESSUPPORTED)
.value("SCI_ALLOCATESUBSTYLES", PYSCR_SCI_ALLOCATESUBSTYLES)
.value("SCI_GETSUBSTYLESSTART", PYSCR_SCI_GETSUBSTYLESSTART)
diff --git a/PythonScript/src/HFacer.py b/PythonScript/src/HFacer.py
index 51f3071b..3fad186f 100644
--- a/PythonScript/src/HFacer.py
+++ b/PythonScript/src/HFacer.py
@@ -22,11 +22,13 @@ def printLexHFile(f):
def printHFile(f):
out = []
previousCategory = ""
+ anyProvisional = False
for name in f.order:
v = f.features[name]
if v["Category"] != "Deprecated":
if v["Category"] == "Provisional" and previousCategory != "Provisional":
out.append("#ifndef SCI_DISABLE_PROVISIONAL")
+ anyProvisional = True
previousCategory = v["Category"]
if v["FeatureType"] in ["fun", "get", "set"]:
featureDefineName = "SCI_" + name.upper()
@@ -37,7 +39,8 @@ def printHFile(f):
elif v["FeatureType"] in ["val"]:
if not ("SCE_" in name or "SCLEX_" in name):
out.append("#define " + name + " " + v["Value"])
- out.append("#endif")
+ if anyProvisional:
+ out.append("#endif")
return out
def RegenerateAll(root, showMaxID):
diff --git a/PythonScript/src/Match.cpp b/PythonScript/src/Match.cpp
index 7b8b0be5..d238d496 100644
--- a/PythonScript/src/Match.cpp
+++ b/PythonScript/src/Match.cpp
@@ -52,7 +52,7 @@ boost::python::str Match::getGroup(boost::python::object groupIdentifier)
boost::python::str Match::py_expand(boost::python::object replaceFormat)
{
char *result;
- int resultLength;
+ size_t resultLength;
expand(boost::python::extract(replaceFormat.attr("__str__")()), &result, &resultLength);
boost::python::str pyResult(const_cast(result));
delete [] result;
@@ -127,7 +127,7 @@ int Match::py_lastindex()
boost::python::tuple Match::py_groups()
{
- int size = groupCount();
+ size_t size = groupCount();
PyObject* groupsTuple = PyTuple_New(size - 1);
for(int index = 1; index != size; ++index)
{
@@ -148,7 +148,7 @@ boost::python::object py_group_variable(boost::python::tuple args, boost::python
boost::python::object Match::py_group_variable(boost::python::tuple args, boost::python::dict kwargs)
{
- int size = boost::python::len(args);
+ size_t size = boost::python::len(args);
// For the default case, no arguments, return the whole match
if (size == 0)
diff --git a/PythonScript/src/Match.h b/PythonScript/src/Match.h
index 490b591e..df048ad5 100644
--- a/PythonScript/src/Match.h
+++ b/PythonScript/src/Match.h
@@ -18,10 +18,10 @@ namespace NppPythonScript
class Match
{
public:
- virtual int groupCount() = 0;
+ virtual size_t groupCount() = 0;
virtual GroupDetail* group(int groupNumber) = 0;
virtual GroupDetail* groupName(const char *groupName) = 0;
- virtual void expand(const char* format, char **result, int *resultLength) = 0;
+ virtual void expand(const char* format, char **result, size_t *resultLength) = 0;
virtual std::string getTextForGroup(GroupDetail* group) = 0;
virtual int groupIndexFromName(const char *groupName) = 0;
diff --git a/PythonScript/src/NotepadPlusWrapper.cpp b/PythonScript/src/NotepadPlusWrapper.cpp
index 979d2e2c..aa709fb8 100644
--- a/PythonScript/src/NotepadPlusWrapper.cpp
+++ b/PythonScript/src/NotepadPlusWrapper.cpp
@@ -268,13 +268,13 @@ boost::python::str NotepadPlusWrapper::getPluginVersion()
boost::python::list NotepadPlusWrapper::getFiles()
{
idx_t count;
- int bufferID;
+ intptr_t bufferID;
boost::python::list files;
for(int view = 0; view <= 1; view++)
{
- count = (idx_t)callNotepad(NPPM_GETNBOPENFILES, 0, view);
+ count = (idx_t)callNotepad(NPPM_GETNBOPENFILES, 0, view ? SECOND_VIEW : PRIMARY_VIEW);
TCHAR **fileNames = (TCHAR **)new TCHAR*[count];
for (idx_t i = 0 ; i < count ; i++)
@@ -431,7 +431,7 @@ void NotepadPlusWrapper::setStatusBar(StatusBarSection section, const char *text
}
-long NotepadPlusWrapper::getPluginMenuHandle()
+LRESULT NotepadPlusWrapper::getPluginMenuHandle()
{
return callNotepad(NPPM_GETMENUHANDLE, 0, 0);
}
@@ -552,12 +552,12 @@ void NotepadPlusWrapper::showTabBar()
}
-int NotepadPlusWrapper::getCurrentBufferID()
+intptr_t NotepadPlusWrapper::getCurrentBufferID()
{
return callNotepad(NPPM_GETCURRENTBUFFERID);
}
-void NotepadPlusWrapper::reloadBuffer(int bufferID, bool withAlert)
+void NotepadPlusWrapper::reloadBuffer(intptr_t bufferID, bool withAlert)
{
callNotepad(NPPM_RELOADBUFFERID, static_cast(bufferID), static_cast(withAlert));
@@ -568,14 +568,14 @@ LangType NotepadPlusWrapper::getLangType()
return getBufferLangType(callNotepad(NPPM_GETCURRENTBUFFERID));
}
-LangType NotepadPlusWrapper::getBufferLangType(int bufferID)
+LangType NotepadPlusWrapper::getBufferLangType(intptr_t bufferID)
{
return static_cast(callNotepad(NPPM_GETBUFFERLANGTYPE, bufferID));
}
-void NotepadPlusWrapper::setBufferLangType(LangType language, int bufferID)
+void NotepadPlusWrapper::setBufferLangType(LangType language, intptr_t bufferID)
{
callNotepad(NPPM_SETBUFFERLANGTYPE, static_cast(bufferID), static_cast(language));
@@ -586,7 +586,7 @@ BufferEncoding NotepadPlusWrapper::getEncoding()
return getBufferEncoding(callNotepad(NPPM_GETCURRENTBUFFERID));
}
-BufferEncoding NotepadPlusWrapper::getBufferEncoding(int bufferID)
+BufferEncoding NotepadPlusWrapper::getBufferEncoding(intptr_t bufferID)
{
return static_cast(callNotepad(NPPM_GETBUFFERENCODING, static_cast(bufferID)));
}
@@ -597,7 +597,7 @@ void NotepadPlusWrapper::setEncoding(BufferEncoding encoding)
}
-void NotepadPlusWrapper::setBufferEncoding(BufferEncoding encoding, int bufferID)
+void NotepadPlusWrapper::setBufferEncoding(BufferEncoding encoding, intptr_t bufferID)
{
callNotepad(NPPM_SETBUFFERENCODING, static_cast(bufferID), static_cast(encoding));
@@ -609,7 +609,7 @@ FormatType NotepadPlusWrapper::getFormatType()
}
-FormatType NotepadPlusWrapper::getBufferFormatType(int bufferID)
+FormatType NotepadPlusWrapper::getBufferFormatType(intptr_t bufferID)
{
return static_cast(callNotepad(NPPM_GETBUFFERFORMAT, static_cast(bufferID)));
}
@@ -620,7 +620,7 @@ void NotepadPlusWrapper::setFormatType(FormatType format)
}
-void NotepadPlusWrapper::setBufferFormatType(FormatType format, int bufferID)
+void NotepadPlusWrapper::setBufferFormatType(FormatType format, intptr_t bufferID)
{
callNotepad(NPPM_SETBUFFERFORMAT, static_cast(bufferID), static_cast(format));
@@ -776,7 +776,7 @@ void NotepadPlusWrapper::clearAllCallbacks()
}
-void NotepadPlusWrapper::activateBufferID(int bufferID)
+void NotepadPlusWrapper::activateBufferID(intptr_t bufferID)
{
notAllowedInScintillaCallback("activateBufferID() cannot be called in a synchronous editor callback. "
"Use an asynchronous callback, or avoid using activateBufferID() in the callback handler");
@@ -787,7 +787,7 @@ void NotepadPlusWrapper::activateBufferID(int bufferID)
callNotepad(NPPM_ACTIVATEDOC, view, (LPARAM)index);
}
-boost::python::str NotepadPlusWrapper::getBufferFilename(int bufferID)
+boost::python::str NotepadPlusWrapper::getBufferFilename(intptr_t bufferID)
{
TCHAR buffer[MAX_PATH];
callNotepad(NPPM_GETFULLPATHFROMBUFFERID, static_cast(bufferID), reinterpret_cast(buffer));
diff --git a/PythonScript/src/NotepadPlusWrapper.h b/PythonScript/src/NotepadPlusWrapper.h
index bd7a00d5..77d873ac 100644
--- a/PythonScript/src/NotepadPlusWrapper.h
+++ b/PythonScript/src/NotepadPlusWrapper.h
@@ -461,11 +461,11 @@ class NotepadPlusWrapper
idx_t getCurrentDocIndex(int view);
void setStatusBar(StatusBarSection section, const char *text);
- long getPluginMenuHandle();
+ LRESULT getPluginMenuHandle();
void activateIndex(int view, int index);
- void activateBufferID(int bufferID);
+ void activateBufferID(intptr_t bufferID);
void loadSession(boost::python::str filename);
@@ -488,33 +488,33 @@ class NotepadPlusWrapper
void showTabBar();
- int getCurrentBufferID();
+ intptr_t getCurrentBufferID();
- void reloadBuffer(int bufferID, bool withAlert = true);
+ void reloadBuffer(intptr_t bufferID, bool withAlert = true);
LangType getLangType();
- LangType getBufferLangType(int bufferID);
+ LangType getBufferLangType(intptr_t bufferID);
void setLangType(LangType language);
- void setBufferLangType(LangType lang, int bufferID);
+ void setBufferLangType(LangType lang, intptr_t bufferID);
BufferEncoding getEncoding();
- BufferEncoding getBufferEncoding(int bufferID);
+ BufferEncoding getBufferEncoding(intptr_t bufferID);
void setEncoding(BufferEncoding encoding);
- void setBufferEncoding(BufferEncoding encoding, int bufferID);
+ void setBufferEncoding(BufferEncoding encoding, intptr_t bufferID);
FormatType getFormatType();
- FormatType getBufferFormatType(int bufferID);
+ FormatType getBufferFormatType(intptr_t bufferID);
void setFormatType(FormatType format);
- void setBufferFormatType(FormatType format, int bufferID);
+ void setBufferFormatType(FormatType format, intptr_t bufferID);
void closeDocument();
@@ -536,7 +536,7 @@ class NotepadPlusWrapper
boost::python::object promptDefault(boost::python::object promptObj, boost::python::object title)
{ return prompt(promptObj, title, boost::python::object()); };
- boost::python::str getBufferFilename(int bufferID);
+ boost::python::str getBufferFilename(intptr_t bufferID);
boost::python::str getCurrentFilename();
boost::python::str getNppDir();
boost::python::str getCommandLine();
diff --git a/PythonScript/src/PythonScript.cpp b/PythonScript/src/PythonScript.cpp
index 90dff76e..e2e6025c 100644
--- a/PythonScript/src/PythonScript.cpp
+++ b/PythonScript/src/PythonScript.cpp
@@ -650,7 +650,7 @@ static void newScript()
HANDLE hFile = CreateFileA(ofn.lpstrFile, GENERIC_WRITE, 0, NULL, CREATE_NEW, FILE_ATTRIBUTE_NORMAL, NULL);
CloseHandle(hFile);
SendMessage(nppData._nppHandle, NPPM_DOOPEN, 0, reinterpret_cast(WcharMbcsConverter::char2tchar(ofn.lpstrFile).get()));
- int bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
+ intptr_t bufferID = SendMessage(nppData._nppHandle, NPPM_GETCURRENTBUFFERID, 0, 0);
SendMessage(nppData._nppHandle, NPPM_SETBUFFERLANGTYPE, L_PYTHON, bufferID);
}
diff --git a/PythonScript/src/ReplaceEntry.h b/PythonScript/src/ReplaceEntry.h
index c1c32fdb..51daad6f 100644
--- a/PythonScript/src/ReplaceEntry.h
+++ b/PythonScript/src/ReplaceEntry.h
@@ -7,7 +7,7 @@ namespace NppPythonScript
class ReplaceEntry {
public:
- ReplaceEntry(int start, int length, const char* replacement, int replacementLength)
+ ReplaceEntry(int start, int length, const char* replacement, size_t replacementLength)
: m_start(start),
m_length(length),
m_replacementLength(replacementLength)
@@ -33,12 +33,12 @@ class ReplaceEntry {
int getStart() { return m_start; }
int getLength() { return m_length; }
char *getReplacement() { return m_replacement; }
- int getReplacementLength() { return m_replacementLength; }
+ size_t getReplacementLength() { return m_replacementLength; }
private:
int m_start;
int m_length;
- int m_replacementLength;
+ size_t m_replacementLength;
char *m_replacement;
diff --git a/PythonScript/src/ReplacementContainer.cpp b/PythonScript/src/ReplacementContainer.cpp
index 712bb160..f3ff567c 100644
--- a/PythonScript/src/ReplacementContainer.cpp
+++ b/PythonScript/src/ReplacementContainer.cpp
@@ -18,7 +18,7 @@ void ReplacementContainer::runReplacements()
int end = (*it)->getLength();
m_scintillaWrapper->setTarget(offset + start, offset + end);
- int replacementLength = m_scintillaWrapper->callScintilla(SCI_REPLACETARGET, (*it)->getReplacementLength(), reinterpret_cast((*it)->getReplacement()));
+ intptr_t replacementLength = m_scintillaWrapper->callScintilla(SCI_REPLACETARGET, (*it)->getReplacementLength(), reinterpret_cast((*it)->getReplacement()));
offset = offset + (replacementLength - (end - start));
}
diff --git a/PythonScript/src/Replacer.h b/PythonScript/src/Replacer.h
index b3cea74b..9125e643 100644
--- a/PythonScript/src/Replacer.h
+++ b/PythonScript/src/Replacer.h
@@ -74,14 +74,14 @@ class BoostRegexMatch : public Match
void setMatchResults(boost::match_results* match) { m_match = match; }
- virtual int groupCount() { return m_match->size(); }
+ virtual size_t groupCount() { return m_match->size(); }
virtual GroupDetail* group(int groupNo);
virtual GroupDetail* groupName(const char *groupName);
virtual std::string getTextForGroup(GroupDetail* group);
- virtual void expand(const char* format, char **result, int *resultLength);
+ virtual void expand(const char* format, char **result, size_t *resultLength);
virtual int groupIndexFromName(const char *groupName);
@@ -136,7 +136,7 @@ int BoostRegexMatch::groupIndexFromName(const char *groupName)
}
template
-void BoostRegexMatch::expand(const char *format, char **result, int *resultLength)
+void BoostRegexMatch::expand(const char *format, char **result, size_t *resultLength)
{
CharTraitsT::string_type formatString = CharTraitsT::fromChars(format);
CharTraitsT::string_type resultString = m_match->format(formatString, boost::regex_constants::format_all);
@@ -220,7 +220,7 @@ ReplaceEntry* Replacer::matchToReplaceEntry(const char * /* text */
// need to add format call in here,
Replacer *replacer = reinterpret_cast(state);
char *replacement;
- int replacementLength;
+ size_t replacementLength;
match->expand(replacer->m_replaceFormat, &replacement, &replacementLength);
GroupDetail *fullMatch = match->group(0);
diff --git a/PythonScript/src/ScintillaPython.cpp b/PythonScript/src/ScintillaPython.cpp
index 60537c3f..17e0824c 100644
--- a/PythonScript/src/ScintillaPython.cpp
+++ b/PythonScript/src/ScintillaPython.cpp
@@ -114,6 +114,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("addText", &ScintillaWrapper::AddText, boost::python::args("text"), "Add text to the document at current position.")
.def("addStyledText", &ScintillaWrapper::AddStyledText, boost::python::args("c"), "Add array of cells to document.")
.def("insertText", &ScintillaWrapper::InsertText, boost::python::args("pos", "text"), "Insert string at a position.")
+ .def("changeInsertion", &ScintillaWrapper::ChangeInsertion, boost::python::args("text"), "Change the text that is being inserted in response to SC_MOD_INSERTCHECK")
.def("clearAll", &ScintillaWrapper::ClearAll, "Delete all text in the document.")
.def("deleteRange", &ScintillaWrapper::DeleteRange, boost::python::args("pos", "deleteLength"), "Delete a range of text in the document.")
.def("clearDocumentStyle", &ScintillaWrapper::ClearDocumentStyle, "Set all style bytes to 0, remove all folding information.")
@@ -138,7 +139,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("gotoLine", &ScintillaWrapper::GotoLine, boost::python::args("line"), "Set caret to start of a line and ensure it is visible.")
.def("gotoPos", &ScintillaWrapper::GotoPos, boost::python::args("pos"), "Set caret to a position and ensure it is visible.")
.def("setAnchor", &ScintillaWrapper::SetAnchor, boost::python::args("posAnchor"), "Set the selection anchor to a position. The anchor is the opposite\nend of the selection from the caret.")
- .def("getCurLine", &ScintillaWrapper::GetCurLine, "Retrieve the text of the line containing the caret.\nReturns the index of the caret on the line.")
+ .def("getCurLine", &ScintillaWrapper::GetCurLine, "Retrieve the text of the line containing the caret.\nReturns the index of the caret on the line.\nResult is NUL-terminated.")
.def("getEndStyled", &ScintillaWrapper::GetEndStyled, "Retrieve the position of the last correctly styled character.")
.def("convertEOLs", &ScintillaWrapper::ConvertEOLs, boost::python::args("eolMode"), "Convert all line endings in the document to one mode.")
.def("getEOLMode", &ScintillaWrapper::GetEOLMode, "Retrieve the current end of line mode - one of CRLF, CR, or LF.")
@@ -149,7 +150,12 @@ BOOST_PYTHON_MODULE(Npp)
.def("setBufferedDraw", &ScintillaWrapper::SetBufferedDraw, boost::python::args("buffered"), "If drawing is buffered then each line of text is drawn into a bitmap buffer\nbefore drawing it to the screen to avoid flicker.")
.def("setTabWidth", &ScintillaWrapper::SetTabWidth, boost::python::args("tabWidth"), "Change the visible size of a tab to be a multiple of the width of a space character.")
.def("getTabWidth", &ScintillaWrapper::GetTabWidth, "Retrieve the visible size of a tab.")
+ .def("clearTabStops", &ScintillaWrapper::ClearTabStops, boost::python::args("line"), "Clear explicit tabstops on a line.")
+ .def("addTabStop", &ScintillaWrapper::AddTabStop, boost::python::args("line", "x"), "Add an explicit tab stop for a line.")
+ .def("getNextTabStop", &ScintillaWrapper::GetNextTabStop, boost::python::args("line", "x"), "Find the next explicit tab stop position on a line after a position.")
.def("setCodePage", &ScintillaWrapper::SetCodePage, boost::python::args("codePage"), "Set the code page used to interpret the bytes of the document as characters.\nThe SC_CP_UTF8 value can be used to enter Unicode mode.")
+ .def("getIMEInteraction", &ScintillaWrapper::GetIMEInteraction, "Is the IME displayed in a winow or inline?")
+ .def("setIMEInteraction", &ScintillaWrapper::SetIMEInteraction, boost::python::args("imeInteraction"), "Choose to display the the IME in a winow or inline.")
.def("markerDefine", &ScintillaWrapper::MarkerDefine, boost::python::args("markerNumber", "markerSymbol"), "Set the symbol used for a particular marker number.")
.def("markerSetFore", &ScintillaWrapper::MarkerSetFore, boost::python::args("markerNumber", "fore"), "Set the foreground colour used for a particular marker number.")
.def("markerSetBack", &ScintillaWrapper::MarkerSetBack, boost::python::args("markerNumber", "back"), "Set the background colour used for a particular marker number.")
@@ -189,7 +195,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("styleGetBold", &ScintillaWrapper::StyleGetBold, boost::python::args("style"), "Get is a style bold or not.")
.def("styleGetItalic", &ScintillaWrapper::StyleGetItalic, boost::python::args("style"), "Get is a style italic or not.")
.def("styleGetSize", &ScintillaWrapper::StyleGetSize, boost::python::args("style"), "Get the size of characters of a style.")
- .def("styleGetFont", &ScintillaWrapper::StyleGetFont, boost::python::args("style"), "Get the font of a style.\nReturns the length of the fontName")
+ .def("styleGetFont", &ScintillaWrapper::StyleGetFont, boost::python::args("style"), "Get the font of a style.\nReturns the length of the fontName\nResult is NUL-terminated.")
.def("styleGetEOLFilled", &ScintillaWrapper::StyleGetEOLFilled, boost::python::args("style"), "Get is a style to have its end of line filled or not.")
.def("styleGetUnderline", &ScintillaWrapper::StyleGetUnderline, boost::python::args("style"), "Get is a style underlined or not.")
.def("styleGetCase", &ScintillaWrapper::StyleGetCase, boost::python::args("style"), "Get is a style mixed case, or to force upper or lower case.")
@@ -219,7 +225,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("getCaretPeriod", &ScintillaWrapper::GetCaretPeriod, "Get the time in milliseconds that the caret is on and off.")
.def("setCaretPeriod", &ScintillaWrapper::SetCaretPeriod, boost::python::args("periodMilliseconds"), "Get the time in milliseconds that the caret is on and off. 0 = steady on.")
.def("setWordChars", &ScintillaWrapper::SetWordChars, boost::python::args("characters"), "Set the set of characters making up words for when moving or selecting by word.\nFirst sets defaults like SetCharsDefault.")
- .def("getWordChars", &ScintillaWrapper::GetWordChars, "Get the set of characters making up words for when moving or selecting by word.\nRetuns the number of characters")
+ .def("getWordChars", &ScintillaWrapper::GetWordChars, "Get the set of characters making up words for when moving or selecting by word.\nReturns the number of characters")
.def("beginUndoAction", &ScintillaWrapper::BeginUndoAction, "Start a sequence of actions that is undone and redone as a unit.\nMay be nested.")
.def("endUndoAction", &ScintillaWrapper::EndUndoAction, "End a sequence of actions that is undone and redone as a unit.")
.def("indicSetStyle", &ScintillaWrapper::IndicSetStyle, boost::python::args("indic", "style"), "Set an indicator to plain, squiggle or TT.")
@@ -228,6 +234,12 @@ BOOST_PYTHON_MODULE(Npp)
.def("indicGetFore", &ScintillaWrapper::IndicGetFore, boost::python::args("indic"), "Retrieve the foreground colour of an indicator.")
.def("indicSetUnder", &ScintillaWrapper::IndicSetUnder, boost::python::args("indic", "under"), "Set an indicator to draw under text or over(default).")
.def("indicGetUnder", &ScintillaWrapper::IndicGetUnder, boost::python::args("indic"), "Retrieve whether indicator drawn under or over text.")
+ .def("indicSetHoverStyle", &ScintillaWrapper::IndicSetHoverStyle, boost::python::args("indic", "style"), "Set a hover indicator to plain, squiggle or TT.")
+ .def("indicGetHoverStyle", &ScintillaWrapper::IndicGetHoverStyle, boost::python::args("indic"), "Retrieve the hover style of an indicator.")
+ .def("indicSetHoverFore", &ScintillaWrapper::IndicSetHoverFore, boost::python::args("indic", "fore"), "Set the foreground hover colour of an indicator.")
+ .def("indicGetHoverFore", &ScintillaWrapper::IndicGetHoverFore, boost::python::args("indic"), "Retrieve the foreground hover colour of an indicator.")
+ .def("indicSetFlags", &ScintillaWrapper::IndicSetFlags, boost::python::args("indic", "flags"), "Set the attributes of an indicator.")
+ .def("indicGetFlags", &ScintillaWrapper::IndicGetFlags, boost::python::args("indic"), "Retrieve the attributes of an indicator.")
.def("setWhitespaceFore", &ScintillaWrapper::SetWhitespaceFore, boost::python::args("useSetting", "fore"), "Set the foreground colour of all whitespace and whether to use this setting.")
.def("setWhitespaceBack", &ScintillaWrapper::SetWhitespaceBack, boost::python::args("useSetting", "back"), "Set the background colour of all whitespace and whether to use this setting.")
.def("setWhitespaceSize", &ScintillaWrapper::SetWhitespaceSize, boost::python::args("size"), "Set the size of the dots used to mark space characters.")
@@ -310,7 +322,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("getMarginRight", &ScintillaWrapper::GetMarginRight, "Returns the size in pixels of the right margin.")
.def("getModify", &ScintillaWrapper::GetModify, "Is the document different from when it was last saved?")
.def("setSel", &ScintillaWrapper::SetSel, boost::python::args("start", "end"), "Select a range of text.")
- .def("getSelText", &ScintillaWrapper::GetSelText, "Retrieve the selected text.\nReturn the length of the text.")
+ .def("getSelText", &ScintillaWrapper::GetSelText, "Retrieve the selected text.\nReturn the length of the text.\nResult is NUL-terminated.")
.def("getTextRange", &ScintillaWrapper::GetTextRange, boost::python::args("start", "end"), "Retrieve a range of text.\nReturn the length of the text.")
.def("hideSelection", &ScintillaWrapper::HideSelection, boost::python::args("normal"), "Draw the selection in normal style or with selection highlighted.")
.def("pointXFromPosition", &ScintillaWrapper::PointXFromPosition, boost::python::args("pos"), "Retrieve the x value of the point in the window where a position is displayed.")
@@ -332,7 +344,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("paste", &ScintillaWrapper::Paste, "Paste the contents of the clipboard into the document replacing the selection.")
.def("clear", &ScintillaWrapper::Clear, "Clear the selection.")
.def("setText", &ScintillaWrapper::SetText, boost::python::args("text"), "Replace the contents of the document with the argument text.")
- .def("getText", &ScintillaWrapper::GetText, "Retrieve all the text in the document.\nReturns number of characters retrieved.")
+ .def("getText", &ScintillaWrapper::GetText, "Retrieve all the text in the document.\nReturns number of characters retrieved.\nResult is NUL-terminated.")
.def("getTextLength", &ScintillaWrapper::GetTextLength, "Retrieve the number of characters in the document.")
.def("getDirectFunction", &ScintillaWrapper::GetDirectFunction, "Retrieve a pointer to a function that processes messages for this Scintilla.")
.def("getDirectPointer", &ScintillaWrapper::GetDirectPointer, "Retrieve a pointer value to use as the first argument when calling\nthe function returned by GetDirectFunction.")
@@ -344,6 +356,8 @@ BOOST_PYTHON_MODULE(Npp)
.def("getTargetStart", &ScintillaWrapper::GetTargetStart, "Get the position that starts the target.")
.def("setTargetEnd", &ScintillaWrapper::SetTargetEnd, boost::python::args("pos"), "Sets the position that ends the target which is used for updating the\ndocument without affecting the scroll position.")
.def("getTargetEnd", &ScintillaWrapper::GetTargetEnd, "Get the position that ends the target.")
+ .def("setTargetRange", &ScintillaWrapper::SetTargetRange, boost::python::args("start", "end"), "Sets both the start and end of the target in one call.")
+ .def("getTargetText", &ScintillaWrapper::GetTargetText, "Retrieve the text in the target.")
.def("replaceTarget", &ScintillaWrapper::ReplaceTarget, boost::python::args("text"), "Replace the target text with the argument text.\nText is counted so it can contain NULs.\nReturns the length of the replacement text.")
.def("replaceTargetRE", &ScintillaWrapper::ReplaceTargetRE, boost::python::args("text"), "Replace the target text with the argument text after \\d processing.\nText is counted so it can contain NULs.\nLooks for \\d where d is between 1 and 9 and replaces these with the strings\nmatched in the last search operation which were surrounded by \\( and \\).\nReturns the length of the replacement text including any change\ncaused by processing the \\d patterns.")
.def("searchInTarget", &ScintillaWrapper::SearchInTarget, boost::python::args("text"), "Search for a counted string in the target and set the target to the found\nrange. Text is counted so it can contain NULs.\nReturns length of range or -1 for failure in which case target is not moved.")
@@ -414,14 +428,16 @@ BOOST_PYTHON_MODULE(Npp)
.def("setVScrollBar", &ScintillaWrapper::SetVScrollBar, boost::python::args("show"), "Show or hide the vertical scroll bar.")
.def("getVScrollBar", &ScintillaWrapper::GetVScrollBar, "Is the vertical scroll bar visible?")
.def("appendText", &ScintillaWrapper::AppendText, boost::python::args("text"), "Append a string to the end of the document without changing the selection.")
- .def("getTwoPhaseDraw", &ScintillaWrapper::GetTwoPhaseDraw, "Is drawing done in two phases with backgrounds drawn before faoregrounds?")
+ .def("getTwoPhaseDraw", &ScintillaWrapper::GetTwoPhaseDraw, "Is drawing done in two phases with backgrounds drawn before foregrounds?")
.def("setTwoPhaseDraw", &ScintillaWrapper::SetTwoPhaseDraw, boost::python::args("twoPhase"), "In twoPhaseDraw mode, drawing is performed in two phases, first the background\nand then the foreground. This avoids chopping off characters that overlap the next run.")
+ .def("getPhasesDraw", &ScintillaWrapper::GetPhasesDraw, "How many phases is drawing done in?")
+ .def("setPhasesDraw", &ScintillaWrapper::SetPhasesDraw, boost::python::args("phases"), "In one phase draw, text is drawn in a series of rectangular blocks with no overlap.\nIn two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.\nIn multiple phase draw, each element is drawn over the whole drawing area, allowing text\nto overlap from one line to the next.")
.def("setFontQuality", &ScintillaWrapper::SetFontQuality, boost::python::args("fontQuality"), "Choose the quality level for text from the FontQuality enumeration.")
.def("getFontQuality", &ScintillaWrapper::GetFontQuality, "Retrieve the quality level for text.")
.def("setFirstVisibleLine", &ScintillaWrapper::SetFirstVisibleLine, boost::python::args("lineDisplay"), "Scroll so that a display line is at the top of the display.")
.def("setMultiPaste", &ScintillaWrapper::SetMultiPaste, boost::python::args("multiPaste"), "Change the effect of pasting when there are multiple selections.")
.def("getMultiPaste", &ScintillaWrapper::GetMultiPaste, "Retrieve the effect of pasting when there are multiple selections..")
- .def("getTag", &ScintillaWrapper::GetTag, boost::python::args("tagNumber"), "Retrieve the value of a tag from a regular expression search.")
+ .def("getTag", &ScintillaWrapper::GetTag, boost::python::args("tagNumber"), "Retrieve the value of a tag from a regular expression search.\nResult is NUL-terminated.")
.def("targetFromSelection", &ScintillaWrapper::TargetFromSelection, "Make the target range start and end be the same as the selection range start and end.")
.def("linesJoin", &ScintillaWrapper::LinesJoin, "Join the lines in the target.")
.def("linesSplit", &ScintillaWrapper::LinesSplit, boost::python::args("pixelWidth"), "Split the lines in the target into lines that are less wide than pixelWidth\nwhere possible.")
@@ -584,9 +600,11 @@ BOOST_PYTHON_MODULE(Npp)
.def("getPunctuationChars", &ScintillaWrapper::GetPunctuationChars, "Get the set of characters making up punctuation characters")
.def("setCharsDefault", &ScintillaWrapper::SetCharsDefault, "Reset the set of characters for whitespace and word characters to the defaults.")
.def("autoCGetCurrent", &ScintillaWrapper::AutoCGetCurrent, "Get currently selected item position in the auto-completion list")
- .def("autoCGetCurrentText", &ScintillaWrapper::AutoCGetCurrentText, "Get currently selected item text in the auto-completion list\nReturns the length of the item text")
+ .def("autoCGetCurrentText", &ScintillaWrapper::AutoCGetCurrentText, "Get currently selected item text in the auto-completion list\nReturns the length of the item text\nResult is NUL-terminated.")
.def("autoCSetCaseInsensitiveBehaviour", &ScintillaWrapper::AutoCSetCaseInsensitiveBehaviour, boost::python::args("behaviour"), "Set auto-completion case insensitive behaviour to either prefer case-sensitive matches or have no preference.")
.def("autoCGetCaseInsensitiveBehaviour", &ScintillaWrapper::AutoCGetCaseInsensitiveBehaviour, "Get auto-completion case insensitive behaviour.")
+ .def("autoCSetMulti", &ScintillaWrapper::AutoCSetMulti, boost::python::args("multi"), "Change the effect of autocompleting when there are multiple selections.")
+ .def("autoCGetMulti", &ScintillaWrapper::AutoCGetMulti, "Retrieve the effect of autocompleting when there are multiple selections..")
.def("autoCSetOrder", &ScintillaWrapper::AutoCSetOrder, boost::python::args("order"), "Set the way autocompletion lists are ordered.")
.def("autoCGetOrder", &ScintillaWrapper::AutoCGetOrder, "Get the way autocompletion lists are ordered.")
.def("allocate", &ScintillaWrapper::Allocate, boost::python::args("bytes"), "Enlarge the document to a particular size of text bytes.")
@@ -729,8 +747,11 @@ BOOST_PYTHON_MODULE(Npp)
.def("vCHomeDisplayExtend", &ScintillaWrapper::VCHomeDisplayExtend, "Like VCHomeDisplay but extending selection to new caret position.")
.def("getCaretLineVisibleAlways", &ScintillaWrapper::GetCaretLineVisibleAlways, "Is the caret line always visible?")
.def("setCaretLineVisibleAlways", &ScintillaWrapper::SetCaretLineVisibleAlways, boost::python::args("alwaysVisible"), "Sets the caret line to always visible.")
+ .def("setLineEndTypesAllowed", &ScintillaWrapper::SetLineEndTypesAllowed, boost::python::args("lineEndBitSet"), "Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.")
+ .def("getLineEndTypesAllowed", &ScintillaWrapper::GetLineEndTypesAllowed, "Get the line end types currently allowed.")
+ .def("getLineEndTypesActive", &ScintillaWrapper::GetLineEndTypesActive, "Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.")
.def("setRepresentation", &ScintillaWrapper::SetRepresentation, boost::python::args("encodedCharacter", "representation"), "Set the way a character is drawn.")
- .def("getRepresentation", &ScintillaWrapper::GetRepresentation, "Set the way a character is drawn.")
+ .def("getRepresentation", &ScintillaWrapper::GetRepresentation, boost::python::args("encodedCharacter"), "Set the way a character is drawn.\nResult is NUL-terminated.")
.def("clearRepresentation", &ScintillaWrapper::ClearRepresentation, boost::python::args("encodedCharacter"), "Remove a character representation.")
.def("startRecord", &ScintillaWrapper::StartRecord, "Start notifying the container of all key presses and commands.")
.def("stopRecord", &ScintillaWrapper::StopRecord, "Stop notifying the container of all key presses and commands.")
@@ -741,19 +762,16 @@ BOOST_PYTHON_MODULE(Npp)
.def("setKeyWords", &ScintillaWrapper::SetKeyWords, boost::python::args("keywordSet", "keyWords"), "Set up the key words used by the lexer.")
.def("setLexerLanguage", &ScintillaWrapper::SetLexerLanguage, boost::python::args("language"), "Set the lexing language of the document based on string name.")
.def("loadLexerLibrary", &ScintillaWrapper::LoadLexerLibrary, boost::python::args("path"), "Load a lexer library (dll / so).")
- .def("getProperty", &ScintillaWrapper::GetProperty, boost::python::args("key"), "Retrieve a \"property\" value previously set with SetProperty.")
- .def("getPropertyExpanded", &ScintillaWrapper::GetPropertyExpanded, boost::python::args("key"), "Retrieve a \"property\" value previously set with SetProperty,\nwith \"$()\" variable replacement on returned buffer.")
+ .def("getProperty", &ScintillaWrapper::GetProperty, boost::python::args("key"), "Retrieve a \"property\" value previously set with SetProperty.\nResult is NUL-terminated.")
+ .def("getPropertyExpanded", &ScintillaWrapper::GetPropertyExpanded, boost::python::args("key"), "Retrieve a \"property\" value previously set with SetProperty,\nwith \"$()\" variable replacement on returned buffer.\nResult is NUL-terminated.")
.def("getPropertyInt", &ScintillaWrapper::GetPropertyInt, boost::python::args("key"), "Retrieve a \"property\" value previously set with SetProperty,\ninterpreted as an int AFTER any \"$()\" variable replacement.")
.def("getStyleBitsNeeded", &ScintillaWrapper::GetStyleBitsNeeded, "Retrieve the number of bits the current lexer needs for styling.")
- .def("getLexerLanguage", &ScintillaWrapper::GetLexerLanguage, "Retrieve the name of the lexer.\nReturn the length of the text.")
+ .def("getLexerLanguage", &ScintillaWrapper::GetLexerLanguage, "Retrieve the name of the lexer.\nReturn the length of the text.\nResult is NUL-terminated.")
.def("privateLexerCall", &ScintillaWrapper::PrivateLexerCall, boost::python::args("operation", "pointer"), "For private communication between an application and a known lexer.")
- .def("propertyNames", &ScintillaWrapper::PropertyNames, "Retrieve a '\n' separated list of properties understood by the current lexer.")
+ .def("propertyNames", &ScintillaWrapper::PropertyNames, "Retrieve a '\n' separated list of properties understood by the current lexer.\nResult is NUL-terminated.")
.def("propertyType", &ScintillaWrapper::PropertyType, boost::python::args("name"), "Retrieve the type of a property.")
- .def("describeProperty", &ScintillaWrapper::DescribeProperty, "Describe a property.")
- .def("describeKeyWordSets", &ScintillaWrapper::DescribeKeyWordSets, "Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.")
- .def("setLineEndTypesAllowed", &ScintillaWrapper::SetLineEndTypesAllowed, boost::python::args("lineEndBitSet"), "Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.")
- .def("getLineEndTypesAllowed", &ScintillaWrapper::GetLineEndTypesAllowed, "Get the line end types currently allowed.")
- .def("getLineEndTypesActive", &ScintillaWrapper::GetLineEndTypesActive, "Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.")
+ .def("describeProperty", &ScintillaWrapper::DescribeProperty, "Describe a property.\nResult is NUL-terminated.")
+ .def("describeKeyWordSets", &ScintillaWrapper::DescribeKeyWordSets, "Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.\nResult is NUL-terminated.")
.def("getLineEndTypesSupported", &ScintillaWrapper::GetLineEndTypesSupported, "Bit set of LineEndType enumertion for which line ends beyond the standard\nLF, CR, and CRLF are supported by the lexer.")
.def("allocateSubStyles", &ScintillaWrapper::AllocateSubStyles, boost::python::args("styleBase", "numberStyles"), "Allocate a set of sub styles for a particular base style, returning start of range")
.def("getSubStylesStart", &ScintillaWrapper::GetSubStylesStart, boost::python::args("styleBase"), "The starting style number for the sub styles associated with a base style")
@@ -763,7 +781,7 @@ BOOST_PYTHON_MODULE(Npp)
.def("freeSubStyles", &ScintillaWrapper::FreeSubStyles, "Free allocated sub styles")
.def("setIdentifiers", &ScintillaWrapper::SetIdentifiers, boost::python::args("style", "identifiers"), "Set the identifiers that are shown in a particular style")
.def("distanceToSecondaryStyles", &ScintillaWrapper::DistanceToSecondaryStyles, "Where styles are duplicated by a feature such as active/inactive code\nreturn the distance between the two types.")
- .def("getSubStyleBases", &ScintillaWrapper::GetSubStyleBases, "Get the set of base styles that can be extended with sub styles")
+ .def("getSubStyleBases", &ScintillaWrapper::GetSubStyleBases, "Get the set of base styles that can be extended with sub styles\nResult is NUL-terminated.")
/* --Autogenerated -------------------- */
;
//lint +e1793
diff --git a/PythonScript/src/ScintillaWrapper.cpp b/PythonScript/src/ScintillaWrapper.cpp
index 151656db..88d1892e 100644
--- a/PythonScript/src/ScintillaWrapper.cpp
+++ b/PythonScript/src/ScintillaWrapper.cpp
@@ -480,7 +480,7 @@ void ScintillaWrapper::forEachLine(PyObject* function)
{
BeginUndoAction();
- long lineCount = GetLineCount();
+ intptr_t lineCount = GetLineCount();
for(int line = 0; line < lineCount;)
{
@@ -506,9 +506,9 @@ void ScintillaWrapper::forEachLine(PyObject* function)
void ScintillaWrapper::deleteLine(int lineNumber)
{
- int start = PositionFromLine(lineNumber);
- int lineCount = GetLineCount();
- int end;
+ intptr_t start = PositionFromLine(lineNumber);
+ intptr_t lineCount = GetLineCount();
+ intptr_t end;
if (lineCount > lineNumber)
{
end = PositionFromLine(lineNumber + 1);
@@ -528,8 +528,8 @@ void ScintillaWrapper::deleteLine(int lineNumber)
void ScintillaWrapper::replaceLine(int lineNumber, boost::python::object newContents)
{
- int start = PositionFromLine(lineNumber);
- int end = GetLineEndPosition(lineNumber);
+ intptr_t start = PositionFromLine(lineNumber);
+ intptr_t end = GetLineEndPosition(lineNumber);
setTarget(start, end);
ReplaceTarget(newContents);
}
@@ -537,8 +537,8 @@ void ScintillaWrapper::replaceLine(int lineNumber, boost::python::object newCont
void ScintillaWrapper::replaceWholeLine(int lineNumber, boost::python::object newContents)
{
- int start = PositionFromLine(lineNumber);
- int end;
+ intptr_t start = PositionFromLine(lineNumber);
+ intptr_t end;
if (GetLineCount() > lineNumber)
{
end = PositionFromLine(lineNumber + 1);
@@ -555,8 +555,8 @@ void ScintillaWrapper::replaceWholeLine(int lineNumber, boost::python::object ne
boost::python::tuple ScintillaWrapper::getUserLineSelection()
{
- int start = GetSelectionStart();
- int end = GetSelectionEnd();
+ intptr_t start = GetSelectionStart();
+ intptr_t end = GetSelectionEnd();
if (start == end)
{
start = 0;
@@ -575,8 +575,8 @@ boost::python::tuple ScintillaWrapper::getUserLineSelection()
boost::python::tuple ScintillaWrapper::getUserCharSelection()
{
- int start = GetSelectionStart();
- int end = GetSelectionEnd();
+ intptr_t start = GetSelectionStart();
+ intptr_t end = GetSelectionEnd();
if (start == end)
{
@@ -797,7 +797,7 @@ void ScintillaWrapper::replaceImpl(boost::python::object searchStr, boost::pytho
int startPosition,
int endPosition)
{
- int currentDocumentCodePage = this->GetCodePage();
+ intptr_t currentDocumentCodePage = this->GetCodePage();
std::string searchChars = extractEncodedString(searchStr, currentDocumentCodePage);
std::string replaceChars;
@@ -812,7 +812,7 @@ void ScintillaWrapper::replaceImpl(boost::python::object searchStr, boost::pytho
std::list replacements;
const char *text = reinterpret_cast(callScintilla(SCI_GETCHARACTERPOINTER));
- int length = callScintilla(SCI_GETLENGTH);
+ intptr_t length = callScintilla(SCI_GETLENGTH);
if (startPosition < 0)
{
@@ -943,7 +943,7 @@ void ScintillaWrapper::searchImpl(boost::python::object searchStr,
int startPosition,
int endPosition)
{
- int currentDocumentCodePage = this->GetCodePage();
+ intptr_t currentDocumentCodePage = this->GetCodePage();
std::string searchChars = extractEncodedString(searchStr, currentDocumentCodePage);
@@ -954,7 +954,7 @@ void ScintillaWrapper::searchImpl(boost::python::object searchStr,
const char *text = reinterpret_cast(callScintilla(SCI_GETCHARACTERPOINTER));
- int length = callScintilla(SCI_GETLENGTH);
+ intptr_t length = callScintilla(SCI_GETLENGTH);
if (startPosition < 0)
{
@@ -1490,7 +1490,7 @@ void ScintillaWrapper::pymlsearch(boost::python::object searchExp, boost::python
boost::python::str ScintillaWrapper::getWord(boost::python::object position, boost::python::object useOnlyWordChars /* = true */)
{
- int pos;
+ intptr_t pos;
if (position.is_none())
{
pos = callScintilla(SCI_GETCURRENTPOS);
@@ -1510,8 +1510,8 @@ boost::python::str ScintillaWrapper::getWord(boost::python::object position, boo
wordChars = boost::python::extract(useOnlyWordChars);
}
- int startPos = callScintilla(SCI_WORDSTARTPOSITION, pos, wordChars);
- int endPos = callScintilla(SCI_WORDENDPOSITION, pos, wordChars);
+ intptr_t startPos = callScintilla(SCI_WORDSTARTPOSITION, pos, wordChars);
+ intptr_t endPos = callScintilla(SCI_WORDENDPOSITION, pos, wordChars);
Sci_TextRange tr;
tr.chrg.cpMin = startPos;
tr.chrg.cpMax = endPos;
diff --git a/PythonScript/src/ScintillaWrapper.h b/PythonScript/src/ScintillaWrapper.h
index 630e9680..4f07d6e6 100644
--- a/PythonScript/src/ScintillaWrapper.h
+++ b/PythonScript/src/ScintillaWrapper.h
@@ -176,16 +176,20 @@ class ScintillaWrapper : public PyProducerConsumer
/* ++Autogenerated ---------------------------------------------------- */
/** Add text to the document at current position.
*/
- int AddText(boost::python::object text);
+ intptr_t AddText(boost::python::object text);
/** Add array of cells to document.
*/
- int AddStyledText(ScintillaCells c);
+ intptr_t AddStyledText(ScintillaCells c);
/** Insert string at a position.
*/
void InsertText(int pos, boost::python::object text);
+ /** Change the text that is being inserted in response to SC_MOD_INSERTCHECK
+ */
+ intptr_t ChangeInsertion(boost::python::object text);
+
/** Delete all text in the document.
*/
void ClearAll();
@@ -200,23 +204,23 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the number of bytes in the document.
*/
- int GetLength();
+ intptr_t GetLength();
/** Returns the character byte at the position.
*/
- int GetCharAt(int pos);
+ intptr_t GetCharAt(int pos);
/** Returns the position of the caret.
*/
- int GetCurrentPos();
+ intptr_t GetCurrentPos();
/** Returns the position of the opposite end of the selection to the caret.
*/
- int GetAnchor();
+ intptr_t GetAnchor();
/** Returns the style byte at the position.
*/
- int GetStyleAt(int pos);
+ intptr_t GetStyleAt(int pos);
/** Redoes the next action on the undo history.
*/
@@ -247,7 +251,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the line number at which a particular marker is located.
*/
- int MarkerLineFromHandle(int handle);
+ intptr_t MarkerLineFromHandle(int handle);
/** Delete a marker.
*/
@@ -260,7 +264,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Are white space characters currently visible?
* Returns one of SCWS_* constants.
*/
- int GetViewWS();
+ intptr_t GetViewWS();
/** Make white space characters invisible, always visible or visible outside indentation.
*/
@@ -268,12 +272,12 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find the position from a point within the window.
*/
- int PositionFromPoint(int x, int y);
+ intptr_t PositionFromPoint(int x, int y);
/** Find the position from a point within the window but return
* INVALID_POSITION if not close to text.
*/
- int PositionFromPointClose(int x, int y);
+ intptr_t PositionFromPointClose(int x, int y);
/** Set caret to start of a line and ensure it is visible.
*/
@@ -290,12 +294,13 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the text of the line containing the caret.
* Returns the index of the caret on the line.
+ * Result is NUL-terminated.
*/
boost::python::str GetCurLine();
/** Retrieve the position of the last correctly styled character.
*/
- int GetEndStyled();
+ intptr_t GetEndStyled();
/** Convert all line endings in the document to one mode.
*/
@@ -303,7 +308,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the current end of line mode - one of CRLF, CR, or LF.
*/
- int GetEOLMode();
+ intptr_t GetEOLMode();
/** Set the current end of line mode.
*/
@@ -334,13 +339,33 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the visible size of a tab.
*/
- int GetTabWidth();
+ intptr_t GetTabWidth();
+
+ /** Clear explicit tabstops on a line.
+ */
+ void ClearTabStops(int line);
+
+ /** Add an explicit tab stop for a line.
+ */
+ void AddTabStop(int line, int x);
+
+ /** Find the next explicit tab stop position on a line after a position.
+ */
+ intptr_t GetNextTabStop(int line, int x);
/** Set the code page used to interpret the bytes of the document as characters.
* The SC_CP_UTF8 value can be used to enter Unicode mode.
*/
void SetCodePage(int codePage);
+ /** Is the IME displayed in a winow or inline?
+ */
+ intptr_t GetIMEInteraction();
+
+ /** Choose to display the the IME in a winow or inline.
+ */
+ void SetIMEInteraction(int imeInteraction);
+
/** Set the symbol used for a particular marker number.
*/
void MarkerDefine(int markerNumber, int markerSymbol);
@@ -363,7 +388,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Add a marker to a line, returning an ID which can be used to find or delete the marker.
*/
- int MarkerAdd(int line, int markerNumber);
+ intptr_t MarkerAdd(int line, int markerNumber);
/** Delete a marker from a line.
*/
@@ -375,16 +400,16 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get a bit mask of all the markers set on a line.
*/
- int MarkerGet(int line);
+ intptr_t MarkerGet(int line);
/** Find the next line at or after lineStart that includes a marker in mask.
* Return -1 when no more lines.
*/
- int MarkerNext(int lineStart, int markerMask);
+ intptr_t MarkerNext(int lineStart, int markerMask);
/** Find the previous line before lineStart that includes a marker in mask.
*/
- int MarkerPrevious(int lineStart, int markerMask);
+ intptr_t MarkerPrevious(int lineStart, int markerMask);
/** Define a marker from a pixmap.
*/
@@ -404,7 +429,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the type of a margin.
*/
- int GetMarginTypeN(int margin);
+ intptr_t GetMarginTypeN(int margin);
/** Set the width of a margin to a width expressed in pixels.
*/
@@ -412,7 +437,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the width of a margin in pixels.
*/
- int GetMarginWidthN(int margin);
+ intptr_t GetMarginWidthN(int margin);
/** Set a mask that determines which markers are displayed in a margin.
*/
@@ -420,7 +445,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the marker mask of a margin.
*/
- int GetMarginMaskN(int margin);
+ intptr_t GetMarginMaskN(int margin);
/** Make a margin sensitive or insensitive to mouse clicks.
*/
@@ -436,7 +461,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the cursor shown in a margin.
*/
- int GetMarginCursorN(int margin);
+ intptr_t GetMarginCursorN(int margin);
/** Clear all the styles and make equivalent to the global default style.
*/
@@ -496,10 +521,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the size of characters of a style.
*/
- int StyleGetSize(int style);
+ intptr_t StyleGetSize(int style);
/** Get the font of a style.
* Returns the length of the fontName
+ * Result is NUL-terminated.
*/
boost::python::str StyleGetFont(int style);
@@ -513,11 +539,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get is a style mixed case, or to force upper or lower case.
*/
- int StyleGetCase(int style);
+ intptr_t StyleGetCase(int style);
/** Get the character get of the font in a style.
*/
- int StyleGetCharacterSet(int style);
+ intptr_t StyleGetCharacterSet(int style);
/** Get is a style visible or not.
*/
@@ -542,7 +568,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the size of characters of a style in points multiplied by 100
*/
- int StyleGetSizeFractional(int style);
+ intptr_t StyleGetSizeFractional(int style);
/** Set the weight of characters of a style.
*/
@@ -550,7 +576,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the weight of characters of a style.
*/
- int StyleGetWeight(int style);
+ intptr_t StyleGetWeight(int style);
/** Set the character set of the font in a style.
*/
@@ -570,7 +596,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the alpha of the selection.
*/
- int GetSelAlpha();
+ intptr_t GetSelAlpha();
/** Set the alpha of the selection.
*/
@@ -602,7 +628,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Set the styles for a segment of the document.
*/
- int SetStylingEx(boost::python::object styles);
+ intptr_t SetStylingEx(boost::python::object styles);
/** Set a style to be visible or not.
*/
@@ -610,7 +636,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the time in milliseconds that the caret is on and off.
*/
- int GetCaretPeriod();
+ intptr_t GetCaretPeriod();
/** Get the time in milliseconds that the caret is on and off. 0 = steady on.
*/
@@ -622,7 +648,7 @@ class ScintillaWrapper : public PyProducerConsumer
void SetWordChars(boost::python::object characters);
/** Get the set of characters making up words for when moving or selecting by word.
- * Retuns the number of characters
+ * Returns the number of characters
*/
boost::python::str GetWordChars();
@@ -641,7 +667,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the style of an indicator.
*/
- int IndicGetStyle(int indic);
+ intptr_t IndicGetStyle(int indic);
/** Set the foreground colour of an indicator.
*/
@@ -659,6 +685,30 @@ class ScintillaWrapper : public PyProducerConsumer
*/
bool IndicGetUnder(int indic);
+ /** Set a hover indicator to plain, squiggle or TT.
+ */
+ void IndicSetHoverStyle(int indic, int style);
+
+ /** Retrieve the hover style of an indicator.
+ */
+ intptr_t IndicGetHoverStyle(int indic);
+
+ /** Set the foreground hover colour of an indicator.
+ */
+ void IndicSetHoverFore(int indic, boost::python::tuple fore);
+
+ /** Retrieve the foreground hover colour of an indicator.
+ */
+ boost::python::tuple IndicGetHoverFore(int indic);
+
+ /** Set the attributes of an indicator.
+ */
+ void IndicSetFlags(int indic, int flags);
+
+ /** Retrieve the attributes of an indicator.
+ */
+ intptr_t IndicGetFlags(int indic);
+
/** Set the foreground colour of all whitespace and whether to use this setting.
*/
void SetWhitespaceFore(bool useSetting, boost::python::tuple fore);
@@ -673,7 +723,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the size of the dots used to mark space characters.
*/
- int GetWhitespaceSize();
+ intptr_t GetWhitespaceSize();
/** Divide each styling byte into lexical class bits (default: 5) and indicator
* bits (default: 3). If a lexer requires more than 32 lexical states, then this
@@ -683,7 +733,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve number of bits in style bytes used to hold the lexical state.
*/
- int GetStyleBits();
+ intptr_t GetStyleBits();
/** Used to hold extra styling information for each line.
*/
@@ -691,11 +741,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the extra styling information for a line.
*/
- int GetLineState(int line);
+ intptr_t GetLineState(int line);
/** Retrieve the last line number that has line state.
*/
- int GetMaxLineState();
+ intptr_t GetMaxLineState();
/** Is the background of the line containing the caret in a different colour?
*/
@@ -734,7 +784,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the position of the caret when the auto-completion list was displayed.
*/
- int AutoCPosStart();
+ intptr_t AutoCPosStart();
/** User has selected an item so remove the list and insert the selection.
*/
@@ -751,7 +801,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the auto-completion list separator character.
*/
- int AutoCGetSeparator();
+ intptr_t AutoCGetSeparator();
/** Select the item in the auto-completion list that starts with a string.
*/
@@ -819,7 +869,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the auto-completion list type-separator character.
*/
- int AutoCGetTypeSeparator();
+ intptr_t AutoCGetTypeSeparator();
/** Change the type-separator character in the string setting up an auto-completion list.
* Default is '?' but can be changed if items contain '?'.
@@ -833,7 +883,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the maximum width, in characters, of auto-completion and user lists.
*/
- int AutoCGetMaxWidth();
+ intptr_t AutoCGetMaxWidth();
/** Set the maximum height, in rows, of auto-completion and user lists.
* The default is 5 rows.
@@ -842,7 +892,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Set the maximum height, in rows, of auto-completion and user lists.
*/
- int AutoCGetMaxHeight();
+ intptr_t AutoCGetMaxHeight();
/** Set the number of spaces used for one level of indentation.
*/
@@ -850,7 +900,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve indentation size.
*/
- int GetIndent();
+ intptr_t GetIndent();
/** Indentation will only use space characters if useTabs is false, otherwise
* it will use a combination of tabs and spaces.
@@ -867,19 +917,19 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the number of columns that a line is indented.
*/
- int GetLineIndentation(int line);
+ intptr_t GetLineIndentation(int line);
/** Retrieve the position before the first non indentation character on a line.
*/
- int GetLineIndentPosition(int line);
+ intptr_t GetLineIndentPosition(int line);
/** Retrieve the column number of a position, taking tab width into account.
*/
- int GetColumn(int pos);
+ intptr_t GetColumn(int pos);
/** Count characters between two positions.
*/
- int CountCharacters(int startPos, int endPos);
+ intptr_t CountCharacters(int startPos, int endPos);
/** Show or hide the horizontal scroll bar.
*/
@@ -895,7 +945,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Are the indentation guides visible?
*/
- int GetIndentationGuides();
+ intptr_t GetIndentationGuides();
/** Set the highlighted indentation guide column.
* 0 = no highlighted guide.
@@ -904,15 +954,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the highlighted indentation guide column.
*/
- int GetHighlightGuide();
+ intptr_t GetHighlightGuide();
/** Get the position after the last visible characters on a line.
*/
- int GetLineEndPosition(int line);
+ intptr_t GetLineEndPosition(int line);
/** Get the code page used to interpret the bytes of the document as characters.
*/
- int GetCodePage();
+ intptr_t GetCodePage();
/** Get the foreground colour of the caret.
*/
@@ -932,7 +982,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the start of the selection.
*/
- int GetSelectionStart();
+ intptr_t GetSelectionStart();
/** Sets the position that ends the selection - this becomes the currentPosition.
*/
@@ -940,7 +990,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetSelectionEnd();
+ intptr_t GetSelectionEnd();
/** Set caret to a position, while removing any existing selection.
*/
@@ -952,7 +1002,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the print magnification.
*/
- int GetPrintMagnification();
+ intptr_t GetPrintMagnification();
/** Modify colours when printing for clearer printed text.
*/
@@ -960,7 +1010,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the print colour mode.
*/
- int GetPrintColourMode();
+ intptr_t GetPrintColourMode();
/** Find some text in the document.
*/
@@ -968,7 +1018,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the display line at the top of the display.
*/
- int GetFirstVisibleLine();
+ intptr_t GetFirstVisibleLine();
/** Retrieve the contents of a line.
* Returns the length of the line.
@@ -977,7 +1027,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the number of lines in the document. There is always at least one.
*/
- int GetLineCount();
+ intptr_t GetLineCount();
/** Sets the size in pixels of the left margin.
*/
@@ -985,7 +1035,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the size in pixels of the left margin.
*/
- int GetMarginLeft();
+ intptr_t GetMarginLeft();
/** Sets the size in pixels of the right margin.
*/
@@ -993,7 +1043,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the size in pixels of the right margin.
*/
- int GetMarginRight();
+ intptr_t GetMarginRight();
/** Is the document different from when it was last saved?
*/
@@ -1005,6 +1055,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the selected text.
* Return the length of the text.
+ * Result is NUL-terminated.
*/
boost::python::str GetSelText();
@@ -1019,19 +1070,19 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the x value of the point in the window where a position is displayed.
*/
- int PointXFromPosition(int pos);
+ intptr_t PointXFromPosition(int pos);
/** Retrieve the y value of the point in the window where a position is displayed.
*/
- int PointYFromPosition(int pos);
+ intptr_t PointYFromPosition(int pos);
/** Retrieve the line containing a position.
*/
- int LineFromPosition(int pos);
+ intptr_t LineFromPosition(int pos);
/** Retrieve the position at the start of a line.
*/
- int PositionFromLine(int line);
+ intptr_t PositionFromLine(int line);
/** Scroll horizontally and vertically.
*/
@@ -1097,21 +1148,22 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve all the text in the document.
* Returns number of characters retrieved.
+ * Result is NUL-terminated.
*/
boost::python::str GetText();
/** Retrieve the number of characters in the document.
*/
- int GetTextLength();
+ intptr_t GetTextLength();
/** Retrieve a pointer to a function that processes messages for this Scintilla.
*/
- int GetDirectFunction();
+ intptr_t GetDirectFunction();
/** Retrieve a pointer value to use as the first argument when calling
* the function returned by GetDirectFunction.
*/
- int GetDirectPointer();
+ intptr_t GetDirectPointer();
/** Set to overtype (true) or insert mode.
*/
@@ -1127,7 +1179,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the width of the insert mode caret.
*/
- int GetCaretWidth();
+ intptr_t GetCaretWidth();
/** Sets the position that starts the target which is used for updating the
* document without affecting the scroll position.
@@ -1136,7 +1188,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the position that starts the target.
*/
- int GetTargetStart();
+ intptr_t GetTargetStart();
/** Sets the position that ends the target which is used for updating the
* document without affecting the scroll position.
@@ -1145,13 +1197,21 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the position that ends the target.
*/
- int GetTargetEnd();
+ intptr_t GetTargetEnd();
+
+ /** Sets both the start and end of the target in one call.
+ */
+ void SetTargetRange(int start, int end);
+
+ /** Retrieve the text in the target.
+ */
+ boost::python::str GetTargetText();
/** Replace the target text with the argument text.
* Text is counted so it can contain NULs.
* Returns the length of the replacement text.
*/
- int ReplaceTarget(boost::python::object text);
+ intptr_t ReplaceTarget(boost::python::object text);
/** Replace the target text with the argument text after \d processing.
* Text is counted so it can contain NULs.
@@ -1160,13 +1220,13 @@ class ScintillaWrapper : public PyProducerConsumer
* Returns the length of the replacement text including any change
* caused by processing the \d patterns.
*/
- int ReplaceTargetRE(boost::python::object text);
+ intptr_t ReplaceTargetRE(boost::python::object text);
/** Search for a counted string in the target and set the target to the found
* range. Text is counted so it can contain NULs.
* Returns length of range or -1 for failure in which case target is not moved.
*/
- int SearchInTarget(boost::python::object text);
+ intptr_t SearchInTarget(boost::python::object text);
/** Set the search flags used by SearchInTarget.
*/
@@ -1174,7 +1234,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the search flags used by SearchInTarget.
*/
- int GetSearchFlags();
+ intptr_t GetSearchFlags();
/** Show a call tip containing a definition near position pos.
*/
@@ -1190,7 +1250,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the position where the caret was before displaying the call tip.
*/
- int CallTipPosStart();
+ intptr_t CallTipPosStart();
/** Set the start position in order to change when backspacing removes the calltip.
*/
@@ -1222,15 +1282,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find the display line of a document line taking hidden lines into account.
*/
- int VisibleFromDocLine(int line);
+ intptr_t VisibleFromDocLine(int line);
/** Find the document line of a display line taking hidden lines into account.
*/
- int DocLineFromVisible(int lineDisplay);
+ intptr_t DocLineFromVisible(int lineDisplay);
/** The number of display lines needed to wrap a document line
*/
- int WrapCount(int line);
+ intptr_t WrapCount(int line);
/** Set the fold level of a line.
* This encodes an integer level along with flags indicating whether the
@@ -1240,15 +1300,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the fold level of a line.
*/
- int GetFoldLevel(int line);
+ intptr_t GetFoldLevel(int line);
/** Find the last child line of a header line.
*/
- int GetLastChild(int line, int level);
+ intptr_t GetLastChild(int line, int level);
/** Find the parent line of a child line.
*/
- int GetFoldParent(int line);
+ intptr_t GetFoldParent(int line);
/** Make a range of lines visible.
*/
@@ -1304,7 +1364,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get automatic folding behaviours.
*/
- int GetAutomaticFold();
+ intptr_t GetAutomaticFold();
/** Set some style options for folding.
*/
@@ -1337,15 +1397,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the time the mouse must sit still to generate a mouse dwell event.
*/
- int GetMouseDwellTime();
+ intptr_t GetMouseDwellTime();
/** Get position of start of word.
*/
- int WordStartPosition(int pos, bool onlyWordCharacters);
+ intptr_t WordStartPosition(int pos, bool onlyWordCharacters);
/** Get position of end of word.
*/
- int WordEndPosition(int pos, bool onlyWordCharacters);
+ intptr_t WordEndPosition(int pos, bool onlyWordCharacters);
/** Sets whether text is word wrapped.
*/
@@ -1353,7 +1413,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve whether text is word wrapped.
*/
- int GetWrapMode();
+ intptr_t GetWrapMode();
/** Set the display mode of visual flags for wrapped lines.
*/
@@ -1361,7 +1421,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrive the display mode of visual flags for wrapped lines.
*/
- int GetWrapVisualFlags();
+ intptr_t GetWrapVisualFlags();
/** Set the location of visual flags for wrapped lines.
*/
@@ -1369,7 +1429,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrive the location of visual flags for wrapped lines.
*/
- int GetWrapVisualFlagsLocation();
+ intptr_t GetWrapVisualFlagsLocation();
/** Set the start indent for wrapped lines.
*/
@@ -1377,7 +1437,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrive the start indent for wrapped lines.
*/
- int GetWrapStartIndent();
+ intptr_t GetWrapStartIndent();
/** Sets how wrapped sublines are placed. Default is fixed.
*/
@@ -1385,7 +1445,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve how wrapped sublines are placed. Default is fixed.
*/
- int GetWrapIndentMode();
+ intptr_t GetWrapIndentMode();
/** Sets the degree of caching of layout information.
*/
@@ -1393,7 +1453,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the degree of caching of layout information.
*/
- int GetLayoutCache();
+ intptr_t GetLayoutCache();
/** Sets the document width assumed for scrolling.
*/
@@ -1401,7 +1461,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the document width assumed for scrolling.
*/
- int GetScrollWidth();
+ intptr_t GetScrollWidth();
/** Sets whether the maximum width line displayed is used to set scroll width.
*/
@@ -1415,7 +1475,7 @@ class ScintillaWrapper : public PyProducerConsumer
* NUL terminated text argument.
* Does not handle tab or control characters.
*/
- int TextWidth(int style, boost::python::object text);
+ intptr_t TextWidth(int style, boost::python::object text);
/** Sets the scroll range so that maximum scroll position has
* the last line at the bottom of the view (default).
@@ -1430,7 +1490,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the height of a particular line of text in pixels.
*/
- int TextHeight(int line);
+ intptr_t TextHeight(int line);
/** Show or hide the vertical scroll bar.
*/
@@ -1442,9 +1502,9 @@ class ScintillaWrapper : public PyProducerConsumer
/** Append a string to the end of the document without changing the selection.
*/
- int AppendText(boost::python::object text);
+ intptr_t AppendText(boost::python::object text);
- /** Is drawing done in two phases with backgrounds drawn before faoregrounds?
+ /** Is drawing done in two phases with backgrounds drawn before foregrounds?
*/
bool GetTwoPhaseDraw();
@@ -1453,13 +1513,24 @@ class ScintillaWrapper : public PyProducerConsumer
*/
void SetTwoPhaseDraw(bool twoPhase);
+ /** How many phases is drawing done in?
+ */
+ intptr_t GetPhasesDraw();
+
+ /** In one phase draw, text is drawn in a series of rectangular blocks with no overlap.
+ * In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.
+ * In multiple phase draw, each element is drawn over the whole drawing area, allowing text
+ * to overlap from one line to the next.
+ */
+ void SetPhasesDraw(int phases);
+
/** Choose the quality level for text from the FontQuality enumeration.
*/
void SetFontQuality(int fontQuality);
/** Retrieve the quality level for text.
*/
- int GetFontQuality();
+ intptr_t GetFontQuality();
/** Scroll so that a display line is at the top of the display.
*/
@@ -1471,9 +1542,10 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the effect of pasting when there are multiple selections..
*/
- int GetMultiPaste();
+ intptr_t GetMultiPaste();
/** Retrieve the value of a tag from a regular expression search.
+ * Result is NUL-terminated.
*/
boost::python::str GetTag(int tagNumber);
@@ -1765,7 +1837,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** How many characters are on a line, including end of line characters?
*/
- int LineLength(int line);
+ intptr_t LineLength(int line);
/** Highlight the characters at two positions.
*/
@@ -1785,7 +1857,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find the position of a matching brace or INVALID_POSITION if no match.
*/
- int BraceMatch(int pos);
+ intptr_t BraceMatch(int pos);
/** Are the end of line characters visible?
*/
@@ -1797,11 +1869,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve a pointer to the document object.
*/
- int GetDocPointer();
+ intptr_t GetDocPointer();
/** Change the document object used.
*/
- void SetDocPointer(int pointer);
+ void SetDocPointer(intptr_t pointer);
/** Set which document modification events are sent to the container.
*/
@@ -1809,7 +1881,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the column number which text should be kept within.
*/
- int GetEdgeColumn();
+ intptr_t GetEdgeColumn();
/** Set the column number of the edge.
* If text goes past the edge then it is highlighted.
@@ -1818,7 +1890,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the edge highlight mode.
*/
- int GetEdgeMode();
+ intptr_t GetEdgeMode();
/** The edge may be displayed by a line (EDGE_LINE) or by highlighting text that
* goes beyond it (EDGE_BACKGROUND) or not displayed at all (EDGE_NONE).
@@ -1840,16 +1912,16 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find some text starting at the search anchor.
* Does not ensure the selection is visible.
*/
- int SearchNext(int flags, boost::python::object text);
+ intptr_t SearchNext(int flags, boost::python::object text);
/** Find some text starting at the search anchor and moving backwards.
* Does not ensure the selection is visible.
*/
- int SearchPrev(int flags, boost::python::object text);
+ intptr_t SearchPrev(int flags, boost::python::object text);
/** Retrieves the number of lines completely visible.
*/
- int LinesOnScreen();
+ intptr_t LinesOnScreen();
/** Set whether a pop up menu is displayed automatically when the user presses
* the wrong mouse button.
@@ -1867,24 +1939,24 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the zoom level.
*/
- int GetZoom();
+ intptr_t GetZoom();
/** Create a new document object.
* Starts with reference count of 1 and not selected into editor.
*/
- int CreateDocument();
+ intptr_t CreateDocument();
/** Extend life of document.
*/
- void AddRefDocument(int doc);
+ void AddRefDocument(intptr_t doc);
/** Release a reference to the document, deleting document if it fades to black.
*/
- void ReleaseDocument(int doc);
+ void ReleaseDocument(intptr_t doc);
/** Get which document modification events are sent to the container.
*/
- int GetModEventMask();
+ intptr_t GetModEventMask();
/** Change internal focus flag.
*/
@@ -1900,7 +1972,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get error status.
*/
- int GetStatus();
+ intptr_t GetStatus();
/** Set whether the mouse is captured when its button is pressed.
*/
@@ -1916,7 +1988,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get cursor type.
*/
- int GetCursor();
+ intptr_t GetCursor();
/** Change the way control characters are displayed:
* If symbol is < 32, keep the drawn way, else, use the given character.
@@ -1925,7 +1997,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the way control characters are displayed.
*/
- int GetControlCharSymbol();
+ intptr_t GetControlCharSymbol();
/** Move to the previous change in capitalisation.
*/
@@ -1964,7 +2036,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get and Set the xOffset (ie, horizontal scroll position).
*/
- int GetXOffset();
+ intptr_t GetXOffset();
/** Set the last x chosen value to be the caret x position.
*/
@@ -1990,7 +2062,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Is printing line wrapped?
*/
- int GetPrintWrapMode();
+ intptr_t GetPrintWrapMode();
/** Set a fore colour for active hotspots.
*/
@@ -2043,17 +2115,17 @@ class ScintillaWrapper : public PyProducerConsumer
/** Given a valid document position, return the previous position taking code
* page into account. Returns 0 if passed 0.
*/
- int PositionBefore(int pos);
+ intptr_t PositionBefore(int pos);
/** Given a valid document position, return the next position taking code
* page into account. Maximum value returned is the last position in the document.
*/
- int PositionAfter(int pos);
+ intptr_t PositionAfter(int pos);
/** Given a valid document position, return a position that differs in a number
* of characters. Returned value is always between 0 and last position in document.
*/
- int PositionRelative(int pos, int relative);
+ intptr_t PositionRelative(int pos, int relative);
/** Copy a range of text to the clipboard. Positions are clipped into the document.
*/
@@ -2061,7 +2133,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Copy argument text to the clipboard.
*/
- int CopyText(boost::python::object text);
+ intptr_t CopyText(boost::python::object text);
/** Set the selection mode to stream (SC_SEL_STREAM) or rectangular (SC_SEL_RECTANGLE/SC_SEL_THIN) or
* by lines (SC_SEL_LINES).
@@ -2070,15 +2142,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the mode of the current selection.
*/
- int GetSelectionMode();
+ intptr_t GetSelectionMode();
/** Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
*/
- int GetLineSelStartPosition(int line);
+ intptr_t GetLineSelStartPosition(int line);
/** Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
*/
- int GetLineSelEndPosition(int line);
+ intptr_t GetLineSelEndPosition(int line);
/** Move caret down one line, extending rectangular selection to new caret position.
*/
@@ -2174,10 +2246,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get currently selected item position in the auto-completion list
*/
- int AutoCGetCurrent();
+ intptr_t AutoCGetCurrent();
/** Get currently selected item text in the auto-completion list
* Returns the length of the item text
+ * Result is NUL-terminated.
*/
boost::python::str AutoCGetCurrentText();
@@ -2187,7 +2260,15 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get auto-completion case insensitive behaviour.
*/
- int AutoCGetCaseInsensitiveBehaviour();
+ intptr_t AutoCGetCaseInsensitiveBehaviour();
+
+ /** Change the effect of autocompleting when there are multiple selections.
+ */
+ void AutoCSetMulti(int multi);
+
+ /** Retrieve the effect of autocompleting when there are multiple selections..
+ */
+ intptr_t AutoCGetMulti();
/** Set the way autocompletion lists are ordered.
*/
@@ -2195,7 +2276,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the way autocompletion lists are ordered.
*/
- int AutoCGetOrder();
+ intptr_t AutoCGetOrder();
/** Enlarge the document to a particular size of text bytes.
*/
@@ -2220,11 +2301,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find the position of a column on a line taking into account tabs and
* multi-byte characters. If beyond end of line, return line end position.
*/
- int FindColumn(int line, int column);
+ intptr_t FindColumn(int line, int column);
/** Can the caret preferred x position only be changed by explicit movement commands?
*/
- int GetCaretSticky();
+ intptr_t GetCaretSticky();
/** Stop the caret preferred x position changing when the user types.
*/
@@ -2252,7 +2333,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the background alpha of the caret line.
*/
- int GetCaretLineBackAlpha();
+ intptr_t GetCaretLineBackAlpha();
/** Set the style of the caret to be drawn.
*/
@@ -2260,7 +2341,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the current style of the caret.
*/
- int GetCaretStyle();
+ intptr_t GetCaretStyle();
/** Set the indicator used for IndicatorFillRange and IndicatorClearRange
*/
@@ -2268,7 +2349,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the current indicator
*/
- int GetIndicatorCurrent();
+ intptr_t GetIndicatorCurrent();
/** Set the value used for IndicatorFillRange
*/
@@ -2276,7 +2357,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the current indicator value
*/
- int GetIndicatorValue();
+ intptr_t GetIndicatorValue();
/** Turn a indicator on over a range.
*/
@@ -2288,19 +2369,19 @@ class ScintillaWrapper : public PyProducerConsumer
/** Are any indicators present at position?
*/
- int IndicatorAllOnFor(int position);
+ intptr_t IndicatorAllOnFor(int position);
/** What value does a particular indicator have at at a position?
*/
- int IndicatorValueAt(int indicator, int position);
+ intptr_t IndicatorValueAt(int indicator, int position);
/** Where does a particular indicator start?
*/
- int IndicatorStart(int indicator, int position);
+ intptr_t IndicatorStart(int indicator, int position);
/** Where does a particular indicator end?
*/
- int IndicatorEnd(int indicator, int position);
+ intptr_t IndicatorEnd(int indicator, int position);
/** Set number of entries in position cache
*/
@@ -2308,7 +2389,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** How many entries are allocated to the position cache?
*/
- int GetPositionCache();
+ intptr_t GetPositionCache();
/** Copy the selection, if selection empty copy the line with the caret
*/
@@ -2317,7 +2398,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Return a position which, to avoid performance costs, should not be within
* the range of a call to GetRangePointer.
*/
- int GetGapPosition();
+ intptr_t GetGapPosition();
/** Set the alpha fill colour of the given indicator.
*/
@@ -2325,7 +2406,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the alpha fill colour of the given indicator.
*/
- int IndicGetAlpha(int indicator);
+ intptr_t IndicGetAlpha(int indicator);
/** Set the alpha outline colour of the given indicator.
*/
@@ -2333,7 +2414,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the alpha outline colour of the given indicator.
*/
- int IndicGetOutlineAlpha(int indicator);
+ intptr_t IndicGetOutlineAlpha(int indicator);
/** Set extra ascent for each line
*/
@@ -2341,7 +2422,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get extra ascent for each line
*/
- int GetExtraAscent();
+ intptr_t GetExtraAscent();
/** Set extra descent for each line
*/
@@ -2349,11 +2430,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get extra descent for each line
*/
- int GetExtraDescent();
+ intptr_t GetExtraDescent();
/** Which symbol was defined for markerNumber with MarkerDefine
*/
- int MarkerSymbolDefined(int markerNumber);
+ intptr_t MarkerSymbolDefined(int markerNumber);
/** Set the text in the text margin for a line
*/
@@ -2369,7 +2450,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the style number for the text margin for a line
*/
- int MarginGetStyle(int line);
+ intptr_t MarginGetStyle(int line);
/** Set the style in the text margin for a line
*/
@@ -2389,7 +2470,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the start of the range of style numbers used for margin text
*/
- int MarginGetStyleOffset();
+ intptr_t MarginGetStyleOffset();
/** Set the margin options.
*/
@@ -2397,7 +2478,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the margin options.
*/
- int GetMarginOptions();
+ intptr_t GetMarginOptions();
/** Set the annotation text for a line
*/
@@ -2413,7 +2494,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the style number for the annotations for a line
*/
- int AnnotationGetStyle(int line);
+ intptr_t AnnotationGetStyle(int line);
/** Set the annotation styles for a line
*/
@@ -2425,7 +2506,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the number of annotation lines for a line
*/
- int AnnotationGetLines(int line);
+ intptr_t AnnotationGetLines(int line);
/** Clear the annotations from all lines
*/
@@ -2437,7 +2518,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the visibility for the annotations for a view
*/
- int AnnotationGetVisible();
+ intptr_t AnnotationGetVisible();
/** Get the start of the range of style numbers used for annotations
*/
@@ -2445,7 +2526,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the start of the range of style numbers used for annotations
*/
- int AnnotationGetStyleOffset();
+ intptr_t AnnotationGetStyleOffset();
/** Release all extended (>255) style numbers
*/
@@ -2453,7 +2534,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Allocate some extended (>255) style numbers and return the start of the range
*/
- int AllocateExtendedStyles(int numberStyles);
+ intptr_t AllocateExtendedStyles(int numberStyles);
/** Add a container action to the undo stack
*/
@@ -2461,12 +2542,12 @@ class ScintillaWrapper : public PyProducerConsumer
/** Find the position of a character from a point within the window.
*/
- int CharPositionFromPoint(int x, int y);
+ intptr_t CharPositionFromPoint(int x, int y);
/** Find the position of a character from a point within the window.
* Return INVALID_POSITION if not close to text.
*/
- int CharPositionFromPointClose(int x, int y);
+ intptr_t CharPositionFromPointClose(int x, int y);
/** Set whether switching to rectangular mode while selecting with the mouse is allowed.
*/
@@ -2510,7 +2591,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** How many selections are there?
*/
- int GetSelections();
+ intptr_t GetSelections();
/** Is every selected range empty?
*/
@@ -2522,11 +2603,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Set a simple selection
*/
- int SetSelection(int caret, int anchor);
+ intptr_t SetSelection(int caret, int anchor);
/** Add a selection
*/
- int AddSelection(int caret, int anchor);
+ intptr_t AddSelection(int caret, int anchor);
/** Drop one selection
*/
@@ -2538,7 +2619,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Which selection is the main selection
*/
- int GetMainSelection();
+ intptr_t GetMainSelection();
/** Which selection is the main selection
*/
@@ -2546,7 +2627,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Which selection is the main selection
*/
- int GetSelectionNCaret(int selection);
+ intptr_t GetSelectionNCaret(int selection);
/** Which selection is the main selection
*/
@@ -2554,7 +2635,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Which selection is the main selection
*/
- int GetSelectionNAnchor(int selection);
+ intptr_t GetSelectionNAnchor(int selection);
/** Which selection is the main selection
*/
@@ -2562,7 +2643,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Which selection is the main selection
*/
- int GetSelectionNCaretVirtualSpace(int selection);
+ intptr_t GetSelectionNCaretVirtualSpace(int selection);
/** Which selection is the main selection
*/
@@ -2570,7 +2651,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Which selection is the main selection
*/
- int GetSelectionNAnchorVirtualSpace(int selection);
+ intptr_t GetSelectionNAnchorVirtualSpace(int selection);
/** Sets the position that starts the selection - this becomes the anchor.
*/
@@ -2578,7 +2659,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the start of the selection.
*/
- int GetSelectionNStart(int selection);
+ intptr_t GetSelectionNStart(int selection);
/** Sets the position that ends the selection - this becomes the currentPosition.
*/
@@ -2586,7 +2667,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetSelectionNEnd(int selection);
+ intptr_t GetSelectionNEnd(int selection);
/** Returns the position at the end of the selection.
*/
@@ -2594,7 +2675,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetRectangularSelectionCaret();
+ intptr_t GetRectangularSelectionCaret();
/** Returns the position at the end of the selection.
*/
@@ -2602,7 +2683,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetRectangularSelectionAnchor();
+ intptr_t GetRectangularSelectionAnchor();
/** Returns the position at the end of the selection.
*/
@@ -2610,7 +2691,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetRectangularSelectionCaretVirtualSpace();
+ intptr_t GetRectangularSelectionCaretVirtualSpace();
/** Returns the position at the end of the selection.
*/
@@ -2618,7 +2699,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetRectangularSelectionAnchorVirtualSpace();
+ intptr_t GetRectangularSelectionAnchorVirtualSpace();
/** Returns the position at the end of the selection.
*/
@@ -2626,7 +2707,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Returns the position at the end of the selection.
*/
- int GetVirtualSpaceOptions();
+ intptr_t GetVirtualSpaceOptions();
/** On GTK+, allow selecting the modifier key to use for mouse-based
* rectangular selection. Often the window manager requires Alt+Mouse Drag
@@ -2637,7 +2718,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the modifier key used for rectangular selection.
*/
- int GetRectangularSelectionModifier();
+ intptr_t GetRectangularSelectionModifier();
/** Set the foreground colour of additional selections.
* Must have previously called SetSelFore with non-zero first argument for this to have an effect.
@@ -2655,7 +2736,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the alpha of the selection.
*/
- int GetAdditionalSelAlpha();
+ intptr_t GetAdditionalSelAlpha();
/** Set the foreground colour of additional carets.
*/
@@ -2676,12 +2757,12 @@ class ScintillaWrapper : public PyProducerConsumer
/** Indicate that the internal state of a lexer has changed over a range and therefore
* there may be a need to redraw.
*/
- int ChangeLexerState(int start, int end);
+ intptr_t ChangeLexerState(int start, int end);
/** Find the next line at or after lineStart that is a contracted fold header line.
* Return -1 when no more lines.
*/
- int ContractedFoldNext(int lineStart);
+ intptr_t ContractedFoldNext(int lineStart);
/** Centre current line in window.
*/
@@ -2701,7 +2782,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the identifier.
*/
- int GetIdentifier();
+ intptr_t GetIdentifier();
/** Set the width for future RGBA image data.
*/
@@ -2739,11 +2820,11 @@ class ScintillaWrapper : public PyProducerConsumer
/** Get the tech.
*/
- int GetTechnology();
+ intptr_t GetTechnology();
/** Create an ILoader*.
*/
- int CreateLoader(int bytes);
+ intptr_t CreateLoader(int bytes);
/** On OS X, show a find indicator.
*/
@@ -2774,13 +2855,26 @@ class ScintillaWrapper : public PyProducerConsumer
*/
void SetCaretLineVisibleAlways(bool alwaysVisible);
+ /** Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
+ */
+ void SetLineEndTypesAllowed(int lineEndBitSet);
+
+ /** Get the line end types currently allowed.
+ */
+ intptr_t GetLineEndTypesAllowed();
+
+ /** Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
+ */
+ intptr_t GetLineEndTypesActive();
+
/** Set the way a character is drawn.
*/
void SetRepresentation(boost::python::object encodedCharacter, boost::python::object representation);
/** Set the way a character is drawn.
+ * Result is NUL-terminated.
*/
- boost::python::str GetRepresentation();
+ boost::python::str GetRepresentation(boost::python::object encodedCharacter);
/** Remove a character representation.
*/
@@ -2800,7 +2894,7 @@ class ScintillaWrapper : public PyProducerConsumer
/** Retrieve the lexing language of the document.
*/
- int GetLexer();
+ intptr_t GetLexer();
/** Colourise a segment of the document using the current lexing language.
*/
@@ -2823,84 +2917,78 @@ class ScintillaWrapper : public PyProducerConsumer
void LoadLexerLibrary(boost::python::object path);
/** Retrieve a "property" value previously set with SetProperty.
+ * Result is NUL-terminated.
*/
boost::python::str GetProperty(boost::python::object key);
/** Retrieve a "property" value previously set with SetProperty,
* with "$()" variable replacement on returned buffer.
+ * Result is NUL-terminated.
*/
boost::python::str GetPropertyExpanded(boost::python::object key);
/** Retrieve a "property" value previously set with SetProperty,
* interpreted as an int AFTER any "$()" variable replacement.
*/
- int GetPropertyInt(boost::python::object key);
+ intptr_t GetPropertyInt(boost::python::object key);
/** Retrieve the number of bits the current lexer needs for styling.
*/
- int GetStyleBitsNeeded();
+ intptr_t GetStyleBitsNeeded();
/** Retrieve the name of the lexer.
* Return the length of the text.
+ * Result is NUL-terminated.
*/
boost::python::str GetLexerLanguage();
/** For private communication between an application and a known lexer.
*/
- int PrivateLexerCall(int operation, int pointer);
+ intptr_t PrivateLexerCall(intptr_t operation, intptr_t pointer);
/** Retrieve a '\n' separated list of properties understood by the current lexer.
+ * Result is NUL-terminated.
*/
boost::python::str PropertyNames();
/** Retrieve the type of a property.
*/
- int PropertyType(boost::python::object name);
+ intptr_t PropertyType(boost::python::object name);
/** Describe a property.
+ * Result is NUL-terminated.
*/
boost::python::str DescribeProperty();
/** Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
+ * Result is NUL-terminated.
*/
boost::python::str DescribeKeyWordSets();
- /** Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
- */
- void SetLineEndTypesAllowed(int lineEndBitSet);
-
- /** Get the line end types currently allowed.
- */
- int GetLineEndTypesAllowed();
-
- /** Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
- */
- int GetLineEndTypesActive();
-
/** Bit set of LineEndType enumertion for which line ends beyond the standard
* LF, CR, and CRLF are supported by the lexer.
*/
- int GetLineEndTypesSupported();
+ intptr_t GetLineEndTypesSupported();
/** Allocate a set of sub styles for a particular base style, returning start of range
*/
- int AllocateSubStyles(int styleBase, int numberStyles);
+ intptr_t AllocateSubStyles(int styleBase, int numberStyles);
/** The starting style number for the sub styles associated with a base style
*/
- int GetSubStylesStart(int styleBase);
+ intptr_t GetSubStylesStart(int styleBase);
/** The number of sub styles associated with a base style
*/
- int GetSubStylesLength(int styleBase);
+ intptr_t GetSubStylesLength(int styleBase);
/** For a sub style, return the base style, else return the argument.
*/
- int GetStyleFromSubStyle(int subStyle);
+ intptr_t GetStyleFromSubStyle(int subStyle);
/** For a secondary style, return the primary style, else return the argument.
*/
- int GetPrimaryStyleFromStyle(int style);
+ intptr_t GetPrimaryStyleFromStyle(int style);
/** Free allocated sub styles
*/
@@ -2913,9 +3001,10 @@ class ScintillaWrapper : public PyProducerConsumer
/** Where styles are duplicated by a feature such as active/inactive code
* return the distance between the two types.
*/
- int DistanceToSecondaryStyles();
+ intptr_t DistanceToSecondaryStyles();
/** Get the set of base styles that can be extended with sub styles
+ * Result is NUL-terminated.
*/
boost::python::str GetSubStyleBases();
diff --git a/PythonScript/src/ScintillaWrapperGenerated.cpp b/PythonScript/src/ScintillaWrapperGenerated.cpp
index 66d99315..b2977ba4 100644
--- a/PythonScript/src/ScintillaWrapperGenerated.cpp
+++ b/PythonScript/src/ScintillaWrapperGenerated.cpp
@@ -22,10 +22,10 @@ class PythonCompatibleStrBuffer
if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = '\0';
}
inline explicit PythonCompatibleStrBuffer(LRESULT length) :
- m_bufferLen(length >= 0 ? (size_t)(length + 1) : 0),
+ m_bufferLen(length >= 0 ? (size_t)(length+1) : 0),
m_bufferPtr(new char[m_bufferLen])
{
- if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen - 1] = '\0';
+ if (m_bufferPtr && m_bufferLen > 0) m_bufferPtr[m_bufferLen-1] = '\0';
}
inline ~PythonCompatibleStrBuffer() { delete [] m_bufferPtr; }
inline char* operator*() { return m_bufferPtr; }
@@ -41,7 +41,7 @@ class PythonCompatibleStrBuffer
/** Add text to the document at current position.
*/
-int ScintillaWrapper::AddText(boost::python::object text)
+intptr_t ScintillaWrapper::AddText(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::AddText\n");
std::string s = getStringFromObject(text);
@@ -50,7 +50,7 @@ int ScintillaWrapper::AddText(boost::python::object text)
/** Add array of cells to document.
*/
-int ScintillaWrapper::AddStyledText(ScintillaCells c)
+intptr_t ScintillaWrapper::AddStyledText(ScintillaCells c)
{
DEBUG_TRACE(L"ScintillaWrapper::AddStyledText\n");
return callScintilla(SCI_ADDSTYLEDTEXT, c.length(), reinterpret_cast(c.cells()));
@@ -65,6 +65,15 @@ void ScintillaWrapper::InsertText(int pos, boost::python::object text)
callScintilla(SCI_INSERTTEXT, pos, reinterpret_cast(stringtext.c_str()));
}
+/** Change the text that is being inserted in response to SC_MOD_INSERTCHECK
+ */
+intptr_t ScintillaWrapper::ChangeInsertion(boost::python::object text)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::ChangeInsertion\n");
+ std::string s = getStringFromObject(text);
+ return callScintilla(SCI_CHANGEINSERTION, s.size(), reinterpret_cast(s.c_str()));
+}
+
/** Delete all text in the document.
*/
void ScintillaWrapper::ClearAll()
@@ -91,7 +100,7 @@ void ScintillaWrapper::ClearDocumentStyle()
/** Returns the number of bytes in the document.
*/
-int ScintillaWrapper::GetLength()
+intptr_t ScintillaWrapper::GetLength()
{
DEBUG_TRACE(L"ScintillaWrapper::GetLength\n");
return callScintilla(SCI_GETLENGTH);
@@ -99,7 +108,7 @@ int ScintillaWrapper::GetLength()
/** Returns the character byte at the position.
*/
-int ScintillaWrapper::GetCharAt(int pos)
+intptr_t ScintillaWrapper::GetCharAt(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::GetCharAt\n");
return callScintilla(SCI_GETCHARAT, pos);
@@ -107,7 +116,7 @@ int ScintillaWrapper::GetCharAt(int pos)
/** Returns the position of the caret.
*/
-int ScintillaWrapper::GetCurrentPos()
+intptr_t ScintillaWrapper::GetCurrentPos()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCurrentPos\n");
return callScintilla(SCI_GETCURRENTPOS);
@@ -115,7 +124,7 @@ int ScintillaWrapper::GetCurrentPos()
/** Returns the position of the opposite end of the selection to the caret.
*/
-int ScintillaWrapper::GetAnchor()
+intptr_t ScintillaWrapper::GetAnchor()
{
DEBUG_TRACE(L"ScintillaWrapper::GetAnchor\n");
return callScintilla(SCI_GETANCHOR);
@@ -123,7 +132,7 @@ int ScintillaWrapper::GetAnchor()
/** Returns the style byte at the position.
*/
-int ScintillaWrapper::GetStyleAt(int pos)
+intptr_t ScintillaWrapper::GetStyleAt(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::GetStyleAt\n");
return callScintilla(SCI_GETSTYLEAT, pos);
@@ -202,7 +211,7 @@ bool ScintillaWrapper::CanRedo()
/** Retrieve the line number at which a particular marker is located.
*/
-int ScintillaWrapper::MarkerLineFromHandle(int handle)
+intptr_t ScintillaWrapper::MarkerLineFromHandle(int handle)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerLineFromHandle\n");
return callScintilla(SCI_MARKERLINEFROMHANDLE, handle);
@@ -227,7 +236,7 @@ bool ScintillaWrapper::GetUndoCollection()
/** Are white space characters currently visible?
* Returns one of SCWS_* constants.
*/
-int ScintillaWrapper::GetViewWS()
+intptr_t ScintillaWrapper::GetViewWS()
{
DEBUG_TRACE(L"ScintillaWrapper::GetViewWS\n");
return callScintilla(SCI_GETVIEWWS);
@@ -243,7 +252,7 @@ void ScintillaWrapper::SetViewWS(int viewWS)
/** Find the position from a point within the window.
*/
-int ScintillaWrapper::PositionFromPoint(int x, int y)
+intptr_t ScintillaWrapper::PositionFromPoint(int x, int y)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionFromPoint\n");
return callScintilla(SCI_POSITIONFROMPOINT, x, y);
@@ -252,7 +261,7 @@ int ScintillaWrapper::PositionFromPoint(int x, int y)
/** Find the position from a point within the window but return
* INVALID_POSITION if not close to text.
*/
-int ScintillaWrapper::PositionFromPointClose(int x, int y)
+intptr_t ScintillaWrapper::PositionFromPointClose(int x, int y)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionFromPointClose\n");
return callScintilla(SCI_POSITIONFROMPOINTCLOSE, x, y);
@@ -285,6 +294,7 @@ void ScintillaWrapper::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.
*/
boost::python::str ScintillaWrapper::GetCurLine()
{
@@ -298,7 +308,7 @@ boost::python::str ScintillaWrapper::GetCurLine()
/** Retrieve the position of the last correctly styled character.
*/
-int ScintillaWrapper::GetEndStyled()
+intptr_t ScintillaWrapper::GetEndStyled()
{
DEBUG_TRACE(L"ScintillaWrapper::GetEndStyled\n");
return callScintilla(SCI_GETENDSTYLED);
@@ -314,7 +324,7 @@ void ScintillaWrapper::ConvertEOLs(int eolMode)
/** Retrieve the current end of line mode - one of CRLF, CR, or LF.
*/
-int ScintillaWrapper::GetEOLMode()
+intptr_t ScintillaWrapper::GetEOLMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetEOLMode\n");
return callScintilla(SCI_GETEOLMODE);
@@ -373,12 +383,36 @@ void ScintillaWrapper::SetTabWidth(int tabWidth)
/** Retrieve the visible size of a tab.
*/
-int ScintillaWrapper::GetTabWidth()
+intptr_t ScintillaWrapper::GetTabWidth()
{
DEBUG_TRACE(L"ScintillaWrapper::GetTabWidth\n");
return callScintilla(SCI_GETTABWIDTH);
}
+/** Clear explicit tabstops on a line.
+ */
+void ScintillaWrapper::ClearTabStops(int line)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::ClearTabStops\n");
+ callScintilla(SCI_CLEARTABSTOPS, line);
+}
+
+/** Add an explicit tab stop for a line.
+ */
+void ScintillaWrapper::AddTabStop(int line, int x)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::AddTabStop\n");
+ callScintilla(SCI_ADDTABSTOP, line, x);
+}
+
+/** Find the next explicit tab stop position on a line after a position.
+ */
+intptr_t ScintillaWrapper::GetNextTabStop(int line, int x)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetNextTabStop\n");
+ return callScintilla(SCI_GETNEXTTABSTOP, line, x);
+}
+
/** Set the code page used to interpret the bytes of the document as characters.
* The SC_CP_UTF8 value can be used to enter Unicode mode.
*/
@@ -388,6 +422,22 @@ void ScintillaWrapper::SetCodePage(int codePage)
callScintilla(SCI_SETCODEPAGE, codePage);
}
+/** Is the IME displayed in a winow or inline?
+ */
+intptr_t ScintillaWrapper::GetIMEInteraction()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetIMEInteraction\n");
+ return callScintilla(SCI_GETIMEINTERACTION);
+}
+
+/** Choose to display the the IME in a winow or inline.
+ */
+void ScintillaWrapper::SetIMEInteraction(int imeInteraction)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::SetIMEInteraction\n");
+ callScintilla(SCI_SETIMEINTERACTION, imeInteraction);
+}
+
/** Set the symbol used for a particular marker number.
*/
void ScintillaWrapper::MarkerDefine(int markerNumber, int markerSymbol)
@@ -433,7 +483,7 @@ void ScintillaWrapper::MarkerEnableHighlight(bool enabled)
/** Add a marker to a line, returning an ID which can be used to find or delete the marker.
*/
-int ScintillaWrapper::MarkerAdd(int line, int markerNumber)
+intptr_t ScintillaWrapper::MarkerAdd(int line, int markerNumber)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerAdd\n");
return callScintilla(SCI_MARKERADD, line, markerNumber);
@@ -457,7 +507,7 @@ void ScintillaWrapper::MarkerDeleteAll(int markerNumber)
/** Get a bit mask of all the markers set on a line.
*/
-int ScintillaWrapper::MarkerGet(int line)
+intptr_t ScintillaWrapper::MarkerGet(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerGet\n");
return callScintilla(SCI_MARKERGET, line);
@@ -466,7 +516,7 @@ int ScintillaWrapper::MarkerGet(int line)
/** Find the next line at or after lineStart that includes a marker in mask.
* Return -1 when no more lines.
*/
-int ScintillaWrapper::MarkerNext(int lineStart, int markerMask)
+intptr_t ScintillaWrapper::MarkerNext(int lineStart, int markerMask)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerNext\n");
return callScintilla(SCI_MARKERNEXT, lineStart, markerMask);
@@ -474,7 +524,7 @@ int ScintillaWrapper::MarkerNext(int lineStart, int markerMask)
/** Find the previous line before lineStart that includes a marker in mask.
*/
-int ScintillaWrapper::MarkerPrevious(int lineStart, int markerMask)
+intptr_t ScintillaWrapper::MarkerPrevious(int lineStart, int markerMask)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerPrevious\n");
return callScintilla(SCI_MARKERPREVIOUS, lineStart, markerMask);
@@ -515,7 +565,7 @@ void ScintillaWrapper::SetMarginTypeN(int margin, int marginType)
/** Retrieve the type of a margin.
*/
-int ScintillaWrapper::GetMarginTypeN(int margin)
+intptr_t ScintillaWrapper::GetMarginTypeN(int margin)
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginTypeN\n");
return callScintilla(SCI_GETMARGINTYPEN, margin);
@@ -531,7 +581,7 @@ void ScintillaWrapper::SetMarginWidthN(int margin, int pixelWidth)
/** Retrieve the width of a margin in pixels.
*/
-int ScintillaWrapper::GetMarginWidthN(int margin)
+intptr_t ScintillaWrapper::GetMarginWidthN(int margin)
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginWidthN\n");
return callScintilla(SCI_GETMARGINWIDTHN, margin);
@@ -547,7 +597,7 @@ void ScintillaWrapper::SetMarginMaskN(int margin, int mask)
/** Retrieve the marker mask of a margin.
*/
-int ScintillaWrapper::GetMarginMaskN(int margin)
+intptr_t ScintillaWrapper::GetMarginMaskN(int margin)
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginMaskN\n");
return callScintilla(SCI_GETMARGINMASKN, margin);
@@ -579,7 +629,7 @@ void ScintillaWrapper::SetMarginCursorN(int margin, int cursor)
/** Retrieve the cursor shown in a margin.
*/
-int ScintillaWrapper::GetMarginCursorN(int margin)
+intptr_t ScintillaWrapper::GetMarginCursorN(int margin)
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginCursorN\n");
return callScintilla(SCI_GETMARGINCURSORN, margin);
@@ -704,7 +754,7 @@ bool ScintillaWrapper::StyleGetItalic(int style)
/** Get the size of characters of a style.
*/
-int ScintillaWrapper::StyleGetSize(int style)
+intptr_t ScintillaWrapper::StyleGetSize(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::StyleGetSize\n");
return callScintilla(SCI_STYLEGETSIZE, style);
@@ -712,6 +762,7 @@ int ScintillaWrapper::StyleGetSize(int style)
/** Get the font of a style.
* Returns the length of the fontName
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::StyleGetFont(int style)
{
@@ -739,7 +790,7 @@ bool ScintillaWrapper::StyleGetUnderline(int style)
/** Get is a style mixed case, or to force upper or lower case.
*/
-int ScintillaWrapper::StyleGetCase(int style)
+intptr_t ScintillaWrapper::StyleGetCase(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::StyleGetCase\n");
return callScintilla(SCI_STYLEGETCASE, style);
@@ -747,7 +798,7 @@ int ScintillaWrapper::StyleGetCase(int style)
/** Get the character get of the font in a style.
*/
-int ScintillaWrapper::StyleGetCharacterSet(int style)
+intptr_t ScintillaWrapper::StyleGetCharacterSet(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::StyleGetCharacterSet\n");
return callScintilla(SCI_STYLEGETCHARACTERSET, style);
@@ -796,7 +847,7 @@ void ScintillaWrapper::StyleSetSizeFractional(int style, int caseForce)
/** Get the size of characters of a style in points multiplied by 100
*/
-int ScintillaWrapper::StyleGetSizeFractional(int style)
+intptr_t ScintillaWrapper::StyleGetSizeFractional(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::StyleGetSizeFractional\n");
return callScintilla(SCI_STYLEGETSIZEFRACTIONAL, style);
@@ -812,7 +863,7 @@ void ScintillaWrapper::StyleSetWeight(int style, int weight)
/** Get the weight of characters of a style.
*/
-int ScintillaWrapper::StyleGetWeight(int style)
+intptr_t ScintillaWrapper::StyleGetWeight(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::StyleGetWeight\n");
return callScintilla(SCI_STYLEGETWEIGHT, style);
@@ -854,7 +905,7 @@ void ScintillaWrapper::SetSelBack(bool useSetting, boost::python::tuple back)
/** Get the alpha of the selection.
*/
-int ScintillaWrapper::GetSelAlpha()
+intptr_t ScintillaWrapper::GetSelAlpha()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelAlpha\n");
return callScintilla(SCI_GETSELALPHA);
@@ -919,7 +970,7 @@ void ScintillaWrapper::ClearAllCmdKeys()
/** Set the styles for a segment of the document.
*/
-int ScintillaWrapper::SetStylingEx(boost::python::object styles)
+intptr_t ScintillaWrapper::SetStylingEx(boost::python::object styles)
{
DEBUG_TRACE(L"ScintillaWrapper::SetStylingEx\n");
std::string s = getStringFromObject(styles);
@@ -936,7 +987,7 @@ void ScintillaWrapper::StyleSetVisible(int style, bool visible)
/** Get the time in milliseconds that the caret is on and off.
*/
-int ScintillaWrapper::GetCaretPeriod()
+intptr_t ScintillaWrapper::GetCaretPeriod()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCaretPeriod\n");
return callScintilla(SCI_GETCARETPERIOD);
@@ -961,7 +1012,7 @@ void ScintillaWrapper::SetWordChars(boost::python::object characters)
}
/** Get the set of characters making up words for when moving or selecting by word.
- * Retuns the number of characters
+ * Returns the number of characters
*/
boost::python::str ScintillaWrapper::GetWordChars()
{
@@ -998,7 +1049,7 @@ void ScintillaWrapper::IndicSetStyle(int indic, int style)
/** Retrieve the style of an indicator.
*/
-int ScintillaWrapper::IndicGetStyle(int indic)
+intptr_t ScintillaWrapper::IndicGetStyle(int indic)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicGetStyle\n");
return callScintilla(SCI_INDICGETSTYLE, indic);
@@ -1038,6 +1089,56 @@ bool ScintillaWrapper::IndicGetUnder(int indic)
return 0 != (callScintilla(SCI_INDICGETUNDER, indic));
}
+/** Set a hover indicator to plain, squiggle or TT.
+ */
+void ScintillaWrapper::IndicSetHoverStyle(int indic, int style)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicSetHoverStyle\n");
+ callScintilla(SCI_INDICSETHOVERSTYLE, indic, style);
+}
+
+/** Retrieve the hover style of an indicator.
+ */
+intptr_t ScintillaWrapper::IndicGetHoverStyle(int indic)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicGetHoverStyle\n");
+ return callScintilla(SCI_INDICGETHOVERSTYLE, indic);
+}
+
+/** Set the foreground hover colour of an indicator.
+ */
+void ScintillaWrapper::IndicSetHoverFore(int indic, boost::python::tuple fore)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicSetHoverFore\n");
+ COLORREF rgbfore = MAKECOLOUR(fore);
+ callScintilla(SCI_INDICSETHOVERFORE, indic, static_cast(rgbfore));
+}
+
+/** Retrieve the foreground hover colour of an indicator.
+ */
+boost::python::tuple ScintillaWrapper::IndicGetHoverFore(int indic)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicGetHoverFore\n");
+ int retVal = (int)callScintilla(SCI_INDICGETHOVERFORE, indic);
+ return boost::python::make_tuple(COLOUR_RED(retVal), COLOUR_GREEN(retVal), COLOUR_BLUE(retVal));
+}
+
+/** Set the attributes of an indicator.
+ */
+void ScintillaWrapper::IndicSetFlags(int indic, int flags)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicSetFlags\n");
+ callScintilla(SCI_INDICSETFLAGS, indic, flags);
+}
+
+/** Retrieve the attributes of an indicator.
+ */
+intptr_t ScintillaWrapper::IndicGetFlags(int indic)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::IndicGetFlags\n");
+ return callScintilla(SCI_INDICGETFLAGS, indic);
+}
+
/** Set the foreground colour of all whitespace and whether to use this setting.
*/
void ScintillaWrapper::SetWhitespaceFore(bool useSetting, boost::python::tuple fore)
@@ -1066,7 +1167,7 @@ void ScintillaWrapper::SetWhitespaceSize(int size)
/** Get the size of the dots used to mark space characters.
*/
-int ScintillaWrapper::GetWhitespaceSize()
+intptr_t ScintillaWrapper::GetWhitespaceSize()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWhitespaceSize\n");
return callScintilla(SCI_GETWHITESPACESIZE);
@@ -1084,7 +1185,7 @@ void ScintillaWrapper::SetStyleBits(int bits)
/** Retrieve number of bits in style bytes used to hold the lexical state.
*/
-int ScintillaWrapper::GetStyleBits()
+intptr_t ScintillaWrapper::GetStyleBits()
{
DEBUG_TRACE(L"ScintillaWrapper::GetStyleBits\n");
return callScintilla(SCI_GETSTYLEBITS);
@@ -1100,7 +1201,7 @@ void ScintillaWrapper::SetLineState(int line, int state)
/** Retrieve the extra styling information for a line.
*/
-int ScintillaWrapper::GetLineState(int line)
+intptr_t ScintillaWrapper::GetLineState(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineState\n");
return callScintilla(SCI_GETLINESTATE, line);
@@ -1108,7 +1209,7 @@ int ScintillaWrapper::GetLineState(int line)
/** Retrieve the last line number that has line state.
*/
-int ScintillaWrapper::GetMaxLineState()
+intptr_t ScintillaWrapper::GetMaxLineState()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMaxLineState\n");
return callScintilla(SCI_GETMAXLINESTATE);
@@ -1186,7 +1287,7 @@ bool ScintillaWrapper::AutoCActive()
/** Retrieve the position of the caret when the auto-completion list was displayed.
*/
-int ScintillaWrapper::AutoCPosStart()
+intptr_t ScintillaWrapper::AutoCPosStart()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCPosStart\n");
return callScintilla(SCI_AUTOCPOSSTART);
@@ -1220,7 +1321,7 @@ void ScintillaWrapper::AutoCSetSeparator(int separatorCharacter)
/** Retrieve the auto-completion list separator character.
*/
-int ScintillaWrapper::AutoCGetSeparator()
+intptr_t ScintillaWrapper::AutoCGetSeparator()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetSeparator\n");
return callScintilla(SCI_AUTOCGETSEPARATOR);
@@ -1356,7 +1457,7 @@ void ScintillaWrapper::ClearRegisteredImages()
/** Retrieve the auto-completion list type-separator character.
*/
-int ScintillaWrapper::AutoCGetTypeSeparator()
+intptr_t ScintillaWrapper::AutoCGetTypeSeparator()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetTypeSeparator\n");
return callScintilla(SCI_AUTOCGETTYPESEPARATOR);
@@ -1382,7 +1483,7 @@ void ScintillaWrapper::AutoCSetMaxWidth(int characterCount)
/** Get the maximum width, in characters, of auto-completion and user lists.
*/
-int ScintillaWrapper::AutoCGetMaxWidth()
+intptr_t ScintillaWrapper::AutoCGetMaxWidth()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetMaxWidth\n");
return callScintilla(SCI_AUTOCGETMAXWIDTH);
@@ -1399,7 +1500,7 @@ void ScintillaWrapper::AutoCSetMaxHeight(int rowCount)
/** Set the maximum height, in rows, of auto-completion and user lists.
*/
-int ScintillaWrapper::AutoCGetMaxHeight()
+intptr_t ScintillaWrapper::AutoCGetMaxHeight()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetMaxHeight\n");
return callScintilla(SCI_AUTOCGETMAXHEIGHT);
@@ -1415,7 +1516,7 @@ void ScintillaWrapper::SetIndent(int indentSize)
/** Retrieve indentation size.
*/
-int ScintillaWrapper::GetIndent()
+intptr_t ScintillaWrapper::GetIndent()
{
DEBUG_TRACE(L"ScintillaWrapper::GetIndent\n");
return callScintilla(SCI_GETINDENT);
@@ -1448,7 +1549,7 @@ void ScintillaWrapper::SetLineIndentation(int line, int indentSize)
/** Retrieve the number of columns that a line is indented.
*/
-int ScintillaWrapper::GetLineIndentation(int line)
+intptr_t ScintillaWrapper::GetLineIndentation(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineIndentation\n");
return callScintilla(SCI_GETLINEINDENTATION, line);
@@ -1456,7 +1557,7 @@ int ScintillaWrapper::GetLineIndentation(int line)
/** Retrieve the position before the first non indentation character on a line.
*/
-int ScintillaWrapper::GetLineIndentPosition(int line)
+intptr_t ScintillaWrapper::GetLineIndentPosition(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineIndentPosition\n");
return callScintilla(SCI_GETLINEINDENTPOSITION, line);
@@ -1464,7 +1565,7 @@ int ScintillaWrapper::GetLineIndentPosition(int line)
/** Retrieve the column number of a position, taking tab width into account.
*/
-int ScintillaWrapper::GetColumn(int pos)
+intptr_t ScintillaWrapper::GetColumn(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::GetColumn\n");
return callScintilla(SCI_GETCOLUMN, pos);
@@ -1472,7 +1573,7 @@ int ScintillaWrapper::GetColumn(int pos)
/** Count characters between two positions.
*/
-int ScintillaWrapper::CountCharacters(int startPos, int endPos)
+intptr_t ScintillaWrapper::CountCharacters(int startPos, int endPos)
{
DEBUG_TRACE(L"ScintillaWrapper::CountCharacters\n");
return callScintilla(SCI_COUNTCHARACTERS, startPos, endPos);
@@ -1504,7 +1605,7 @@ void ScintillaWrapper::SetIndentationGuides(int indentView)
/** Are the indentation guides visible?
*/
-int ScintillaWrapper::GetIndentationGuides()
+intptr_t ScintillaWrapper::GetIndentationGuides()
{
DEBUG_TRACE(L"ScintillaWrapper::GetIndentationGuides\n");
return callScintilla(SCI_GETINDENTATIONGUIDES);
@@ -1521,7 +1622,7 @@ void ScintillaWrapper::SetHighlightGuide(int column)
/** Get the highlighted indentation guide column.
*/
-int ScintillaWrapper::GetHighlightGuide()
+intptr_t ScintillaWrapper::GetHighlightGuide()
{
DEBUG_TRACE(L"ScintillaWrapper::GetHighlightGuide\n");
return callScintilla(SCI_GETHIGHLIGHTGUIDE);
@@ -1529,7 +1630,7 @@ int ScintillaWrapper::GetHighlightGuide()
/** Get the position after the last visible characters on a line.
*/
-int ScintillaWrapper::GetLineEndPosition(int line)
+intptr_t ScintillaWrapper::GetLineEndPosition(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineEndPosition\n");
return callScintilla(SCI_GETLINEENDPOSITION, line);
@@ -1537,7 +1638,7 @@ int ScintillaWrapper::GetLineEndPosition(int line)
/** Get the code page used to interpret the bytes of the document as characters.
*/
-int ScintillaWrapper::GetCodePage()
+intptr_t ScintillaWrapper::GetCodePage()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCodePage\n");
return callScintilla(SCI_GETCODEPAGE);
@@ -1578,7 +1679,7 @@ void ScintillaWrapper::SetSelectionStart(int pos)
/** Returns the position at the start of the selection.
*/
-int ScintillaWrapper::GetSelectionStart()
+intptr_t ScintillaWrapper::GetSelectionStart()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionStart\n");
return callScintilla(SCI_GETSELECTIONSTART);
@@ -1594,7 +1695,7 @@ void ScintillaWrapper::SetSelectionEnd(int pos)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetSelectionEnd()
+intptr_t ScintillaWrapper::GetSelectionEnd()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionEnd\n");
return callScintilla(SCI_GETSELECTIONEND);
@@ -1618,7 +1719,7 @@ void ScintillaWrapper::SetPrintMagnification(int magnification)
/** Returns the print magnification.
*/
-int ScintillaWrapper::GetPrintMagnification()
+intptr_t ScintillaWrapper::GetPrintMagnification()
{
DEBUG_TRACE(L"ScintillaWrapper::GetPrintMagnification\n");
return callScintilla(SCI_GETPRINTMAGNIFICATION);
@@ -1634,7 +1735,7 @@ void ScintillaWrapper::SetPrintColourMode(int mode)
/** Returns the print colour mode.
*/
-int ScintillaWrapper::GetPrintColourMode()
+intptr_t ScintillaWrapper::GetPrintColourMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetPrintColourMode\n");
return callScintilla(SCI_GETPRINTCOLOURMODE);
@@ -1652,7 +1753,7 @@ boost::python::object ScintillaWrapper::FindText(int flags, int start, int end,
src.chrg.cpMax = end;
// We assume findText won't write to this buffer - it should be const
src.lpstrText = const_cast(search.c_str());
- int result = callScintilla(SCI_FINDTEXT, flags, reinterpret_cast(&src));
+ intptr_t result = callScintilla(SCI_FINDTEXT, flags, reinterpret_cast(&src));
if (-1 == result)
{
return boost::python::object();
@@ -1665,7 +1766,7 @@ boost::python::object ScintillaWrapper::FindText(int flags, int start, int end,
/** Retrieve the display line at the top of the display.
*/
-int ScintillaWrapper::GetFirstVisibleLine()
+intptr_t ScintillaWrapper::GetFirstVisibleLine()
{
DEBUG_TRACE(L"ScintillaWrapper::GetFirstVisibleLine\n");
return callScintilla(SCI_GETFIRSTVISIBLELINE);
@@ -1677,7 +1778,7 @@ int ScintillaWrapper::GetFirstVisibleLine()
boost::python::str ScintillaWrapper::GetLine(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLine\n");
- int lineCount = callScintilla(SCI_GETLINECOUNT);
+ intptr_t lineCount = callScintilla(SCI_GETLINECOUNT);
if (line >= lineCount)
{
throw out_of_bounds_exception();
@@ -1692,7 +1793,7 @@ boost::python::str ScintillaWrapper::GetLine(int line)
/** Returns the number of lines in the document. There is always at least one.
*/
-int ScintillaWrapper::GetLineCount()
+intptr_t ScintillaWrapper::GetLineCount()
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineCount\n");
return callScintilla(SCI_GETLINECOUNT);
@@ -1708,7 +1809,7 @@ void ScintillaWrapper::SetMarginLeft(int pixelWidth)
/** Returns the size in pixels of the left margin.
*/
-int ScintillaWrapper::GetMarginLeft()
+intptr_t ScintillaWrapper::GetMarginLeft()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginLeft\n");
return callScintilla(SCI_GETMARGINLEFT);
@@ -1724,7 +1825,7 @@ void ScintillaWrapper::SetMarginRight(int pixelWidth)
/** Returns the size in pixels of the right margin.
*/
-int ScintillaWrapper::GetMarginRight()
+intptr_t ScintillaWrapper::GetMarginRight()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginRight\n");
return callScintilla(SCI_GETMARGINRIGHT);
@@ -1748,6 +1849,7 @@ void ScintillaWrapper::SetSel(int start, int end)
/** Retrieve the selected text.
* Return the length of the text.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetSelText()
{
@@ -1793,7 +1895,7 @@ void ScintillaWrapper::HideSelection(bool normal)
/** Retrieve the x value of the point in the window where a position is displayed.
*/
-int ScintillaWrapper::PointXFromPosition(int pos)
+intptr_t ScintillaWrapper::PointXFromPosition(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::PointXFromPosition\n");
return callScintilla(SCI_POINTXFROMPOSITION, 0, pos);
@@ -1801,7 +1903,7 @@ int ScintillaWrapper::PointXFromPosition(int pos)
/** Retrieve the y value of the point in the window where a position is displayed.
*/
-int ScintillaWrapper::PointYFromPosition(int pos)
+intptr_t ScintillaWrapper::PointYFromPosition(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::PointYFromPosition\n");
return callScintilla(SCI_POINTYFROMPOSITION, 0, pos);
@@ -1809,7 +1911,7 @@ int ScintillaWrapper::PointYFromPosition(int pos)
/** Retrieve the line containing a position.
*/
-int ScintillaWrapper::LineFromPosition(int pos)
+intptr_t ScintillaWrapper::LineFromPosition(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::LineFromPosition\n");
return callScintilla(SCI_LINEFROMPOSITION, pos);
@@ -1817,7 +1919,7 @@ int ScintillaWrapper::LineFromPosition(int pos)
/** Retrieve the position at the start of a line.
*/
-int ScintillaWrapper::PositionFromLine(int line)
+intptr_t ScintillaWrapper::PositionFromLine(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionFromLine\n");
return callScintilla(SCI_POSITIONFROMLINE, line);
@@ -1949,6 +2051,7 @@ void ScintillaWrapper::SetText(boost::python::object text)
/** Retrieve all the text in the document.
* Returns number of characters retrieved.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetText()
{
@@ -1962,7 +2065,7 @@ boost::python::str ScintillaWrapper::GetText()
/** Retrieve the number of characters in the document.
*/
-int ScintillaWrapper::GetTextLength()
+intptr_t ScintillaWrapper::GetTextLength()
{
DEBUG_TRACE(L"ScintillaWrapper::GetTextLength\n");
return callScintilla(SCI_GETTEXTLENGTH);
@@ -1970,7 +2073,7 @@ int ScintillaWrapper::GetTextLength()
/** Retrieve a pointer to a function that processes messages for this Scintilla.
*/
-int ScintillaWrapper::GetDirectFunction()
+intptr_t ScintillaWrapper::GetDirectFunction()
{
DEBUG_TRACE(L"ScintillaWrapper::GetDirectFunction\n");
return callScintilla(SCI_GETDIRECTFUNCTION);
@@ -1979,7 +2082,7 @@ int ScintillaWrapper::GetDirectFunction()
/** Retrieve a pointer value to use as the first argument when calling
* the function returned by GetDirectFunction.
*/
-int ScintillaWrapper::GetDirectPointer()
+intptr_t ScintillaWrapper::GetDirectPointer()
{
DEBUG_TRACE(L"ScintillaWrapper::GetDirectPointer\n");
return callScintilla(SCI_GETDIRECTPOINTER);
@@ -2011,7 +2114,7 @@ void ScintillaWrapper::SetCaretWidth(int pixelWidth)
/** Returns the width of the insert mode caret.
*/
-int ScintillaWrapper::GetCaretWidth()
+intptr_t ScintillaWrapper::GetCaretWidth()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCaretWidth\n");
return callScintilla(SCI_GETCARETWIDTH);
@@ -2028,7 +2131,7 @@ void ScintillaWrapper::SetTargetStart(int pos)
/** Get the position that starts the target.
*/
-int ScintillaWrapper::GetTargetStart()
+intptr_t ScintillaWrapper::GetTargetStart()
{
DEBUG_TRACE(L"ScintillaWrapper::GetTargetStart\n");
return callScintilla(SCI_GETTARGETSTART);
@@ -2045,17 +2148,35 @@ void ScintillaWrapper::SetTargetEnd(int pos)
/** Get the position that ends the target.
*/
-int ScintillaWrapper::GetTargetEnd()
+intptr_t ScintillaWrapper::GetTargetEnd()
{
DEBUG_TRACE(L"ScintillaWrapper::GetTargetEnd\n");
return callScintilla(SCI_GETTARGETEND);
}
+/** Sets both the start and end of the target in one call.
+ */
+void ScintillaWrapper::SetTargetRange(int start, int end)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::SetTargetRange\n");
+ callScintilla(SCI_SETTARGETRANGE, start, end);
+}
+
+/** Retrieve the text in the target.
+ */
+boost::python::str ScintillaWrapper::GetTargetText()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetTargetText\n");
+ PythonCompatibleStrBuffer result(callScintilla(SCI_GETTARGETTEXT));
+ callScintilla(SCI_GETTARGETTEXT, 0, reinterpret_cast(*result));
+ return boost::python::str(result.c_str());
+}
+
/** Replace the target text with the argument text.
* Text is counted so it can contain NULs.
* Returns the length of the replacement text.
*/
-int ScintillaWrapper::ReplaceTarget(boost::python::object text)
+intptr_t ScintillaWrapper::ReplaceTarget(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::ReplaceTarget\n");
std::string s = getStringFromObject(text);
@@ -2069,7 +2190,7 @@ int ScintillaWrapper::ReplaceTarget(boost::python::object text)
* Returns the length of the replacement text including any change
* caused by processing the \d patterns.
*/
-int ScintillaWrapper::ReplaceTargetRE(boost::python::object text)
+intptr_t ScintillaWrapper::ReplaceTargetRE(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::ReplaceTargetRE\n");
std::string s = getStringFromObject(text);
@@ -2080,7 +2201,7 @@ int ScintillaWrapper::ReplaceTargetRE(boost::python::object text)
* range. Text is counted so it can contain NULs.
* Returns length of range or -1 for failure in which case target is not moved.
*/
-int ScintillaWrapper::SearchInTarget(boost::python::object text)
+intptr_t ScintillaWrapper::SearchInTarget(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::SearchInTarget\n");
notAllowedInCallback("searchInTarget is not allowed in a synchronous callback. Use an asynchronous callback or one of the editor.search(), editor.research(), editor.replace(), editor.rereplace() methods.");
@@ -2098,7 +2219,7 @@ void ScintillaWrapper::SetSearchFlags(int flags)
/** Get the search flags used by SearchInTarget.
*/
-int ScintillaWrapper::GetSearchFlags()
+intptr_t ScintillaWrapper::GetSearchFlags()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSearchFlags\n");
return callScintilla(SCI_GETSEARCHFLAGS);
@@ -2131,7 +2252,7 @@ bool ScintillaWrapper::CallTipActive()
/** Retrieve the position where the caret was before displaying the call tip.
*/
-int ScintillaWrapper::CallTipPosStart()
+intptr_t ScintillaWrapper::CallTipPosStart()
{
DEBUG_TRACE(L"ScintillaWrapper::CallTipPosStart\n");
return callScintilla(SCI_CALLTIPPOSSTART);
@@ -2198,7 +2319,7 @@ void ScintillaWrapper::CallTipSetPosition(bool above)
/** Find the display line of a document line taking hidden lines into account.
*/
-int ScintillaWrapper::VisibleFromDocLine(int line)
+intptr_t ScintillaWrapper::VisibleFromDocLine(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::VisibleFromDocLine\n");
return callScintilla(SCI_VISIBLEFROMDOCLINE, line);
@@ -2206,7 +2327,7 @@ int ScintillaWrapper::VisibleFromDocLine(int line)
/** Find the document line of a display line taking hidden lines into account.
*/
-int ScintillaWrapper::DocLineFromVisible(int lineDisplay)
+intptr_t ScintillaWrapper::DocLineFromVisible(int lineDisplay)
{
DEBUG_TRACE(L"ScintillaWrapper::DocLineFromVisible\n");
return callScintilla(SCI_DOCLINEFROMVISIBLE, lineDisplay);
@@ -2214,7 +2335,7 @@ int ScintillaWrapper::DocLineFromVisible(int lineDisplay)
/** The number of display lines needed to wrap a document line
*/
-int ScintillaWrapper::WrapCount(int line)
+intptr_t ScintillaWrapper::WrapCount(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::WrapCount\n");
return callScintilla(SCI_WRAPCOUNT, line);
@@ -2232,7 +2353,7 @@ void ScintillaWrapper::SetFoldLevel(int line, int level)
/** Retrieve the fold level of a line.
*/
-int ScintillaWrapper::GetFoldLevel(int line)
+intptr_t ScintillaWrapper::GetFoldLevel(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetFoldLevel\n");
return callScintilla(SCI_GETFOLDLEVEL, line);
@@ -2240,7 +2361,7 @@ int ScintillaWrapper::GetFoldLevel(int line)
/** Find the last child line of a header line.
*/
-int ScintillaWrapper::GetLastChild(int line, int level)
+intptr_t ScintillaWrapper::GetLastChild(int line, int level)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLastChild\n");
return callScintilla(SCI_GETLASTCHILD, line, level);
@@ -2248,7 +2369,7 @@ int ScintillaWrapper::GetLastChild(int line, int level)
/** Find the parent line of a child line.
*/
-int ScintillaWrapper::GetFoldParent(int line)
+intptr_t ScintillaWrapper::GetFoldParent(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetFoldParent\n");
return callScintilla(SCI_GETFOLDPARENT, line);
@@ -2360,7 +2481,7 @@ void ScintillaWrapper::SetAutomaticFold(int automaticFold)
/** Get automatic folding behaviours.
*/
-int ScintillaWrapper::GetAutomaticFold()
+intptr_t ScintillaWrapper::GetAutomaticFold()
{
DEBUG_TRACE(L"ScintillaWrapper::GetAutomaticFold\n");
return callScintilla(SCI_GETAUTOMATICFOLD);
@@ -2425,7 +2546,7 @@ void ScintillaWrapper::SetMouseDwellTime(int periodMilliseconds)
/** Retrieve the time the mouse must sit still to generate a mouse dwell event.
*/
-int ScintillaWrapper::GetMouseDwellTime()
+intptr_t ScintillaWrapper::GetMouseDwellTime()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMouseDwellTime\n");
return callScintilla(SCI_GETMOUSEDWELLTIME);
@@ -2433,7 +2554,7 @@ int ScintillaWrapper::GetMouseDwellTime()
/** Get position of start of word.
*/
-int ScintillaWrapper::WordStartPosition(int pos, bool onlyWordCharacters)
+intptr_t ScintillaWrapper::WordStartPosition(int pos, bool onlyWordCharacters)
{
DEBUG_TRACE(L"ScintillaWrapper::WordStartPosition\n");
return callScintilla(SCI_WORDSTARTPOSITION, pos, onlyWordCharacters);
@@ -2441,7 +2562,7 @@ int ScintillaWrapper::WordStartPosition(int pos, bool onlyWordCharacters)
/** Get position of end of word.
*/
-int ScintillaWrapper::WordEndPosition(int pos, bool onlyWordCharacters)
+intptr_t ScintillaWrapper::WordEndPosition(int pos, bool onlyWordCharacters)
{
DEBUG_TRACE(L"ScintillaWrapper::WordEndPosition\n");
return callScintilla(SCI_WORDENDPOSITION, pos, onlyWordCharacters);
@@ -2457,7 +2578,7 @@ void ScintillaWrapper::SetWrapMode(int mode)
/** Retrieve whether text is word wrapped.
*/
-int ScintillaWrapper::GetWrapMode()
+intptr_t ScintillaWrapper::GetWrapMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWrapMode\n");
return callScintilla(SCI_GETWRAPMODE);
@@ -2473,7 +2594,7 @@ void ScintillaWrapper::SetWrapVisualFlags(int wrapVisualFlags)
/** Retrive the display mode of visual flags for wrapped lines.
*/
-int ScintillaWrapper::GetWrapVisualFlags()
+intptr_t ScintillaWrapper::GetWrapVisualFlags()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWrapVisualFlags\n");
return callScintilla(SCI_GETWRAPVISUALFLAGS);
@@ -2489,7 +2610,7 @@ void ScintillaWrapper::SetWrapVisualFlagsLocation(int wrapVisualFlagsLocation)
/** Retrive the location of visual flags for wrapped lines.
*/
-int ScintillaWrapper::GetWrapVisualFlagsLocation()
+intptr_t ScintillaWrapper::GetWrapVisualFlagsLocation()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWrapVisualFlagsLocation\n");
return callScintilla(SCI_GETWRAPVISUALFLAGSLOCATION);
@@ -2505,7 +2626,7 @@ void ScintillaWrapper::SetWrapStartIndent(int indent)
/** Retrive the start indent for wrapped lines.
*/
-int ScintillaWrapper::GetWrapStartIndent()
+intptr_t ScintillaWrapper::GetWrapStartIndent()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWrapStartIndent\n");
return callScintilla(SCI_GETWRAPSTARTINDENT);
@@ -2521,7 +2642,7 @@ void ScintillaWrapper::SetWrapIndentMode(int mode)
/** Retrieve how wrapped sublines are placed. Default is fixed.
*/
-int ScintillaWrapper::GetWrapIndentMode()
+intptr_t ScintillaWrapper::GetWrapIndentMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetWrapIndentMode\n");
return callScintilla(SCI_GETWRAPINDENTMODE);
@@ -2537,7 +2658,7 @@ void ScintillaWrapper::SetLayoutCache(int mode)
/** Retrieve the degree of caching of layout information.
*/
-int ScintillaWrapper::GetLayoutCache()
+intptr_t ScintillaWrapper::GetLayoutCache()
{
DEBUG_TRACE(L"ScintillaWrapper::GetLayoutCache\n");
return callScintilla(SCI_GETLAYOUTCACHE);
@@ -2553,7 +2674,7 @@ void ScintillaWrapper::SetScrollWidth(int pixelWidth)
/** Retrieve the document width assumed for scrolling.
*/
-int ScintillaWrapper::GetScrollWidth()
+intptr_t ScintillaWrapper::GetScrollWidth()
{
DEBUG_TRACE(L"ScintillaWrapper::GetScrollWidth\n");
return callScintilla(SCI_GETSCROLLWIDTH);
@@ -2579,7 +2700,7 @@ bool ScintillaWrapper::GetScrollWidthTracking()
* NUL terminated text argument.
* Does not handle tab or control characters.
*/
-int ScintillaWrapper::TextWidth(int style, boost::python::object text)
+intptr_t ScintillaWrapper::TextWidth(int style, boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::TextWidth\n");
std::string stringtext = getStringFromObject(text);
@@ -2607,7 +2728,7 @@ bool ScintillaWrapper::GetEndAtLastLine()
/** Retrieve the height of a particular line of text in pixels.
*/
-int ScintillaWrapper::TextHeight(int line)
+intptr_t ScintillaWrapper::TextHeight(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::TextHeight\n");
return callScintilla(SCI_TEXTHEIGHT, line);
@@ -2631,14 +2752,14 @@ bool ScintillaWrapper::GetVScrollBar()
/** Append a string to the end of the document without changing the selection.
*/
-int ScintillaWrapper::AppendText(boost::python::object text)
+intptr_t ScintillaWrapper::AppendText(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::AppendText\n");
std::string s = getStringFromObject(text);
return callScintilla(SCI_APPENDTEXT, s.size(), reinterpret_cast(s.c_str()));
}
-/** Is drawing done in two phases with backgrounds drawn before faoregrounds?
+/** Is drawing done in two phases with backgrounds drawn before foregrounds?
*/
bool ScintillaWrapper::GetTwoPhaseDraw()
{
@@ -2655,6 +2776,25 @@ void ScintillaWrapper::SetTwoPhaseDraw(bool twoPhase)
callScintilla(SCI_SETTWOPHASEDRAW, twoPhase);
}
+/** How many phases is drawing done in?
+ */
+intptr_t ScintillaWrapper::GetPhasesDraw()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetPhasesDraw\n");
+ return callScintilla(SCI_GETPHASESDRAW);
+}
+
+/** In one phase draw, text is drawn in a series of rectangular blocks with no overlap.
+ * In two phase draw, text is drawn in a series of lines allowing runs to overlap horizontally.
+ * In multiple phase draw, each element is drawn over the whole drawing area, allowing text
+ * to overlap from one line to the next.
+ */
+void ScintillaWrapper::SetPhasesDraw(int phases)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::SetPhasesDraw\n");
+ callScintilla(SCI_SETPHASESDRAW, phases);
+}
+
/** Choose the quality level for text from the FontQuality enumeration.
*/
void ScintillaWrapper::SetFontQuality(int fontQuality)
@@ -2665,7 +2805,7 @@ void ScintillaWrapper::SetFontQuality(int fontQuality)
/** Retrieve the quality level for text.
*/
-int ScintillaWrapper::GetFontQuality()
+intptr_t ScintillaWrapper::GetFontQuality()
{
DEBUG_TRACE(L"ScintillaWrapper::GetFontQuality\n");
return callScintilla(SCI_GETFONTQUALITY);
@@ -2689,13 +2829,14 @@ void ScintillaWrapper::SetMultiPaste(int multiPaste)
/** Retrieve the effect of pasting when there are multiple selections..
*/
-int ScintillaWrapper::GetMultiPaste()
+intptr_t ScintillaWrapper::GetMultiPaste()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMultiPaste\n");
return callScintilla(SCI_GETMULTIPASTE);
}
/** Retrieve the value of a tag from a regular expression search.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetTag(int tagNumber)
{
@@ -3251,7 +3392,7 @@ void ScintillaWrapper::MoveCaretInsideView()
/** How many characters are on a line, including end of line characters?
*/
-int ScintillaWrapper::LineLength(int line)
+intptr_t ScintillaWrapper::LineLength(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::LineLength\n");
return callScintilla(SCI_LINELENGTH, line);
@@ -3291,7 +3432,7 @@ void ScintillaWrapper::BraceBadLightIndicator(bool useBraceBadLightIndicator, in
/** Find the position of a matching brace or INVALID_POSITION if no match.
*/
-int ScintillaWrapper::BraceMatch(int pos)
+intptr_t ScintillaWrapper::BraceMatch(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::BraceMatch\n");
return callScintilla(SCI_BRACEMATCH, pos);
@@ -3315,7 +3456,7 @@ void ScintillaWrapper::SetViewEOL(bool visible)
/** Retrieve a pointer to the document object.
*/
-int ScintillaWrapper::GetDocPointer()
+intptr_t ScintillaWrapper::GetDocPointer()
{
DEBUG_TRACE(L"ScintillaWrapper::GetDocPointer\n");
return callScintilla(SCI_GETDOCPOINTER);
@@ -3323,7 +3464,7 @@ int ScintillaWrapper::GetDocPointer()
/** Change the document object used.
*/
-void ScintillaWrapper::SetDocPointer(int pointer)
+void ScintillaWrapper::SetDocPointer(intptr_t pointer)
{
DEBUG_TRACE(L"ScintillaWrapper::SetDocPointer\n");
notAllowedInCallback("setDocPointer is not allowed in a synchronous callback. Use an asynchronous callback, or avoid using SetDocPointer in the callback.");
@@ -3340,7 +3481,7 @@ void ScintillaWrapper::SetModEventMask(int mask)
/** Retrieve the column number which text should be kept within.
*/
-int ScintillaWrapper::GetEdgeColumn()
+intptr_t ScintillaWrapper::GetEdgeColumn()
{
DEBUG_TRACE(L"ScintillaWrapper::GetEdgeColumn\n");
return callScintilla(SCI_GETEDGECOLUMN);
@@ -3357,7 +3498,7 @@ void ScintillaWrapper::SetEdgeColumn(int column)
/** Retrieve the edge highlight mode.
*/
-int ScintillaWrapper::GetEdgeMode()
+intptr_t ScintillaWrapper::GetEdgeMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetEdgeMode\n");
return callScintilla(SCI_GETEDGEMODE);
@@ -3401,7 +3542,7 @@ void ScintillaWrapper::SearchAnchor()
/** Find some text starting at the search anchor.
* Does not ensure the selection is visible.
*/
-int ScintillaWrapper::SearchNext(int flags, boost::python::object text)
+intptr_t ScintillaWrapper::SearchNext(int flags, boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::SearchNext\n");
std::string stringtext = getStringFromObject(text);
@@ -3411,7 +3552,7 @@ int ScintillaWrapper::SearchNext(int flags, boost::python::object text)
/** Find some text starting at the search anchor and moving backwards.
* Does not ensure the selection is visible.
*/
-int ScintillaWrapper::SearchPrev(int flags, boost::python::object text)
+intptr_t ScintillaWrapper::SearchPrev(int flags, boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::SearchPrev\n");
std::string stringtext = getStringFromObject(text);
@@ -3420,7 +3561,7 @@ int ScintillaWrapper::SearchPrev(int flags, boost::python::object text)
/** Retrieves the number of lines completely visible.
*/
-int ScintillaWrapper::LinesOnScreen()
+intptr_t ScintillaWrapper::LinesOnScreen()
{
DEBUG_TRACE(L"ScintillaWrapper::LinesOnScreen\n");
return callScintilla(SCI_LINESONSCREEN);
@@ -3454,7 +3595,7 @@ void ScintillaWrapper::SetZoom(int zoom)
/** Retrieve the zoom level.
*/
-int ScintillaWrapper::GetZoom()
+intptr_t ScintillaWrapper::GetZoom()
{
DEBUG_TRACE(L"ScintillaWrapper::GetZoom\n");
return callScintilla(SCI_GETZOOM);
@@ -3463,7 +3604,7 @@ int ScintillaWrapper::GetZoom()
/** Create a new document object.
* Starts with reference count of 1 and not selected into editor.
*/
-int ScintillaWrapper::CreateDocument()
+intptr_t ScintillaWrapper::CreateDocument()
{
DEBUG_TRACE(L"ScintillaWrapper::CreateDocument\n");
return callScintilla(SCI_CREATEDOCUMENT);
@@ -3471,7 +3612,7 @@ int ScintillaWrapper::CreateDocument()
/** Extend life of document.
*/
-void ScintillaWrapper::AddRefDocument(int doc)
+void ScintillaWrapper::AddRefDocument(intptr_t doc)
{
DEBUG_TRACE(L"ScintillaWrapper::AddRefDocument\n");
callScintilla(SCI_ADDREFDOCUMENT, 0, doc);
@@ -3479,7 +3620,7 @@ void ScintillaWrapper::AddRefDocument(int doc)
/** Release a reference to the document, deleting document if it fades to black.
*/
-void ScintillaWrapper::ReleaseDocument(int doc)
+void ScintillaWrapper::ReleaseDocument(intptr_t doc)
{
DEBUG_TRACE(L"ScintillaWrapper::ReleaseDocument\n");
callScintilla(SCI_RELEASEDOCUMENT, 0, doc);
@@ -3487,7 +3628,7 @@ void ScintillaWrapper::ReleaseDocument(int doc)
/** Get which document modification events are sent to the container.
*/
-int ScintillaWrapper::GetModEventMask()
+intptr_t ScintillaWrapper::GetModEventMask()
{
DEBUG_TRACE(L"ScintillaWrapper::GetModEventMask\n");
return callScintilla(SCI_GETMODEVENTMASK);
@@ -3519,7 +3660,7 @@ void ScintillaWrapper::SetStatus(int statusCode)
/** Get error status.
*/
-int ScintillaWrapper::GetStatus()
+intptr_t ScintillaWrapper::GetStatus()
{
DEBUG_TRACE(L"ScintillaWrapper::GetStatus\n");
return callScintilla(SCI_GETSTATUS);
@@ -3551,7 +3692,7 @@ void ScintillaWrapper::SetCursor(int cursorType)
/** Get cursor type.
*/
-int ScintillaWrapper::GetCursor()
+intptr_t ScintillaWrapper::GetCursor()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCursor\n");
return callScintilla(SCI_GETCURSOR);
@@ -3568,7 +3709,7 @@ void ScintillaWrapper::SetControlCharSymbol(int symbol)
/** Get the way control characters are displayed.
*/
-int ScintillaWrapper::GetControlCharSymbol()
+intptr_t ScintillaWrapper::GetControlCharSymbol()
{
DEBUG_TRACE(L"ScintillaWrapper::GetControlCharSymbol\n");
return callScintilla(SCI_GETCONTROLCHARSYMBOL);
@@ -3643,7 +3784,7 @@ void ScintillaWrapper::SetXOffset(int newOffset)
/** Get and Set the xOffset (ie, horizontal scroll position).
*/
-int ScintillaWrapper::GetXOffset()
+intptr_t ScintillaWrapper::GetXOffset()
{
DEBUG_TRACE(L"ScintillaWrapper::GetXOffset\n");
return callScintilla(SCI_GETXOFFSET);
@@ -3693,7 +3834,7 @@ void ScintillaWrapper::SetPrintWrapMode(int mode)
/** Is printing line wrapped?
*/
-int ScintillaWrapper::GetPrintWrapMode()
+intptr_t ScintillaWrapper::GetPrintWrapMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetPrintWrapMode\n");
return callScintilla(SCI_GETPRINTWRAPMODE);
@@ -3802,7 +3943,7 @@ void ScintillaWrapper::ParaUpExtend()
/** Given a valid document position, return the previous position taking code
* page into account. Returns 0 if passed 0.
*/
-int ScintillaWrapper::PositionBefore(int pos)
+intptr_t ScintillaWrapper::PositionBefore(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionBefore\n");
return callScintilla(SCI_POSITIONBEFORE, pos);
@@ -3811,7 +3952,7 @@ int ScintillaWrapper::PositionBefore(int pos)
/** Given a valid document position, return the next position taking code
* page into account. Maximum value returned is the last position in the document.
*/
-int ScintillaWrapper::PositionAfter(int pos)
+intptr_t ScintillaWrapper::PositionAfter(int pos)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionAfter\n");
return callScintilla(SCI_POSITIONAFTER, pos);
@@ -3820,7 +3961,7 @@ int ScintillaWrapper::PositionAfter(int pos)
/** Given a valid document position, return a position that differs in a number
* of characters. Returned value is always between 0 and last position in document.
*/
-int ScintillaWrapper::PositionRelative(int pos, int relative)
+intptr_t ScintillaWrapper::PositionRelative(int pos, int relative)
{
DEBUG_TRACE(L"ScintillaWrapper::PositionRelative\n");
return callScintilla(SCI_POSITIONRELATIVE, pos, relative);
@@ -3836,7 +3977,7 @@ void ScintillaWrapper::CopyRange(int start, int end)
/** Copy argument text to the clipboard.
*/
-int ScintillaWrapper::CopyText(boost::python::object text)
+intptr_t ScintillaWrapper::CopyText(boost::python::object text)
{
DEBUG_TRACE(L"ScintillaWrapper::CopyText\n");
std::string s = getStringFromObject(text);
@@ -3854,7 +3995,7 @@ void ScintillaWrapper::SetSelectionMode(int mode)
/** Get the mode of the current selection.
*/
-int ScintillaWrapper::GetSelectionMode()
+intptr_t ScintillaWrapper::GetSelectionMode()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionMode\n");
return callScintilla(SCI_GETSELECTIONMODE);
@@ -3862,7 +4003,7 @@ int ScintillaWrapper::GetSelectionMode()
/** Retrieve the position of the start of the selection at the given line (INVALID_POSITION if no selection on this line).
*/
-int ScintillaWrapper::GetLineSelStartPosition(int line)
+intptr_t ScintillaWrapper::GetLineSelStartPosition(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineSelStartPosition\n");
return callScintilla(SCI_GETLINESELSTARTPOSITION, line);
@@ -3870,7 +4011,7 @@ int ScintillaWrapper::GetLineSelStartPosition(int line)
/** Retrieve the position of the end of the selection at the given line (INVALID_POSITION if no selection on this line).
*/
-int ScintillaWrapper::GetLineSelEndPosition(int line)
+intptr_t ScintillaWrapper::GetLineSelEndPosition(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineSelEndPosition\n");
return callScintilla(SCI_GETLINESELENDPOSITION, line);
@@ -4064,7 +4205,7 @@ void ScintillaWrapper::SetCharsDefault()
/** Get currently selected item position in the auto-completion list
*/
-int ScintillaWrapper::AutoCGetCurrent()
+intptr_t ScintillaWrapper::AutoCGetCurrent()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetCurrent\n");
return callScintilla(SCI_AUTOCGETCURRENT);
@@ -4072,6 +4213,7 @@ int ScintillaWrapper::AutoCGetCurrent()
/** Get currently selected item text in the auto-completion list
* Returns the length of the item text
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::AutoCGetCurrentText()
{
@@ -4091,12 +4233,28 @@ void ScintillaWrapper::AutoCSetCaseInsensitiveBehaviour(int behaviour)
/** Get auto-completion case insensitive behaviour.
*/
-int ScintillaWrapper::AutoCGetCaseInsensitiveBehaviour()
+intptr_t ScintillaWrapper::AutoCGetCaseInsensitiveBehaviour()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetCaseInsensitiveBehaviour\n");
return callScintilla(SCI_AUTOCGETCASEINSENSITIVEBEHAVIOUR);
}
+/** Change the effect of autocompleting when there are multiple selections.
+ */
+void ScintillaWrapper::AutoCSetMulti(int multi)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::AutoCSetMulti\n");
+ callScintilla(SCI_AUTOCSETMULTI, multi);
+}
+
+/** Retrieve the effect of autocompleting when there are multiple selections..
+ */
+intptr_t ScintillaWrapper::AutoCGetMulti()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::AutoCGetMulti\n");
+ return callScintilla(SCI_AUTOCGETMULTI);
+}
+
/** Set the way autocompletion lists are ordered.
*/
void ScintillaWrapper::AutoCSetOrder(int order)
@@ -4107,7 +4265,7 @@ void ScintillaWrapper::AutoCSetOrder(int order)
/** Get the way autocompletion lists are ordered.
*/
-int ScintillaWrapper::AutoCGetOrder()
+intptr_t ScintillaWrapper::AutoCGetOrder()
{
DEBUG_TRACE(L"ScintillaWrapper::AutoCGetOrder\n");
return callScintilla(SCI_AUTOCGETORDER);
@@ -4156,7 +4314,7 @@ boost::python::str ScintillaWrapper::EncodedFromUTF8()
/** Find the position of a column on a line taking into account tabs and
* multi-byte characters. If beyond end of line, return line end position.
*/
-int ScintillaWrapper::FindColumn(int line, int column)
+intptr_t ScintillaWrapper::FindColumn(int line, int column)
{
DEBUG_TRACE(L"ScintillaWrapper::FindColumn\n");
return callScintilla(SCI_FINDCOLUMN, line, column);
@@ -4164,7 +4322,7 @@ int ScintillaWrapper::FindColumn(int line, int column)
/** Can the caret preferred x position only be changed by explicit movement commands?
*/
-int ScintillaWrapper::GetCaretSticky()
+intptr_t ScintillaWrapper::GetCaretSticky()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCaretSticky\n");
return callScintilla(SCI_GETCARETSTICKY);
@@ -4220,7 +4378,7 @@ void ScintillaWrapper::SetCaretLineBackAlpha(int alpha)
/** Get the background alpha of the caret line.
*/
-int ScintillaWrapper::GetCaretLineBackAlpha()
+intptr_t ScintillaWrapper::GetCaretLineBackAlpha()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCaretLineBackAlpha\n");
return callScintilla(SCI_GETCARETLINEBACKALPHA);
@@ -4236,7 +4394,7 @@ void ScintillaWrapper::SetCaretStyle(int caretStyle)
/** Returns the current style of the caret.
*/
-int ScintillaWrapper::GetCaretStyle()
+intptr_t ScintillaWrapper::GetCaretStyle()
{
DEBUG_TRACE(L"ScintillaWrapper::GetCaretStyle\n");
return callScintilla(SCI_GETCARETSTYLE);
@@ -4252,7 +4410,7 @@ void ScintillaWrapper::SetIndicatorCurrent(int indicator)
/** Get the current indicator
*/
-int ScintillaWrapper::GetIndicatorCurrent()
+intptr_t ScintillaWrapper::GetIndicatorCurrent()
{
DEBUG_TRACE(L"ScintillaWrapper::GetIndicatorCurrent\n");
return callScintilla(SCI_GETINDICATORCURRENT);
@@ -4268,7 +4426,7 @@ void ScintillaWrapper::SetIndicatorValue(int value)
/** Get the current indicator value
*/
-int ScintillaWrapper::GetIndicatorValue()
+intptr_t ScintillaWrapper::GetIndicatorValue()
{
DEBUG_TRACE(L"ScintillaWrapper::GetIndicatorValue\n");
return callScintilla(SCI_GETINDICATORVALUE);
@@ -4292,7 +4450,7 @@ void ScintillaWrapper::IndicatorClearRange(int position, int clearLength)
/** Are any indicators present at position?
*/
-int ScintillaWrapper::IndicatorAllOnFor(int position)
+intptr_t ScintillaWrapper::IndicatorAllOnFor(int position)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicatorAllOnFor\n");
return callScintilla(SCI_INDICATORALLONFOR, position);
@@ -4300,7 +4458,7 @@ int ScintillaWrapper::IndicatorAllOnFor(int position)
/** What value does a particular indicator have at at a position?
*/
-int ScintillaWrapper::IndicatorValueAt(int indicator, int position)
+intptr_t ScintillaWrapper::IndicatorValueAt(int indicator, int position)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicatorValueAt\n");
return callScintilla(SCI_INDICATORVALUEAT, indicator, position);
@@ -4308,7 +4466,7 @@ int ScintillaWrapper::IndicatorValueAt(int indicator, int position)
/** Where does a particular indicator start?
*/
-int ScintillaWrapper::IndicatorStart(int indicator, int position)
+intptr_t ScintillaWrapper::IndicatorStart(int indicator, int position)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicatorStart\n");
return callScintilla(SCI_INDICATORSTART, indicator, position);
@@ -4316,7 +4474,7 @@ int ScintillaWrapper::IndicatorStart(int indicator, int position)
/** Where does a particular indicator end?
*/
-int ScintillaWrapper::IndicatorEnd(int indicator, int position)
+intptr_t ScintillaWrapper::IndicatorEnd(int indicator, int position)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicatorEnd\n");
return callScintilla(SCI_INDICATOREND, indicator, position);
@@ -4332,7 +4490,7 @@ void ScintillaWrapper::SetPositionCache(int size)
/** How many entries are allocated to the position cache?
*/
-int ScintillaWrapper::GetPositionCache()
+intptr_t ScintillaWrapper::GetPositionCache()
{
DEBUG_TRACE(L"ScintillaWrapper::GetPositionCache\n");
return callScintilla(SCI_GETPOSITIONCACHE);
@@ -4349,7 +4507,7 @@ void ScintillaWrapper::CopyAllowLine()
/** Return a position which, to avoid performance costs, should not be within
* the range of a call to GetRangePointer.
*/
-int ScintillaWrapper::GetGapPosition()
+intptr_t ScintillaWrapper::GetGapPosition()
{
DEBUG_TRACE(L"ScintillaWrapper::GetGapPosition\n");
return callScintilla(SCI_GETGAPPOSITION);
@@ -4365,7 +4523,7 @@ void ScintillaWrapper::IndicSetAlpha(int indicator, int alpha)
/** Get the alpha fill colour of the given indicator.
*/
-int ScintillaWrapper::IndicGetAlpha(int indicator)
+intptr_t ScintillaWrapper::IndicGetAlpha(int indicator)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicGetAlpha\n");
return callScintilla(SCI_INDICGETALPHA, indicator);
@@ -4381,7 +4539,7 @@ void ScintillaWrapper::IndicSetOutlineAlpha(int indicator, int alpha)
/** Get the alpha outline colour of the given indicator.
*/
-int ScintillaWrapper::IndicGetOutlineAlpha(int indicator)
+intptr_t ScintillaWrapper::IndicGetOutlineAlpha(int indicator)
{
DEBUG_TRACE(L"ScintillaWrapper::IndicGetOutlineAlpha\n");
return callScintilla(SCI_INDICGETOUTLINEALPHA, indicator);
@@ -4397,7 +4555,7 @@ void ScintillaWrapper::SetExtraAscent(int extraAscent)
/** Get extra ascent for each line
*/
-int ScintillaWrapper::GetExtraAscent()
+intptr_t ScintillaWrapper::GetExtraAscent()
{
DEBUG_TRACE(L"ScintillaWrapper::GetExtraAscent\n");
return callScintilla(SCI_GETEXTRAASCENT);
@@ -4413,7 +4571,7 @@ void ScintillaWrapper::SetExtraDescent(int extraDescent)
/** Get extra descent for each line
*/
-int ScintillaWrapper::GetExtraDescent()
+intptr_t ScintillaWrapper::GetExtraDescent()
{
DEBUG_TRACE(L"ScintillaWrapper::GetExtraDescent\n");
return callScintilla(SCI_GETEXTRADESCENT);
@@ -4421,7 +4579,7 @@ int ScintillaWrapper::GetExtraDescent()
/** Which symbol was defined for markerNumber with MarkerDefine
*/
-int ScintillaWrapper::MarkerSymbolDefined(int markerNumber)
+intptr_t ScintillaWrapper::MarkerSymbolDefined(int markerNumber)
{
DEBUG_TRACE(L"ScintillaWrapper::MarkerSymbolDefined\n");
return callScintilla(SCI_MARKERSYMBOLDEFINED, markerNumber);
@@ -4456,7 +4614,7 @@ void ScintillaWrapper::MarginSetStyle(int line, int style)
/** Get the style number for the text margin for a line
*/
-int ScintillaWrapper::MarginGetStyle(int line)
+intptr_t ScintillaWrapper::MarginGetStyle(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::MarginGetStyle\n");
return callScintilla(SCI_MARGINGETSTYLE, line);
@@ -4499,7 +4657,7 @@ void ScintillaWrapper::MarginSetStyleOffset(int style)
/** Get the start of the range of style numbers used for margin text
*/
-int ScintillaWrapper::MarginGetStyleOffset()
+intptr_t ScintillaWrapper::MarginGetStyleOffset()
{
DEBUG_TRACE(L"ScintillaWrapper::MarginGetStyleOffset\n");
return callScintilla(SCI_MARGINGETSTYLEOFFSET);
@@ -4515,7 +4673,7 @@ void ScintillaWrapper::SetMarginOptions(int marginOptions)
/** Get the margin options.
*/
-int ScintillaWrapper::GetMarginOptions()
+intptr_t ScintillaWrapper::GetMarginOptions()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMarginOptions\n");
return callScintilla(SCI_GETMARGINOPTIONS);
@@ -4560,7 +4718,7 @@ void ScintillaWrapper::AnnotationSetStyle(int line, int style)
/** Get the style number for the annotations for a line
*/
-int ScintillaWrapper::AnnotationGetStyle(int line)
+intptr_t ScintillaWrapper::AnnotationGetStyle(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::AnnotationGetStyle\n");
return callScintilla(SCI_ANNOTATIONGETSTYLE, line);
@@ -4587,7 +4745,7 @@ boost::python::str ScintillaWrapper::AnnotationGetStyles(int line)
/** Get the number of annotation lines for a line
*/
-int ScintillaWrapper::AnnotationGetLines(int line)
+intptr_t ScintillaWrapper::AnnotationGetLines(int line)
{
DEBUG_TRACE(L"ScintillaWrapper::AnnotationGetLines\n");
return callScintilla(SCI_ANNOTATIONGETLINES, line);
@@ -4611,7 +4769,7 @@ void ScintillaWrapper::AnnotationSetVisible(int visible)
/** Get the visibility for the annotations for a view
*/
-int ScintillaWrapper::AnnotationGetVisible()
+intptr_t ScintillaWrapper::AnnotationGetVisible()
{
DEBUG_TRACE(L"ScintillaWrapper::AnnotationGetVisible\n");
return callScintilla(SCI_ANNOTATIONGETVISIBLE);
@@ -4627,7 +4785,7 @@ void ScintillaWrapper::AnnotationSetStyleOffset(int style)
/** Get the start of the range of style numbers used for annotations
*/
-int ScintillaWrapper::AnnotationGetStyleOffset()
+intptr_t ScintillaWrapper::AnnotationGetStyleOffset()
{
DEBUG_TRACE(L"ScintillaWrapper::AnnotationGetStyleOffset\n");
return callScintilla(SCI_ANNOTATIONGETSTYLEOFFSET);
@@ -4643,7 +4801,7 @@ void ScintillaWrapper::ReleaseAllExtendedStyles()
/** Allocate some extended (>255) style numbers and return the start of the range
*/
-int ScintillaWrapper::AllocateExtendedStyles(int numberStyles)
+intptr_t ScintillaWrapper::AllocateExtendedStyles(int numberStyles)
{
DEBUG_TRACE(L"ScintillaWrapper::AllocateExtendedStyles\n");
return callScintilla(SCI_ALLOCATEEXTENDEDSTYLES, numberStyles);
@@ -4659,7 +4817,7 @@ void ScintillaWrapper::AddUndoAction(int token, int flags)
/** Find the position of a character from a point within the window.
*/
-int ScintillaWrapper::CharPositionFromPoint(int x, int y)
+intptr_t ScintillaWrapper::CharPositionFromPoint(int x, int y)
{
DEBUG_TRACE(L"ScintillaWrapper::CharPositionFromPoint\n");
return callScintilla(SCI_CHARPOSITIONFROMPOINT, x, y);
@@ -4668,7 +4826,7 @@ int ScintillaWrapper::CharPositionFromPoint(int x, int y)
/** Find the position of a character from a point within the window.
* Return INVALID_POSITION if not close to text.
*/
-int ScintillaWrapper::CharPositionFromPointClose(int x, int y)
+intptr_t ScintillaWrapper::CharPositionFromPointClose(int x, int y)
{
DEBUG_TRACE(L"ScintillaWrapper::CharPositionFromPointClose\n");
return callScintilla(SCI_CHARPOSITIONFROMPOINTCLOSE, x, y);
@@ -4756,7 +4914,7 @@ bool ScintillaWrapper::GetAdditionalCaretsVisible()
/** How many selections are there?
*/
-int ScintillaWrapper::GetSelections()
+intptr_t ScintillaWrapper::GetSelections()
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelections\n");
return callScintilla(SCI_GETSELECTIONS);
@@ -4780,7 +4938,7 @@ void ScintillaWrapper::ClearSelections()
/** Set a simple selection
*/
-int ScintillaWrapper::SetSelection(int caret, int anchor)
+intptr_t ScintillaWrapper::SetSelection(int caret, int anchor)
{
DEBUG_TRACE(L"ScintillaWrapper::SetSelection\n");
return callScintilla(SCI_SETSELECTION, caret, anchor);
@@ -4788,7 +4946,7 @@ int ScintillaWrapper::SetSelection(int caret, int anchor)
/** Add a selection
*/
-int ScintillaWrapper::AddSelection(int caret, int anchor)
+intptr_t ScintillaWrapper::AddSelection(int caret, int anchor)
{
DEBUG_TRACE(L"ScintillaWrapper::AddSelection\n");
return callScintilla(SCI_ADDSELECTION, caret, anchor);
@@ -4812,7 +4970,7 @@ void ScintillaWrapper::SetMainSelection(int selection)
/** Which selection is the main selection
*/
-int ScintillaWrapper::GetMainSelection()
+intptr_t ScintillaWrapper::GetMainSelection()
{
DEBUG_TRACE(L"ScintillaWrapper::GetMainSelection\n");
return callScintilla(SCI_GETMAINSELECTION);
@@ -4828,7 +4986,7 @@ void ScintillaWrapper::SetSelectionNCaret(int selection, int pos)
/** Which selection is the main selection
*/
-int ScintillaWrapper::GetSelectionNCaret(int selection)
+intptr_t ScintillaWrapper::GetSelectionNCaret(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNCaret\n");
return callScintilla(SCI_GETSELECTIONNCARET, selection);
@@ -4844,7 +5002,7 @@ void ScintillaWrapper::SetSelectionNAnchor(int selection, int posAnchor)
/** Which selection is the main selection
*/
-int ScintillaWrapper::GetSelectionNAnchor(int selection)
+intptr_t ScintillaWrapper::GetSelectionNAnchor(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNAnchor\n");
return callScintilla(SCI_GETSELECTIONNANCHOR, selection);
@@ -4860,7 +5018,7 @@ void ScintillaWrapper::SetSelectionNCaretVirtualSpace(int selection, int space)
/** Which selection is the main selection
*/
-int ScintillaWrapper::GetSelectionNCaretVirtualSpace(int selection)
+intptr_t ScintillaWrapper::GetSelectionNCaretVirtualSpace(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNCaretVirtualSpace\n");
return callScintilla(SCI_GETSELECTIONNCARETVIRTUALSPACE, selection);
@@ -4876,7 +5034,7 @@ void ScintillaWrapper::SetSelectionNAnchorVirtualSpace(int selection, int space)
/** Which selection is the main selection
*/
-int ScintillaWrapper::GetSelectionNAnchorVirtualSpace(int selection)
+intptr_t ScintillaWrapper::GetSelectionNAnchorVirtualSpace(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNAnchorVirtualSpace\n");
return callScintilla(SCI_GETSELECTIONNANCHORVIRTUALSPACE, selection);
@@ -4892,7 +5050,7 @@ void ScintillaWrapper::SetSelectionNStart(int selection, int pos)
/** Returns the position at the start of the selection.
*/
-int ScintillaWrapper::GetSelectionNStart(int selection)
+intptr_t ScintillaWrapper::GetSelectionNStart(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNStart\n");
return callScintilla(SCI_GETSELECTIONNSTART, selection);
@@ -4908,7 +5066,7 @@ void ScintillaWrapper::SetSelectionNEnd(int selection, int pos)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetSelectionNEnd(int selection)
+intptr_t ScintillaWrapper::GetSelectionNEnd(int selection)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSelectionNEnd\n");
return callScintilla(SCI_GETSELECTIONNEND, selection);
@@ -4924,7 +5082,7 @@ void ScintillaWrapper::SetRectangularSelectionCaret(int pos)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetRectangularSelectionCaret()
+intptr_t ScintillaWrapper::GetRectangularSelectionCaret()
{
DEBUG_TRACE(L"ScintillaWrapper::GetRectangularSelectionCaret\n");
return callScintilla(SCI_GETRECTANGULARSELECTIONCARET);
@@ -4940,7 +5098,7 @@ void ScintillaWrapper::SetRectangularSelectionAnchor(int posAnchor)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetRectangularSelectionAnchor()
+intptr_t ScintillaWrapper::GetRectangularSelectionAnchor()
{
DEBUG_TRACE(L"ScintillaWrapper::GetRectangularSelectionAnchor\n");
return callScintilla(SCI_GETRECTANGULARSELECTIONANCHOR);
@@ -4956,7 +5114,7 @@ void ScintillaWrapper::SetRectangularSelectionCaretVirtualSpace(int space)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetRectangularSelectionCaretVirtualSpace()
+intptr_t ScintillaWrapper::GetRectangularSelectionCaretVirtualSpace()
{
DEBUG_TRACE(L"ScintillaWrapper::GetRectangularSelectionCaretVirtualSpace\n");
return callScintilla(SCI_GETRECTANGULARSELECTIONCARETVIRTUALSPACE);
@@ -4972,7 +5130,7 @@ void ScintillaWrapper::SetRectangularSelectionAnchorVirtualSpace(int space)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetRectangularSelectionAnchorVirtualSpace()
+intptr_t ScintillaWrapper::GetRectangularSelectionAnchorVirtualSpace()
{
DEBUG_TRACE(L"ScintillaWrapper::GetRectangularSelectionAnchorVirtualSpace\n");
return callScintilla(SCI_GETRECTANGULARSELECTIONANCHORVIRTUALSPACE);
@@ -4988,7 +5146,7 @@ void ScintillaWrapper::SetVirtualSpaceOptions(int virtualSpaceOptions)
/** Returns the position at the end of the selection.
*/
-int ScintillaWrapper::GetVirtualSpaceOptions()
+intptr_t ScintillaWrapper::GetVirtualSpaceOptions()
{
DEBUG_TRACE(L"ScintillaWrapper::GetVirtualSpaceOptions\n");
return callScintilla(SCI_GETVIRTUALSPACEOPTIONS);
@@ -5007,7 +5165,7 @@ void ScintillaWrapper::SetRectangularSelectionModifier(int modifier)
/** Get the modifier key used for rectangular selection.
*/
-int ScintillaWrapper::GetRectangularSelectionModifier()
+intptr_t ScintillaWrapper::GetRectangularSelectionModifier()
{
DEBUG_TRACE(L"ScintillaWrapper::GetRectangularSelectionModifier\n");
return callScintilla(SCI_GETRECTANGULARSELECTIONMODIFIER);
@@ -5043,7 +5201,7 @@ void ScintillaWrapper::SetAdditionalSelAlpha(int alpha)
/** Get the alpha of the selection.
*/
-int ScintillaWrapper::GetAdditionalSelAlpha()
+intptr_t ScintillaWrapper::GetAdditionalSelAlpha()
{
DEBUG_TRACE(L"ScintillaWrapper::GetAdditionalSelAlpha\n");
return callScintilla(SCI_GETADDITIONALSELALPHA);
@@ -5086,7 +5244,7 @@ void ScintillaWrapper::SwapMainAnchorCaret()
/** Indicate that the internal state of a lexer has changed over a range and therefore
* there may be a need to redraw.
*/
-int ScintillaWrapper::ChangeLexerState(int start, int end)
+intptr_t ScintillaWrapper::ChangeLexerState(int start, int end)
{
DEBUG_TRACE(L"ScintillaWrapper::ChangeLexerState\n");
return callScintilla(SCI_CHANGELEXERSTATE, start, end);
@@ -5095,7 +5253,7 @@ int ScintillaWrapper::ChangeLexerState(int start, int end)
/** Find the next line at or after lineStart that is a contracted fold header line.
* Return -1 when no more lines.
*/
-int ScintillaWrapper::ContractedFoldNext(int lineStart)
+intptr_t ScintillaWrapper::ContractedFoldNext(int lineStart)
{
DEBUG_TRACE(L"ScintillaWrapper::ContractedFoldNext\n");
return callScintilla(SCI_CONTRACTEDFOLDNEXT, lineStart);
@@ -5135,7 +5293,7 @@ void ScintillaWrapper::SetIdentifier(int identifier)
/** Get the identifier.
*/
-int ScintillaWrapper::GetIdentifier()
+intptr_t ScintillaWrapper::GetIdentifier()
{
DEBUG_TRACE(L"ScintillaWrapper::GetIdentifier\n");
return callScintilla(SCI_GETIDENTIFIER);
@@ -5211,7 +5369,7 @@ void ScintillaWrapper::SetTechnology(int technology)
/** Get the tech.
*/
-int ScintillaWrapper::GetTechnology()
+intptr_t ScintillaWrapper::GetTechnology()
{
DEBUG_TRACE(L"ScintillaWrapper::GetTechnology\n");
return callScintilla(SCI_GETTECHNOLOGY);
@@ -5219,7 +5377,7 @@ int ScintillaWrapper::GetTechnology()
/** Create an ILoader*.
*/
-int ScintillaWrapper::CreateLoader(int bytes)
+intptr_t ScintillaWrapper::CreateLoader(int bytes)
{
DEBUG_TRACE(L"ScintillaWrapper::CreateLoader\n");
return callScintilla(SCI_CREATELOADER, bytes);
@@ -5282,6 +5440,30 @@ void ScintillaWrapper::SetCaretLineVisibleAlways(bool alwaysVisible)
callScintilla(SCI_SETCARETLINEVISIBLEALWAYS, alwaysVisible);
}
+/** Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
+ */
+void ScintillaWrapper::SetLineEndTypesAllowed(int lineEndBitSet)
+{
+ DEBUG_TRACE(L"ScintillaWrapper::SetLineEndTypesAllowed\n");
+ callScintilla(SCI_SETLINEENDTYPESALLOWED, lineEndBitSet);
+}
+
+/** Get the line end types currently allowed.
+ */
+intptr_t ScintillaWrapper::GetLineEndTypesAllowed()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetLineEndTypesAllowed\n");
+ return callScintilla(SCI_GETLINEENDTYPESALLOWED);
+}
+
+/** Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
+ */
+intptr_t ScintillaWrapper::GetLineEndTypesActive()
+{
+ DEBUG_TRACE(L"ScintillaWrapper::GetLineEndTypesActive\n");
+ return callScintilla(SCI_GETLINEENDTYPESACTIVE);
+}
+
/** Set the way a character is drawn.
*/
void ScintillaWrapper::SetRepresentation(boost::python::object encodedCharacter, boost::python::object representation)
@@ -5293,12 +5475,14 @@ void ScintillaWrapper::SetRepresentation(boost::python::object encodedCharacter,
}
/** Set the way a character is drawn.
+ * Result is NUL-terminated.
*/
-boost::python::str ScintillaWrapper::GetRepresentation()
+boost::python::str ScintillaWrapper::GetRepresentation(boost::python::object encodedCharacter)
{
DEBUG_TRACE(L"ScintillaWrapper::GetRepresentation\n");
- PythonCompatibleStrBuffer result(callScintilla(SCI_GETREPRESENTATION));
- callScintilla(SCI_GETREPRESENTATION, 0, reinterpret_cast(*result));
+ std::string encString = getStringFromObject(encodedCharacter);
+ PythonCompatibleStrBuffer result(callScintilla(SCI_GETREPRESENTATION, reinterpret_cast(encString.c_str()), 0));
+ callScintilla(SCI_GETREPRESENTATION, reinterpret_cast(encString.c_str()), reinterpret_cast(*result));
return boost::python::str(result.c_str());
}
@@ -5337,7 +5521,7 @@ void ScintillaWrapper::SetLexer(int lexer)
/** Retrieve the lexing language of the document.
*/
-int ScintillaWrapper::GetLexer()
+intptr_t ScintillaWrapper::GetLexer()
{
DEBUG_TRACE(L"ScintillaWrapper::GetLexer\n");
return callScintilla(SCI_GETLEXER);
@@ -5389,6 +5573,7 @@ void ScintillaWrapper::LoadLexerLibrary(boost::python::object path)
}
/** Retrieve a "property" value previously set with SetProperty.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetProperty(boost::python::object key)
{
@@ -5401,6 +5586,7 @@ boost::python::str ScintillaWrapper::GetProperty(boost::python::object key)
/** Retrieve a "property" value previously set with SetProperty,
* with "$()" variable replacement on returned buffer.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetPropertyExpanded(boost::python::object key)
{
@@ -5414,7 +5600,7 @@ boost::python::str ScintillaWrapper::GetPropertyExpanded(boost::python::object k
/** Retrieve a "property" value previously set with SetProperty,
* interpreted as an int AFTER any "$()" variable replacement.
*/
-int ScintillaWrapper::GetPropertyInt(boost::python::object key)
+intptr_t ScintillaWrapper::GetPropertyInt(boost::python::object key)
{
DEBUG_TRACE(L"ScintillaWrapper::GetPropertyInt\n");
std::string stringkey = getStringFromObject(key);
@@ -5423,7 +5609,7 @@ int ScintillaWrapper::GetPropertyInt(boost::python::object key)
/** Retrieve the number of bits the current lexer needs for styling.
*/
-int ScintillaWrapper::GetStyleBitsNeeded()
+intptr_t ScintillaWrapper::GetStyleBitsNeeded()
{
DEBUG_TRACE(L"ScintillaWrapper::GetStyleBitsNeeded\n");
return callScintilla(SCI_GETSTYLEBITSNEEDED);
@@ -5431,6 +5617,7 @@ int ScintillaWrapper::GetStyleBitsNeeded()
/** Retrieve the name of the lexer.
* Return the length of the text.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetLexerLanguage()
{
@@ -5442,13 +5629,14 @@ boost::python::str ScintillaWrapper::GetLexerLanguage()
/** For private communication between an application and a known lexer.
*/
-int ScintillaWrapper::PrivateLexerCall(int operation, int pointer)
+intptr_t ScintillaWrapper::PrivateLexerCall(intptr_t operation, intptr_t pointer)
{
DEBUG_TRACE(L"ScintillaWrapper::PrivateLexerCall\n");
return callScintilla(SCI_PRIVATELEXERCALL, operation, pointer);
}
/** Retrieve a '\n' separated list of properties understood by the current lexer.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::PropertyNames()
{
@@ -5460,7 +5648,7 @@ boost::python::str ScintillaWrapper::PropertyNames()
/** Retrieve the type of a property.
*/
-int ScintillaWrapper::PropertyType(boost::python::object name)
+intptr_t ScintillaWrapper::PropertyType(boost::python::object name)
{
DEBUG_TRACE(L"ScintillaWrapper::PropertyType\n");
std::string stringname = getStringFromObject(name);
@@ -5468,6 +5656,7 @@ int ScintillaWrapper::PropertyType(boost::python::object name)
}
/** Describe a property.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::DescribeProperty()
{
@@ -5478,6 +5667,7 @@ boost::python::str ScintillaWrapper::DescribeProperty()
}
/** Retrieve a '\n' separated list of descriptions of the keyword sets understood by the current lexer.
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::DescribeKeyWordSets()
{
@@ -5487,34 +5677,10 @@ boost::python::str ScintillaWrapper::DescribeKeyWordSets()
return boost::python::str(result.c_str());
}
-/** Set the line end types that the application wants to use. May not be used if incompatible with lexer or encoding.
- */
-void ScintillaWrapper::SetLineEndTypesAllowed(int lineEndBitSet)
-{
- DEBUG_TRACE(L"ScintillaWrapper::SetLineEndTypesAllowed\n");
- callScintilla(SCI_SETLINEENDTYPESALLOWED, lineEndBitSet);
-}
-
-/** Get the line end types currently allowed.
- */
-int ScintillaWrapper::GetLineEndTypesAllowed()
-{
- DEBUG_TRACE(L"ScintillaWrapper::GetLineEndTypesAllowed\n");
- return callScintilla(SCI_GETLINEENDTYPESALLOWED);
-}
-
-/** Get the line end types currently recognised. May be a subset of the allowed types due to lexer limitation.
- */
-int ScintillaWrapper::GetLineEndTypesActive()
-{
- DEBUG_TRACE(L"ScintillaWrapper::GetLineEndTypesActive\n");
- return callScintilla(SCI_GETLINEENDTYPESACTIVE);
-}
-
/** Bit set of LineEndType enumertion for which line ends beyond the standard
* LF, CR, and CRLF are supported by the lexer.
*/
-int ScintillaWrapper::GetLineEndTypesSupported()
+intptr_t ScintillaWrapper::GetLineEndTypesSupported()
{
DEBUG_TRACE(L"ScintillaWrapper::GetLineEndTypesSupported\n");
return callScintilla(SCI_GETLINEENDTYPESSUPPORTED);
@@ -5522,7 +5688,7 @@ int ScintillaWrapper::GetLineEndTypesSupported()
/** Allocate a set of sub styles for a particular base style, returning start of range
*/
-int ScintillaWrapper::AllocateSubStyles(int styleBase, int numberStyles)
+intptr_t ScintillaWrapper::AllocateSubStyles(int styleBase, int numberStyles)
{
DEBUG_TRACE(L"ScintillaWrapper::AllocateSubStyles\n");
return callScintilla(SCI_ALLOCATESUBSTYLES, styleBase, numberStyles);
@@ -5530,7 +5696,7 @@ int ScintillaWrapper::AllocateSubStyles(int styleBase, int numberStyles)
/** The starting style number for the sub styles associated with a base style
*/
-int ScintillaWrapper::GetSubStylesStart(int styleBase)
+intptr_t ScintillaWrapper::GetSubStylesStart(int styleBase)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSubStylesStart\n");
return callScintilla(SCI_GETSUBSTYLESSTART, styleBase);
@@ -5538,7 +5704,7 @@ int ScintillaWrapper::GetSubStylesStart(int styleBase)
/** The number of sub styles associated with a base style
*/
-int ScintillaWrapper::GetSubStylesLength(int styleBase)
+intptr_t ScintillaWrapper::GetSubStylesLength(int styleBase)
{
DEBUG_TRACE(L"ScintillaWrapper::GetSubStylesLength\n");
return callScintilla(SCI_GETSUBSTYLESLENGTH, styleBase);
@@ -5546,7 +5712,7 @@ int ScintillaWrapper::GetSubStylesLength(int styleBase)
/** For a sub style, return the base style, else return the argument.
*/
-int ScintillaWrapper::GetStyleFromSubStyle(int subStyle)
+intptr_t ScintillaWrapper::GetStyleFromSubStyle(int subStyle)
{
DEBUG_TRACE(L"ScintillaWrapper::GetStyleFromSubStyle\n");
return callScintilla(SCI_GETSTYLEFROMSUBSTYLE, subStyle);
@@ -5554,7 +5720,7 @@ int ScintillaWrapper::GetStyleFromSubStyle(int subStyle)
/** For a secondary style, return the primary style, else return the argument.
*/
-int ScintillaWrapper::GetPrimaryStyleFromStyle(int style)
+intptr_t ScintillaWrapper::GetPrimaryStyleFromStyle(int style)
{
DEBUG_TRACE(L"ScintillaWrapper::GetPrimaryStyleFromStyle\n");
return callScintilla(SCI_GETPRIMARYSTYLEFROMSTYLE, style);
@@ -5580,13 +5746,14 @@ void ScintillaWrapper::SetIdentifiers(int style, boost::python::object identifie
/** Where styles are duplicated by a feature such as active/inactive code
* return the distance between the two types.
*/
-int ScintillaWrapper::DistanceToSecondaryStyles()
+intptr_t ScintillaWrapper::DistanceToSecondaryStyles()
{
DEBUG_TRACE(L"ScintillaWrapper::DistanceToSecondaryStyles\n");
return callScintilla(SCI_DISTANCETOSECONDARYSTYLES);
}
/** Get the set of base styles that can be extended with sub styles
+ * Result is NUL-terminated.
*/
boost::python::str ScintillaWrapper::GetSubStyleBases()
{
diff --git a/PythonScript/src/UTF8Iterator.cpp b/PythonScript/src/UTF8Iterator.cpp
index 60f78de6..5f1c7715 100644
--- a/PythonScript/src/UTF8Iterator.cpp
+++ b/PythonScript/src/UTF8Iterator.cpp
@@ -95,7 +95,7 @@ std::basic_string