mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-31 01:34:58 +02:00
Remove more conversion from Scintilla
This commit is contained in:
parent
9b832dbb2c
commit
4f15b01591
@ -94,7 +94,7 @@ public:
|
|||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
const wchar_t * char2wchar(const char *mbStr, size_t codepage, int lenIn=-1, int *pLenOut=NULL, int *pBytesNotProcessed=NULL);
|
const wchar_t * char2wchar(const char *mbStr, size_t codepage, int lenMbcs =-1, int* pLenOut=NULL, int* pBytesNotProcessed=NULL);
|
||||||
const wchar_t * char2wchar(const char *mbcs2Convert, size_t codepage, INT_PTR* mstart, INT_PTR* mend);
|
const wchar_t * char2wchar(const char *mbcs2Convert, size_t codepage, INT_PTR* mstart, INT_PTR* mend);
|
||||||
const char * wchar2char(const wchar_t *wcStr, size_t codepage, int lenIn = -1, int* pLenOut = NULL);
|
const char * wchar2char(const wchar_t *wcStr, size_t codepage, int lenIn = -1, int* pLenOut = NULL);
|
||||||
const char * wchar2char(const wchar_t *wcStr, size_t codepage, long* mstart, long* mend);
|
const char * wchar2char(const wchar_t *wcStr, size_t codepage, long* mstart, long* mend);
|
||||||
|
@ -3740,9 +3740,11 @@ void Notepad_plus::updateStatusBar()
|
|||||||
// STATUSBAR_DOC_TYPE , STATUSBAR_EOF_FORMAT , STATUSBAR_UNICODE_TYPE
|
// STATUSBAR_DOC_TYPE , STATUSBAR_EOF_FORMAT , STATUSBAR_UNICODE_TYPE
|
||||||
|
|
||||||
TCHAR strDocLen[256];
|
TCHAR strDocLen[256];
|
||||||
|
size_t docLen = _pEditView->getCurrentDocLen();
|
||||||
|
INT_PTR nbLine = _pEditView->execute(SCI_GETLINECOUNT);
|
||||||
wsprintf(strDocLen, TEXT("length : %s lines : %s"),
|
wsprintf(strDocLen, TEXT("length : %s lines : %s"),
|
||||||
commafyInt(_pEditView->getCurrentDocLen()).c_str(),
|
commafyInt(docLen).c_str(),
|
||||||
commafyInt(_pEditView->execute(SCI_GETLINECOUNT)).c_str());
|
commafyInt(nbLine).c_str());
|
||||||
_statusBar.setText(strDocLen, STATUSBAR_DOC_SIZE);
|
_statusBar.setText(strDocLen, STATUSBAR_DOC_SIZE);
|
||||||
|
|
||||||
TCHAR strSel[64];
|
TCHAR strSel[64];
|
||||||
@ -3813,9 +3815,11 @@ void Notepad_plus::updateStatusBar()
|
|||||||
}
|
}
|
||||||
|
|
||||||
TCHAR strLnColSel[128];
|
TCHAR strLnColSel[128];
|
||||||
|
INT_PTR curLN = _pEditView->getCurrentLineNumber();
|
||||||
|
INT_PTR curCN = _pEditView->getCurrentColumnNumber();
|
||||||
wsprintf(strLnColSel, TEXT("Ln : %s Col : %s %s"),
|
wsprintf(strLnColSel, TEXT("Ln : %s Col : %s %s"),
|
||||||
commafyInt(_pEditView->getCurrentLineNumber() + 1).c_str(),
|
commafyInt(curLN + 1).c_str(),
|
||||||
commafyInt(_pEditView->getCurrentColumnNumber() + 1).c_str(),
|
commafyInt(curCN + 1).c_str(),
|
||||||
strSel);
|
strSel);
|
||||||
_statusBar.setText(strLnColSel, STATUSBAR_CUR_POS);
|
_statusBar.setText(strLnColSel, STATUSBAR_CUR_POS);
|
||||||
|
|
||||||
|
@ -504,14 +504,14 @@ private:
|
|||||||
|
|
||||||
void bookmarkAdd(INT_PTR lineno) const {
|
void bookmarkAdd(INT_PTR lineno) const {
|
||||||
if (lineno == -1)
|
if (lineno == -1)
|
||||||
lineno = static_cast<int32_t>(_pEditView->getCurrentLineNumber());
|
lineno = _pEditView->getCurrentLineNumber();
|
||||||
if (!bookmarkPresent(lineno))
|
if (!bookmarkPresent(lineno))
|
||||||
_pEditView->execute(SCI_MARKERADD, lineno, MARK_BOOKMARK);
|
_pEditView->execute(SCI_MARKERADD, lineno, MARK_BOOKMARK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void bookmarkDelete(size_t lineno) const {
|
void bookmarkDelete(size_t lineno) const {
|
||||||
if (lineno == -1)
|
if (lineno == -1)
|
||||||
lineno = static_cast<int32_t>(_pEditView->getCurrentLineNumber());
|
lineno = _pEditView->getCurrentLineNumber();
|
||||||
while (bookmarkPresent(lineno))
|
while (bookmarkPresent(lineno))
|
||||||
_pEditView->execute(SCI_MARKERDELETE, lineno, MARK_BOOKMARK);
|
_pEditView->execute(SCI_MARKERDELETE, lineno, MARK_BOOKMARK);
|
||||||
}
|
}
|
||||||
@ -525,7 +525,7 @@ private:
|
|||||||
|
|
||||||
void bookmarkToggle(INT_PTR lineno) const {
|
void bookmarkToggle(INT_PTR lineno) const {
|
||||||
if (lineno == -1)
|
if (lineno == -1)
|
||||||
lineno = static_cast<int32_t>(_pEditView->getCurrentLineNumber());
|
lineno = _pEditView->getCurrentLineNumber();
|
||||||
|
|
||||||
if (bookmarkPresent(lineno))
|
if (bookmarkPresent(lineno))
|
||||||
bookmarkDelete(lineno);
|
bookmarkDelete(lineno);
|
||||||
|
@ -3128,10 +3128,10 @@ void Notepad_plus::command(int id)
|
|||||||
size_t selectionStart = _pEditView->execute(SCI_GETSELECTIONSTART);
|
size_t selectionStart = _pEditView->execute(SCI_GETSELECTIONSTART);
|
||||||
size_t selectionEnd = _pEditView->execute(SCI_GETSELECTIONEND);
|
size_t selectionEnd = _pEditView->execute(SCI_GETSELECTIONEND);
|
||||||
|
|
||||||
int32_t strLen = static_cast<int32_t>(selectionEnd - selectionStart);
|
INT_PTR strLen = selectionEnd - selectionStart;
|
||||||
if (strLen)
|
if (strLen)
|
||||||
{
|
{
|
||||||
int strSize = strLen + 1;
|
INT_PTR strSize = strLen + 1;
|
||||||
char *selectedStr = new char[strSize];
|
char *selectedStr = new char[strSize];
|
||||||
_pEditView->execute(SCI_GETSELTEXT, 0, reinterpret_cast<LPARAM>(selectedStr));
|
_pEditView->execute(SCI_GETSELTEXT, 0, reinterpret_cast<LPARAM>(selectedStr));
|
||||||
|
|
||||||
|
@ -183,7 +183,7 @@ void AutoCompletion::getWordArray(vector<generic_string> & wordArray, TCHAR *beg
|
|||||||
wordArray.push_back(w);
|
wordArray.push_back(w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
posFind = _pEditView->searchInTarget(expr.c_str(), static_cast<int32_t>(expr.length()), wordEnd, docLength);
|
posFind = _pEditView->searchInTarget(expr.c_str(), expr.length(), wordEnd, docLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -664,7 +664,7 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin
|
|||||||
|
|
||||||
Utf8_16_Read UnicodeConvertor; //declare here so we can get information after loading is done
|
Utf8_16_Read UnicodeConvertor; //declare here so we can get information after loading is done
|
||||||
|
|
||||||
char data[blockSize + 8]; // +8 for incomplete multibyte char
|
char* data = new char[blockSize + 8]; // +8 for incomplete multibyte char
|
||||||
|
|
||||||
LoadedFileFormat loadedFileFormat;
|
LoadedFileFormat loadedFileFormat;
|
||||||
loadedFileFormat._encoding = encoding;
|
loadedFileFormat._encoding = encoding;
|
||||||
@ -672,6 +672,9 @@ BufferID FileManager::loadFile(const TCHAR * filename, Document doc, int encodin
|
|||||||
loadedFileFormat._language = L_TEXT;
|
loadedFileFormat._language = L_TEXT;
|
||||||
|
|
||||||
bool res = loadFileData(doc, backupFileName ? backupFileName : fullpath, data, &UnicodeConvertor, loadedFileFormat);
|
bool res = loadFileData(doc, backupFileName ? backupFileName : fullpath, data, &UnicodeConvertor, loadedFileFormat);
|
||||||
|
|
||||||
|
delete[] data;
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
{
|
{
|
||||||
Buffer* newBuf = new Buffer(this, _nextBufferID, doc, DOC_REGULAR, fullpath);
|
Buffer* newBuf = new Buffer(this, _nextBufferID, doc, DOC_REGULAR, fullpath);
|
||||||
@ -722,7 +725,7 @@ bool FileManager::reloadBuffer(BufferID id)
|
|||||||
Document doc = buf->getDocument();
|
Document doc = buf->getDocument();
|
||||||
Utf8_16_Read UnicodeConvertor;
|
Utf8_16_Read UnicodeConvertor;
|
||||||
|
|
||||||
char data[blockSize + 8]; // +8 for incomplete multibyte char
|
char* data = new char[blockSize + 8]; // +8 for incomplete multibyte char
|
||||||
|
|
||||||
LoadedFileFormat loadedFileFormat;
|
LoadedFileFormat loadedFileFormat;
|
||||||
loadedFileFormat._encoding = buf->getEncoding();
|
loadedFileFormat._encoding = buf->getEncoding();
|
||||||
@ -736,6 +739,7 @@ bool FileManager::reloadBuffer(BufferID id)
|
|||||||
|
|
||||||
bool res = loadFileData(doc, buf->getFullPathName(), data, &UnicodeConvertor, loadedFileFormat);
|
bool res = loadFileData(doc, buf->getFullPathName(), data, &UnicodeConvertor, loadedFileFormat);
|
||||||
|
|
||||||
|
delete[] data;
|
||||||
buf->_canNotify = true;
|
buf->_canNotify = true;
|
||||||
|
|
||||||
if (res)
|
if (res)
|
||||||
|
@ -131,7 +131,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
Notepad_plus* _pNotepadPlus = nullptr;
|
Notepad_plus* _pNotepadPlus = nullptr;
|
||||||
ScintillaEditView* _pscratchTilla = nullptr;
|
ScintillaEditView* _pscratchTilla = nullptr;
|
||||||
Document _scratchDocDefault;
|
Document _scratchDocDefault = 0;
|
||||||
std::vector<Buffer*> _buffers;
|
std::vector<Buffer*> _buffers;
|
||||||
BufferID _nextBufferID = 0;
|
BufferID _nextBufferID = 0;
|
||||||
size_t _nbBufs = 0;
|
size_t _nbBufs = 0;
|
||||||
|
@ -782,6 +782,7 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
|
|||||||
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>(name), reinterpret_cast<LPARAM>(userLangContainer->_isPrefix[i] ? "1" : "0"));
|
execute(SCI_SETPROPERTY, reinterpret_cast<WPARAM>(name), reinterpret_cast<LPARAM>(userLangContainer->_isPrefix[i] ? "1" : "0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char* temp = new char[max_char];
|
||||||
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; ++i)
|
for (int i = 0 ; i < SCE_USER_KWLIST_TOTAL ; ++i)
|
||||||
{
|
{
|
||||||
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
|
WcharMbcsConvertor& wmc = WcharMbcsConvertor::getInstance();
|
||||||
@ -793,7 +794,6 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
|
|||||||
}
|
}
|
||||||
else // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8
|
else // OPERATORS2, FOLDERS_IN_CODE2, FOLDERS_IN_COMMENT, KEYWORDS1-8
|
||||||
{
|
{
|
||||||
char temp[max_char];
|
|
||||||
bool inDoubleQuote = false;
|
bool inDoubleQuote = false;
|
||||||
bool inSingleQuote = false;
|
bool inSingleQuote = false;
|
||||||
bool nonWSFound = false;
|
bool nonWSFound = false;
|
||||||
@ -844,6 +844,7 @@ void ScintillaEditView::setUserLexer(const TCHAR *userLangName)
|
|||||||
execute(SCI_SETKEYWORDS, setKeywordsCounter++, reinterpret_cast<LPARAM>(temp));
|
execute(SCI_SETKEYWORDS, setKeywordsCounter++, reinterpret_cast<LPARAM>(temp));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
delete[] temp;
|
||||||
|
|
||||||
char intBuffer[32];
|
char intBuffer[32];
|
||||||
|
|
||||||
@ -1927,12 +1928,6 @@ void ScintillaEditView::activateBuffer(BufferID buffer)
|
|||||||
|
|
||||||
restoreCurrentPosPreStep();
|
restoreCurrentPosPreStep();
|
||||||
|
|
||||||
//setup line number margin
|
|
||||||
INT_PTR numLines = execute(SCI_GETLINECOUNT);
|
|
||||||
|
|
||||||
char numLineStr[32];
|
|
||||||
itoa(static_cast<int>(numLines), numLineStr, 10);
|
|
||||||
|
|
||||||
runMarkers(true, 0, true, false);
|
runMarkers(true, 0, true, false);
|
||||||
return; //all done
|
return; //all done
|
||||||
}
|
}
|
||||||
|
@ -522,8 +522,10 @@ void CommentStyleDialog::setKeywords2List(int id)
|
|||||||
}
|
}
|
||||||
if (index != -1)
|
if (index != -1)
|
||||||
{
|
{
|
||||||
TCHAR newList[max_char] = TEXT("");
|
TCHAR* newList = new TCHAR[max_char];
|
||||||
TCHAR buffer[max_char] = TEXT("");
|
newList[0] = '\0';
|
||||||
|
TCHAR* buffer = new TCHAR[max_char];
|
||||||
|
buffer[0] = '\0';
|
||||||
TCHAR intBuffer[10] = {'0', 0};
|
TCHAR intBuffer[10] = {'0', 0};
|
||||||
|
|
||||||
const int list[] = {
|
const int list[] = {
|
||||||
@ -542,6 +544,8 @@ void CommentStyleDialog::setKeywords2List(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wcscpy_s(_pUserLang->_keywordLists[index], newList);
|
wcscpy_s(_pUserLang->_keywordLists[index], newList);
|
||||||
|
delete[] newList;
|
||||||
|
delete[] buffer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -583,7 +587,8 @@ void CommentStyleDialog::retrieve(TCHAR *dest, const TCHAR *toRetrieve, TCHAR *p
|
|||||||
|
|
||||||
void CommentStyleDialog::updateDlg()
|
void CommentStyleDialog::updateDlg()
|
||||||
{
|
{
|
||||||
TCHAR buffer[max_char] = TEXT("");
|
TCHAR* buffer = new TCHAR[max_char];
|
||||||
|
buffer[0] = '\0';
|
||||||
TCHAR intBuffer[10] = {'0', 0};
|
TCHAR intBuffer[10] = {'0', 0};
|
||||||
|
|
||||||
const int list[] = {
|
const int list[] = {
|
||||||
@ -618,11 +623,14 @@ void CommentStyleDialog::updateDlg()
|
|||||||
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX1_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX1]));
|
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX1_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX1]));
|
||||||
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX2_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX2]));
|
::SendDlgItemMessage(_hSelf, IDC_NUMBER_SUFFIX2_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_SUFFIX2]));
|
||||||
::SendDlgItemMessage(_hSelf, IDC_NUMBER_RANGE_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_RANGE]));
|
::SendDlgItemMessage(_hSelf, IDC_NUMBER_RANGE_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_NUMBER_RANGE]));
|
||||||
|
|
||||||
|
delete[] buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SymbolsStyleDialog::updateDlg()
|
void SymbolsStyleDialog::updateDlg()
|
||||||
{
|
{
|
||||||
TCHAR buffer[max_char] = TEXT("");
|
TCHAR* buffer = new TCHAR[max_char];
|
||||||
|
buffer[0] = '\0';
|
||||||
const int list[] = {
|
const int list[] = {
|
||||||
IDC_DELIMITER1_BOUNDARYOPEN_EDIT,
|
IDC_DELIMITER1_BOUNDARYOPEN_EDIT,
|
||||||
IDC_DELIMITER1_ESCAPE_EDIT,
|
IDC_DELIMITER1_ESCAPE_EDIT,
|
||||||
@ -660,6 +668,8 @@ void SymbolsStyleDialog::updateDlg()
|
|||||||
|
|
||||||
retrieve(buffer, _pUserLang->_keywordLists[SCE_USER_KWLIST_DELIMITERS], intBuffer);
|
retrieve(buffer, _pUserLang->_keywordLists[SCE_USER_KWLIST_DELIMITERS], intBuffer);
|
||||||
::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, reinterpret_cast<LPARAM>(buffer));
|
::SendDlgItemMessage(_hSelf, list[i], WM_SETTEXT, 0, reinterpret_cast<LPARAM>(buffer));
|
||||||
|
|
||||||
|
delete[] buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
::SendDlgItemMessage(_hSelf, IDC_OPERATOR1_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_OPERATORS1]));
|
::SendDlgItemMessage(_hSelf, IDC_OPERATOR1_EDIT, WM_SETTEXT, 0, reinterpret_cast<LPARAM>(_pUserLang->_keywordLists[SCE_USER_KWLIST_OPERATORS1]));
|
||||||
@ -810,8 +820,10 @@ void SymbolsStyleDialog::setKeywords2List(int id)
|
|||||||
case IDC_DELIMITER8_ESCAPE_EDIT :
|
case IDC_DELIMITER8_ESCAPE_EDIT :
|
||||||
case IDC_DELIMITER8_BOUNDARYCLOSE_EDIT :
|
case IDC_DELIMITER8_BOUNDARYCLOSE_EDIT :
|
||||||
{
|
{
|
||||||
TCHAR newList[max_char] = TEXT("");
|
TCHAR* newList = new TCHAR[max_char];
|
||||||
TCHAR buffer[max_char] = TEXT("");
|
newList[0] = '\0';
|
||||||
|
TCHAR* buffer = new TCHAR[max_char];
|
||||||
|
buffer[0] = '\0';
|
||||||
TCHAR intBuffer[10] = {'0', 0};
|
TCHAR intBuffer[10] = {'0', 0};
|
||||||
|
|
||||||
const int list[] = {
|
const int list[] = {
|
||||||
@ -854,6 +866,8 @@ void SymbolsStyleDialog::setKeywords2List(int id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
wcscpy_s(_pUserLang->_keywordLists[SCE_USER_KWLIST_DELIMITERS], newList);
|
wcscpy_s(_pUserLang->_keywordLists[SCE_USER_KWLIST_DELIMITERS], newList);
|
||||||
|
delete[] newList;
|
||||||
|
delete[] buffer;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default :
|
default :
|
||||||
|
@ -353,7 +353,7 @@ bool Utf8_16_Write::writeFile(const void* p, unsigned long _size)
|
|||||||
case uni16BE:
|
case uni16BE:
|
||||||
case uni16LE: {
|
case uni16LE: {
|
||||||
static const unsigned int bufSize = 64*1024;
|
static const unsigned int bufSize = 64*1024;
|
||||||
utf16 buf[bufSize];
|
utf16* buf = new utf16[bufSize];
|
||||||
|
|
||||||
Utf8_Iter iter8;
|
Utf8_Iter iter8;
|
||||||
iter8.set(static_cast<const ubyte*>(p), _size, m_eEncoding);
|
iter8.set(static_cast<const ubyte*>(p), _size, m_eEncoding);
|
||||||
@ -370,6 +370,7 @@ bool Utf8_16_Write::writeFile(const void* p, unsigned long _size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
isOK = true;
|
isOK = true;
|
||||||
|
delete[] buf;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
@ -32,7 +32,7 @@ using namespace std;
|
|||||||
|
|
||||||
FunctionListPanel::~FunctionListPanel()
|
FunctionListPanel::~FunctionListPanel()
|
||||||
{
|
{
|
||||||
for (const auto s : posStrs)
|
for (const auto s : _posStrs)
|
||||||
{
|
{
|
||||||
delete s;
|
delete s;
|
||||||
}
|
}
|
||||||
@ -41,8 +41,8 @@ FunctionListPanel::~FunctionListPanel()
|
|||||||
void FunctionListPanel::addEntry(const TCHAR *nodeName, const TCHAR *displayText, size_t pos)
|
void FunctionListPanel::addEntry(const TCHAR *nodeName, const TCHAR *displayText, size_t pos)
|
||||||
{
|
{
|
||||||
HTREEITEM itemParent = NULL;
|
HTREEITEM itemParent = NULL;
|
||||||
TCHAR posStr[32];
|
std::wstring posStr = std::to_wstring(pos);
|
||||||
generic_itoa(static_cast<int32_t>(pos), posStr, 10);
|
|
||||||
HTREEITEM root = _treeView.getRoot();
|
HTREEITEM root = _treeView.getRoot();
|
||||||
|
|
||||||
if (nodeName != NULL && *nodeName != '\0')
|
if (nodeName != NULL && *nodeName != '\0')
|
||||||
@ -51,7 +51,7 @@ void FunctionListPanel::addEntry(const TCHAR *nodeName, const TCHAR *displayText
|
|||||||
if (!itemParent)
|
if (!itemParent)
|
||||||
{
|
{
|
||||||
generic_string* invalidValueStr = new generic_string(posStr);
|
generic_string* invalidValueStr = new generic_string(posStr);
|
||||||
posStrs.push_back(invalidValueStr);
|
_posStrs.push_back(invalidValueStr);
|
||||||
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
||||||
|
|
||||||
itemParent = _treeView.addItem(nodeName, root, INDEX_NODE, lParamInvalidPosStr);
|
itemParent = _treeView.addItem(nodeName, root, INDEX_NODE, lParamInvalidPosStr);
|
||||||
@ -61,7 +61,7 @@ void FunctionListPanel::addEntry(const TCHAR *nodeName, const TCHAR *displayText
|
|||||||
itemParent = root;
|
itemParent = root;
|
||||||
|
|
||||||
generic_string* posString = new generic_string(posStr);
|
generic_string* posString = new generic_string(posStr);
|
||||||
posStrs.push_back(posString);
|
_posStrs.push_back(posString);
|
||||||
LPARAM lParamPosStr = reinterpret_cast<LPARAM>(posString);
|
LPARAM lParamPosStr = reinterpret_cast<LPARAM>(posString);
|
||||||
|
|
||||||
_treeView.addItem(displayText, itemParent, INDEX_LEAF, lParamPosStr);
|
_treeView.addItem(displayText, itemParent, INDEX_LEAF, lParamPosStr);
|
||||||
@ -115,7 +115,7 @@ size_t FunctionListPanel::getBodyClosePos(size_t begin, const TCHAR *bodyOpenSym
|
|||||||
else // nothing found
|
else // nothing found
|
||||||
{
|
{
|
||||||
cntOpen = 0; // get me out of here
|
cntOpen = 0; // get me out of here
|
||||||
targetEnd = static_cast<int32_t>(begin);
|
targetEnd = begin;
|
||||||
}
|
}
|
||||||
|
|
||||||
targetStart = (*_ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), targetEnd, docLen);
|
targetStart = (*_ppEditView)->searchInTarget(exprToSearch.c_str(), exprToSearch.length(), targetEnd, docLen);
|
||||||
@ -223,7 +223,7 @@ void FunctionListPanel::sortOrUnsort()
|
|||||||
const TCHAR *fn = ((*_ppEditView)->getCurrentBuffer())->getFileName();
|
const TCHAR *fn = ((*_ppEditView)->getCurrentBuffer())->getFileName();
|
||||||
|
|
||||||
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
||||||
posStrs.push_back(invalidValueStr);
|
_posStrs.push_back(invalidValueStr);
|
||||||
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
||||||
_treeViewSearchResult.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
_treeViewSearchResult.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
||||||
|
|
||||||
@ -367,7 +367,7 @@ void FunctionListPanel::reload()
|
|||||||
if (parsedOK)
|
if (parsedOK)
|
||||||
{
|
{
|
||||||
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
||||||
posStrs.push_back(invalidValueStr);
|
_posStrs.push_back(invalidValueStr);
|
||||||
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
||||||
|
|
||||||
_treeView.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
_treeView.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
||||||
@ -386,7 +386,7 @@ void FunctionListPanel::reload()
|
|||||||
const TCHAR *fullFilePath = currentBuf->getFullPathName();
|
const TCHAR *fullFilePath = currentBuf->getFullPathName();
|
||||||
|
|
||||||
generic_string* fullPathStr = new generic_string(fullFilePath);
|
generic_string* fullPathStr = new generic_string(fullFilePath);
|
||||||
posStrs.push_back(fullPathStr);
|
_posStrs.push_back(fullPathStr);
|
||||||
LPARAM lParamFullPathStr = reinterpret_cast<LPARAM>(fullPathStr);
|
LPARAM lParamFullPathStr = reinterpret_cast<LPARAM>(fullPathStr);
|
||||||
|
|
||||||
_treeView.setItemParam(root, lParamFullPathStr);
|
_treeView.setItemParam(root, lParamFullPathStr);
|
||||||
@ -654,7 +654,7 @@ void FunctionListPanel::searchFuncAndSwitchView()
|
|||||||
const TCHAR *fn = ((*_ppEditView)->getCurrentBuffer())->getFileName();
|
const TCHAR *fn = ((*_ppEditView)->getCurrentBuffer())->getFileName();
|
||||||
|
|
||||||
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
generic_string* invalidValueStr = new generic_string(TEXT("-1"));
|
||||||
posStrs.push_back(invalidValueStr);
|
_posStrs.push_back(invalidValueStr);
|
||||||
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
LPARAM lParamInvalidPosStr = reinterpret_cast<LPARAM>(invalidValueStr);
|
||||||
_treeViewSearchResult.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
_treeViewSearchResult.addItem(fn, NULL, INDEX_ROOT, lParamInvalidPosStr);
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ private:
|
|||||||
|
|
||||||
std::vector<foundInfo> _foundFuncInfos;
|
std::vector<foundInfo> _foundFuncInfos;
|
||||||
|
|
||||||
std::vector<generic_string*> posStrs;
|
std::vector<generic_string*> _posStrs;
|
||||||
|
|
||||||
ScintillaEditView **_ppEditView = nullptr;
|
ScintillaEditView **_ppEditView = nullptr;
|
||||||
FunctionParsersManager _funcParserMgr;
|
FunctionParsersManager _funcParserMgr;
|
||||||
|
@ -219,7 +219,7 @@ protected:
|
|||||||
int _nSrcTab = -1;
|
int _nSrcTab = -1;
|
||||||
int _nTabDragged = -1;
|
int _nTabDragged = -1;
|
||||||
int _previousTabSwapped = -1;
|
int _previousTabSwapped = -1;
|
||||||
POINT _draggingPoint; // coordinate of Screen
|
POINT _draggingPoint = {}; // coordinate of Screen
|
||||||
WNDPROC _tabBarDefaultProc = nullptr;
|
WNDPROC _tabBarDefaultProc = nullptr;
|
||||||
|
|
||||||
RECT _currentHoverTabRect;
|
RECT _currentHoverTabRect;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user