[NEW_FEATURE] Add build-in FunctionList (in progress).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@989 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
ae2438f737
commit
27efa1548c
@ -46,6 +46,7 @@
|
||||
#include "VerticalFileSwitcher.h"
|
||||
#include "ProjectPanel.h"
|
||||
#include "documentMap.h"
|
||||
#include "functionListPanel.h"
|
||||
|
||||
enum tb_stat {tb_saved, tb_unsaved, tb_ro};
|
||||
#define DIR_LEFT true
|
||||
@ -121,7 +122,7 @@ ToolBarButtonUnit toolBarIcons[] = {
|
||||
Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL),
|
||||
_pMainSplitter(NULL),
|
||||
_recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _pFileSwitcherPanel(NULL),
|
||||
_pProjectPanel_1(NULL), _pProjectPanel_2(NULL), _pProjectPanel_3(NULL), _pDocMap(NULL),
|
||||
_pProjectPanel_1(NULL), _pProjectPanel_2(NULL), _pProjectPanel_3(NULL), _pDocMap(NULL), _pFuncList(NULL),
|
||||
_linkTriggered(true), _isHotspotDblClicked(false), _isFolding(false),
|
||||
_sysMenuEntering(false),
|
||||
_autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView), _smartHighlighter(&_findReplaceDlg),
|
||||
@ -188,6 +189,10 @@ Notepad_plus::~Notepad_plus()
|
||||
{
|
||||
delete _pDocMap;
|
||||
}
|
||||
if (_pFuncList)
|
||||
{
|
||||
delete _pFuncList;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -1225,6 +1230,25 @@ void Notepad_plus::doTrim(trimOp whichPart)
|
||||
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
||||
}
|
||||
|
||||
void Notepad_plus::removeEmptyLine(bool isBlankContained)
|
||||
{
|
||||
// whichPart : line head or line tail
|
||||
FindOption env;
|
||||
if (isBlankContained)
|
||||
{
|
||||
env._str2Search = TEXT("\r\n");
|
||||
}
|
||||
else
|
||||
{
|
||||
env._str2Search = TEXT("^$");
|
||||
}
|
||||
env._str4Replace = TEXT("");
|
||||
env._searchType = FindExtended;//FindRegex;
|
||||
//env._doMarkLine = true;
|
||||
|
||||
_findReplaceDlg.processAll(ProcessReplaceAll, &env, true);
|
||||
}
|
||||
|
||||
void Notepad_plus::getMatchedFileNames(const TCHAR *dir, const vector<generic_string> & patterns, vector<generic_string> & fileNames, bool isRecursive, bool isInHiddenDir)
|
||||
{
|
||||
generic_string dirFilter(dir);
|
||||
@ -4499,6 +4523,11 @@ void Notepad_plus::notifyBufferActivated(BufferID bufid, int view)
|
||||
_pDocMap->setSyntaxLiliting();
|
||||
}
|
||||
|
||||
if (_pFuncList)
|
||||
{
|
||||
_pFuncList->reload();
|
||||
}
|
||||
|
||||
_linkTriggered = true;
|
||||
}
|
||||
|
||||
@ -5010,6 +5039,36 @@ void Notepad_plus::launchDocMap()
|
||||
_pEditView->getFocus();
|
||||
}
|
||||
|
||||
void Notepad_plus::launchFunctionList()
|
||||
{
|
||||
if (!_pFuncList)
|
||||
{
|
||||
_pFuncList = new FunctionListPanel();
|
||||
_pFuncList->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), &_pEditView);
|
||||
|
||||
tTbData data = {0};
|
||||
_pFuncList->create(&data);
|
||||
|
||||
::SendMessage(_pPublicInterface->getHSelf(), NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, (WPARAM)_pFuncList->getHSelf());
|
||||
// define the default docking behaviour
|
||||
data.uMask = DWS_DF_CONT_RIGHT | DWS_ICONTAB;
|
||||
//data.hIconTab = (HICON)::LoadImage(_pPublicInterface->getHinst(), MAKEINTRESOURCE(IDI_FIND_RESULT_ICON), IMAGE_ICON, 0, 0, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
|
||||
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
|
||||
|
||||
// the dlgDlg should be the index of funcItem where the current function pointer is
|
||||
// in this case is DOCKABLE_DEMO_INDEX
|
||||
// In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog
|
||||
data.dlgID = IDM_VIEW_FUNC_LIST;
|
||||
|
||||
::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data);
|
||||
}
|
||||
|
||||
//_pDocMap->initWrapMap();
|
||||
//_pDocMap->wrapMap();
|
||||
_pFuncList->display();
|
||||
|
||||
_pEditView->getFocus();
|
||||
}
|
||||
|
||||
struct TextPlayerParams {
|
||||
HWND _nppHandle;
|
||||
|
@ -192,6 +192,7 @@ class ClipboardHistoryPanel;
|
||||
class VerticalFileSwitcher;
|
||||
class ProjectPanel;
|
||||
class DocumentMap;
|
||||
class FunctionListPanel;
|
||||
|
||||
class Notepad_plus {
|
||||
|
||||
@ -427,6 +428,7 @@ private:
|
||||
ProjectPanel *_pProjectPanel_3;
|
||||
|
||||
DocumentMap *_pDocMap;
|
||||
FunctionListPanel *_pFuncList;
|
||||
|
||||
BOOL notify(SCNotification *notification);
|
||||
void specialCmd(int id);
|
||||
@ -609,11 +611,13 @@ private:
|
||||
|
||||
void wsTabConvert(spaceTab whichWay);
|
||||
void doTrim(trimOp whichPart);
|
||||
void removeEmptyLine(bool isBlankContained);
|
||||
void launchAnsiCharPanel();
|
||||
void launchClipboardHistoryPanel();
|
||||
void launchFileSwitcherPanel();
|
||||
void launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel, int panelID);
|
||||
void launchDocMap();
|
||||
void launchFunctionList();
|
||||
int getQuoteIndexFrom(const char *quoter) const;
|
||||
void showQuoteFromIndex(int index) const;
|
||||
void showAllQuotes() const;
|
||||
|
@ -449,6 +449,7 @@ BEGIN
|
||||
#ifdef UNICODE
|
||||
MENUITEM "Document Map", IDM_VIEW_DOC_MAP
|
||||
#endif
|
||||
MENUITEM "Function List", IDM_VIEW_FUNC_LIST
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV
|
||||
MENUITEM "Synchronize Horizontal Scrolling", IDM_VIEW_SYNSCROLLH
|
||||
|
@ -341,6 +341,25 @@ void Notepad_plus::command(int id)
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_VIEW_FUNC_LIST:
|
||||
{
|
||||
launchFunctionList();
|
||||
/*
|
||||
if(_pDocMap && _pDocMap->isVisible())
|
||||
{
|
||||
_pDocMap->display(false);
|
||||
_pDocMap->vzDlgDisplay(false);
|
||||
checkMenuItem(IDM_VIEW_DOC_MAP, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
checkMenuItem(IDM_VIEW_DOC_MAP, true);
|
||||
launchDocMap();
|
||||
}
|
||||
*/
|
||||
}
|
||||
break;
|
||||
|
||||
case IDM_EDIT_DELETE:
|
||||
_pEditView->execute(WM_CLEAR);
|
||||
break;
|
||||
|
253
PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp
Normal file
253
PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp
Normal file
@ -0,0 +1,253 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2003 Don HO <don.h@free.fr>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// Note that the GPL places important restrictions on "derived works", yet
|
||||
// it does not provide a detailed definition of that term. To avoid
|
||||
// misunderstandings, we consider an application to constitute a
|
||||
// "derivative work" for the purpose of this license if it does any of the
|
||||
// following:
|
||||
// 1. Integrates source code from Notepad++.
|
||||
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
|
||||
// installer, such as those produced by InstallShield.
|
||||
// 3. Links to a library or executes a program that does any of the above.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
#include "precompiledHeaders.h"
|
||||
#include "functionListPanel.h"
|
||||
#include "ScintillaEditView.h"
|
||||
|
||||
void FunctionListPanel::addEntry(const TCHAR *displayText)
|
||||
{
|
||||
int index = ::SendDlgItemMessage(_hSelf, IDC_LIST_FUNCLIST, LB_GETCOUNT, 0, 0);
|
||||
::SendDlgItemMessage(_hSelf, IDC_LIST_FUNCLIST, LB_INSERTSTRING, index, (LPARAM)displayText);
|
||||
}
|
||||
|
||||
void FunctionListPanel::removeAllEntries()
|
||||
{
|
||||
while (::SendDlgItemMessage(_hSelf, IDC_LIST_FUNCLIST, LB_GETCOUNT, 0, 0))
|
||||
::SendDlgItemMessage(_hSelf, IDC_LIST_FUNCLIST, LB_DELETESTRING, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
void FunctionListPanel::parse(vector<foundInfo> & foundInfos, size_t begin, size_t end, const TCHAR *wordToExclude, const TCHAR *regExpr2search, vector< generic_string > dataToSearch, vector< generic_string > data2ToSearch)
|
||||
{
|
||||
if (begin >= end)
|
||||
return;
|
||||
|
||||
int flags = SCFIND_REGEXP | SCFIND_POSIX;
|
||||
|
||||
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
|
||||
int targetStart = (*_ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end);
|
||||
int targetEnd = 0;
|
||||
|
||||
foundInfos.clear();
|
||||
while (targetStart != -1 && targetStart != -2)
|
||||
{
|
||||
targetStart = int((*_ppEditView)->execute(SCI_GETTARGETSTART));
|
||||
targetEnd = int((*_ppEditView)->execute(SCI_GETTARGETEND));
|
||||
if (targetEnd > int(end)) //we found a result but outside our range, therefore do not process it
|
||||
{
|
||||
break;
|
||||
}
|
||||
int foundTextLen = targetEnd - targetStart;
|
||||
if (targetStart + foundTextLen == int(end))
|
||||
break;
|
||||
|
||||
foundInfo fi;
|
||||
|
||||
// dataToSearch & data2ToSearch are optional
|
||||
if (!dataToSearch.size() && !data2ToSearch.size())
|
||||
{
|
||||
TCHAR foundData[1024];
|
||||
(*_ppEditView)->getGenericText(foundData, 1024, targetStart, targetEnd);
|
||||
|
||||
fi._data = foundData; // whole found data
|
||||
fi._pos = targetStart;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
int foundPos;
|
||||
if (dataToSearch.size())
|
||||
{
|
||||
fi._data = parseSubLevel(targetStart, targetEnd, wordToExclude, dataToSearch, foundPos);
|
||||
fi._pos = foundPos;
|
||||
}
|
||||
|
||||
if (data2ToSearch.size())
|
||||
{
|
||||
fi._data2 = parseSubLevel(targetStart, targetEnd, wordToExclude, data2ToSearch, foundPos);
|
||||
fi._pos2 = foundPos;
|
||||
}
|
||||
}
|
||||
|
||||
if (fi._pos != -1 || fi._pos2 != -1) // at least one should be found
|
||||
{
|
||||
foundInfos.push_back(fi);
|
||||
}
|
||||
|
||||
begin = targetStart + foundTextLen;
|
||||
targetStart = (*_ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
generic_string FunctionListPanel::parseSubLevel(size_t begin, size_t end, const TCHAR *wordToExclude, std::vector< generic_string > dataToSearch, int & foundPos)
|
||||
{
|
||||
if (begin >= end)
|
||||
{
|
||||
foundPos = -1;
|
||||
return TEXT("");
|
||||
}
|
||||
|
||||
int flags = SCFIND_REGEXP | SCFIND_POSIX;
|
||||
|
||||
(*_ppEditView)->execute(SCI_SETSEARCHFLAGS, flags);
|
||||
const TCHAR *regExpr2search = dataToSearch[0].c_str();
|
||||
int targetStart = (*_ppEditView)->searchInTarget(regExpr2search, lstrlen(regExpr2search), begin, end);
|
||||
|
||||
if (targetStart == -1 || targetStart == -2)
|
||||
{
|
||||
foundPos = -1;
|
||||
return TEXT("");
|
||||
}
|
||||
int targetEnd = int((*_ppEditView)->execute(SCI_GETTARGETEND));
|
||||
|
||||
if (dataToSearch.size() >= 2)
|
||||
{
|
||||
dataToSearch.erase(dataToSearch.begin());
|
||||
return parseSubLevel(targetStart, targetEnd, wordToExclude, dataToSearch, foundPos);
|
||||
}
|
||||
else // only one processed element, so we conclude the result
|
||||
{
|
||||
TCHAR foundStr[1024];
|
||||
|
||||
(*_ppEditView)->getGenericText(foundStr, 1024, targetStart, targetEnd);
|
||||
|
||||
if (!isInList(foundStr, wordToExclude))
|
||||
{
|
||||
foundPos = targetStart;
|
||||
return foundStr;
|
||||
}
|
||||
else
|
||||
{
|
||||
foundPos = -1;
|
||||
return TEXT("");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void FunctionListPanel::reload()
|
||||
{
|
||||
// clean up
|
||||
removeAllEntries();
|
||||
|
||||
generic_string funcBegin = TEXT("^[\\s]*");
|
||||
generic_string qualifier_maybe = TEXT("((static|const)[\\s]+)?");
|
||||
generic_string returnType = TEXT("[\\w]+");
|
||||
generic_string space = TEXT("[\\s]+");
|
||||
generic_string classQualifier_maybe = TEXT("([\\w_]+[\\s]*::)?");
|
||||
generic_string funcName = TEXT("[\\w_]+");
|
||||
generic_string const_maybe = TEXT("([\\s]*const[\\s]*)?");
|
||||
generic_string space_maybe = TEXT("[\\s]*");
|
||||
generic_string params = TEXT("\\([\\n\\w_,*&\\s]*\\)");
|
||||
generic_string funcBody = TEXT("\\{");
|
||||
generic_string space_eol_maybe = TEXT("[\\n\\s]*");
|
||||
|
||||
//const TCHAR TYPE[] = "";
|
||||
|
||||
generic_string function = funcBegin + qualifier_maybe + returnType + space + classQualifier_maybe + funcName + space_maybe + params + const_maybe + space_eol_maybe + funcBody;
|
||||
generic_string secondSearch = funcName + space_maybe;
|
||||
secondSearch += TEXT("\\(");
|
||||
|
||||
|
||||
int docLen = (*_ppEditView)->getCurrentDocLen();
|
||||
vector<foundInfo> fi;
|
||||
vector<generic_string> regExpr1;
|
||||
vector<generic_string> regExpr2;
|
||||
|
||||
regExpr1.push_back(secondSearch);
|
||||
regExpr1.push_back(funcName);
|
||||
|
||||
parse(fi, 0, docLen, TEXT("if while for"),
|
||||
//TEXT("^[\\s]*[\\w]+[\\s]+[\\w]*[\\s]*([\\w_]+[\\s]*::)?[\\s]*[\\w_]+[\\s]*\\([\\n\\w_,*&\\s]*\\)[\\n\\s]*\\{"),
|
||||
function.c_str(),
|
||||
regExpr1,
|
||||
//TEXT("[\\w_]+[\\s]*\\("),
|
||||
regExpr2);
|
||||
|
||||
for (size_t i = 0; i < fi.size(); i++)
|
||||
{
|
||||
addEntry(fi[i]._data.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
BOOL CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
{
|
||||
switch (message)
|
||||
{
|
||||
case WM_INITDIALOG :
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
case WM_DESTROY:
|
||||
break;
|
||||
|
||||
case WM_COMMAND :
|
||||
{
|
||||
switch (LOWORD(wParam))
|
||||
{
|
||||
case IDC_LIST_FUNCLIST:
|
||||
{
|
||||
if (HIWORD(wParam) == LBN_DBLCLK)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_SIZE:
|
||||
{
|
||||
int width = LOWORD(lParam);
|
||||
int height = HIWORD(lParam);
|
||||
::MoveWindow(::GetDlgItem(_hSelf, IDC_LIST_FUNCLIST), 0, 0, width, height, TRUE);
|
||||
break;
|
||||
}
|
||||
/*
|
||||
case WM_VKEYTOITEM:
|
||||
{
|
||||
if (LOWORD(wParam) == VK_RETURN)
|
||||
{
|
||||
int i = ::SendDlgItemMessage(_hSelf, IDC_LIST_CLIPBOARD, LB_GETCURSEL, 0, 0);
|
||||
printInt(i);
|
||||
return TRUE;
|
||||
}//return TRUE;
|
||||
break;
|
||||
}
|
||||
*/
|
||||
|
||||
default :
|
||||
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
||||
}
|
||||
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
||||
}
|
117
PowerEditor/src/WinControls/FunctionList/functionListPanel.h
Normal file
117
PowerEditor/src/WinControls/FunctionList/functionListPanel.h
Normal file
@ -0,0 +1,117 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2003 Don HO <don.h@free.fr>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// Note that the GPL places important restrictions on "derived works", yet
|
||||
// it does not provide a detailed definition of that term. To avoid
|
||||
// misunderstandings, we consider an application to constitute a
|
||||
// "derivative work" for the purpose of this license if it does any of the
|
||||
// following:
|
||||
// 1. Integrates source code from Notepad++.
|
||||
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
|
||||
// installer, such as those produced by InstallShield.
|
||||
// 3. Links to a library or executes a program that does any of the above.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
#ifndef FUNCLISTPANEL_H
|
||||
#define FUNCLISTPANEL_H
|
||||
|
||||
//#include <windows.h>
|
||||
#ifndef DOCKINGDLGINTERFACE_H
|
||||
#include "DockingDlgInterface.h"
|
||||
#endif //DOCKINGDLGINTERFACE_H
|
||||
|
||||
#include "functionListPanel_rc.h"
|
||||
|
||||
class ScintillaEditView;
|
||||
|
||||
struct FuncInfo {
|
||||
generic_string _displayText;
|
||||
size_t _offsetPos;
|
||||
};
|
||||
/*
|
||||
1. global function + object + methods: Tree view of 2 levels - only the leaf contains the position info
|
||||
root
|
||||
|
|
||||
|---leaf
|
||||
|
|
||||
|---node
|
||||
| |
|
||||
| |---leaf
|
||||
| |
|
||||
| |---leaf
|
||||
|
|
||||
|---node
|
||||
|
|
||||
|---leaf
|
||||
|
||||
2. each rule associates with file kind. For example, c_def (for *.c), cpp_def (for *.cpp) cpp_header (for *h) java_def (for *.java)...etc.
|
||||
|
||||
|
||||
|
||||
*/
|
||||
|
||||
struct foundInfo {
|
||||
generic_string _data;
|
||||
generic_string _data2;
|
||||
int _pos;
|
||||
int _pos2;
|
||||
//foundInfo(): /*_data(TEXT("")), _data2(TEXT("")), _pos(-1) _pos2(-1) */{};
|
||||
};
|
||||
|
||||
class FunctionListPanel : public DockingDlgInterface {
|
||||
public:
|
||||
FunctionListPanel(): DockingDlgInterface(IDD_FUNCLIST_PANEL), _ppEditView(NULL) {};
|
||||
|
||||
void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView) {
|
||||
DockingDlgInterface::init(hInst, hPere);
|
||||
_ppEditView = ppEditView;
|
||||
};
|
||||
|
||||
virtual void display(bool toShow = true) const {
|
||||
DockingDlgInterface::display(toShow);
|
||||
};
|
||||
|
||||
void setParent(HWND parent2set){
|
||||
_hParent = parent2set;
|
||||
};
|
||||
|
||||
// functionalities
|
||||
void reload();
|
||||
void addEntry(const TCHAR *displayText);
|
||||
void removeAllEntries();
|
||||
void removeEntry();
|
||||
void modifyEntry();
|
||||
void update();
|
||||
|
||||
|
||||
void parse(std::vector<foundInfo> & foundInfos, size_t begin, size_t end, const TCHAR *wordToExclude, const TCHAR *regExpr2search, std::vector< generic_string > dataToSearch, std::vector< generic_string > data2ToSearch);
|
||||
generic_string parseSubLevel(size_t begin, size_t end, const TCHAR *wordToExclude, std::vector< generic_string > dataToSearch, int & foundPos);
|
||||
/*
|
||||
void parse(size_t begin, size_t end, const TCHAR *wordToExclude, const TCHAR *regExpr2search, ...);
|
||||
bool parseSubLevel(size_t begin, size_t end, const TCHAR *wordToExclude, const TCHAR *regExpr2search, ...);
|
||||
*/
|
||||
|
||||
|
||||
protected:
|
||||
virtual BOOL CALLBACK FunctionListPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||
|
||||
private:
|
||||
ScintillaEditView **_ppEditView;
|
||||
std::vector<FuncInfo> _funcInfos;
|
||||
std::vector< std::pair<int, int> > _skipZones;
|
||||
};
|
||||
#endif // FUNCLISTPANEL_H
|
@ -0,0 +1,39 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2003 Don HO <don.h@free.fr>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// Note that the GPL places important restrictions on "derived works", yet
|
||||
// it does not provide a detailed definition of that term. To avoid
|
||||
// misunderstandings, we consider an application to constitute a
|
||||
// "derivative work" for the purpose of this license if it does any of the
|
||||
// following:
|
||||
// 1. Integrates source code from Notepad++.
|
||||
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
|
||||
// installer, such as those produced by InstallShield.
|
||||
// 3. Links to a library or executes a program that does any of the above.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include "functionListPanel_rc.h"
|
||||
|
||||
IDD_FUNCLIST_PANEL DIALOGEX 26, 41, 142, 324
|
||||
STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE
|
||||
CAPTION "Function List"
|
||||
FONT 8, "MS Sans Serif", 0, 0, 0x0
|
||||
BEGIN
|
||||
LISTBOX IDC_LIST_FUNCLIST,50,44,78,120,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP
|
||||
END
|
@ -0,0 +1,36 @@
|
||||
// This file is part of Notepad++ project
|
||||
// Copyright (C)2003 Don HO <don.h@free.fr>
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU General Public License
|
||||
// as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// Note that the GPL places important restrictions on "derived works", yet
|
||||
// it does not provide a detailed definition of that term. To avoid
|
||||
// misunderstandings, we consider an application to constitute a
|
||||
// "derivative work" for the purpose of this license if it does any of the
|
||||
// following:
|
||||
// 1. Integrates source code from Notepad++.
|
||||
// 2. Integrates/includes/aggregates Notepad++ into a proprietary executable
|
||||
// installer, such as those produced by InstallShield.
|
||||
// 3. Links to a library or executes a program that does any of the above.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program; if not, write to the Free Software
|
||||
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
|
||||
#ifndef IDD_FUNCLISTPANEL_RC_H
|
||||
#define IDD_FUNCLISTPANEL_RC_H
|
||||
|
||||
#define IDD_FUNCLIST_PANEL 3400
|
||||
#define IDC_LIST_FUNCLIST (IDD_FUNCLIST_PANEL + 1)
|
||||
|
||||
#endif //IDD_FUNCLISTPANEL_RC_H
|
||||
|
@ -264,6 +264,8 @@
|
||||
#define IDM_VIEW_PROJECT_PANEL_2 (IDM_VIEW + 82)
|
||||
#define IDM_VIEW_PROJECT_PANEL_3 (IDM_VIEW + 83)
|
||||
|
||||
#define IDM_VIEW_FUNC_LIST (IDM_VIEW + 84)
|
||||
|
||||
#define IDM_VIEW_GOTO_ANOTHER_VIEW 10001
|
||||
#define IDM_VIEW_CLONE_TO_ANOTHER_VIEW 10002
|
||||
#define IDM_VIEW_GOTO_NEW_INSTANCE 10003
|
||||
|
@ -327,6 +327,9 @@
|
||||
//See documentMap_rc.h
|
||||
//#define IDD_DOCUMENTMAP 3300
|
||||
|
||||
//See functionListPanel_rc.h
|
||||
//#define IDD_FUNCLIST_PANEL 3400
|
||||
|
||||
|
||||
// See regExtDlg.h
|
||||
//#define IDD_REGEXT 4000
|
||||
|
@ -42,7 +42,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
FavorSizeOrSpeed="0"
|
||||
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap"
|
||||
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList"
|
||||
PreprocessorDefinitions="WIN32;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1"
|
||||
MinimalRebuild="true"
|
||||
ExceptionHandling="2"
|
||||
@ -137,7 +137,7 @@
|
||||
FavorSizeOrSpeed="1"
|
||||
OmitFramePointers="false"
|
||||
WholeProgramOptimization="false"
|
||||
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap"
|
||||
AdditionalIncludeDirectories="..\src\WinControls\AboutDlg;..\..\scintilla\include;..\include;..\src\WinControls;..\src\WinControls\ImageListSet;..\src\WinControls\OpenSaveFileDialog;..\src\WinControls\SplitterContainer;..\src\WinControls\StaticDialog;..\src\WinControls\TabBar;..\src\WinControls\ToolBar;..\src\MISC\Process;..\src\ScitillaComponent;..\src\MISC;..\src\MISC\SysMsg;..\src\WinControls\StatusBar;..\src;..\src\WinControls\StaticDialog\RunDlg;..\src\tinyxml;..\src\WinControls\ColourPicker;..\src\Win32Explr;..\src\MISC\RegExt;..\src\WinControls\TrayIcon;..\src\WinControls\shortcut;..\src\WinControls\Grid;..\src\WinControls\ContextMenu;..\src\MISC\PluginsManager;..\src\WinControls\Preference;..\src\WinControls\WindowsDlg;..\src\WinControls\TaskList;..\src\WinControls\DockingWnd;..\src\WinControls\ToolTip;..\src\MISC\Exception;..\src\MISC\Common;..\src\tinyxml\tinyXmlA;..\src\WinControls\AnsiCharPanel;..\src\WinControls\ClipboardHistory;..\src\WinControls\FindCharsInRange;..\src\WinControls\VerticalFileSwitcher;..\src\WinControls\ProjectPanel;..\src\WinControls\DocumentMap;..\src\WinControls\FunctionList"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL;_CRT_NONSTDC_NO_DEPRECATE;_CRT_SECURE_NO_WARNINGS;_CRT_NON_CONFORMING_SWPRINTFS=1"
|
||||
GeneratePreprocessedFile="0"
|
||||
StringPooling="true"
|
||||
@ -203,7 +203,6 @@
|
||||
CommandLine="copy ..\src\config.model.xml ..\bin\config.model.xml
copy ..\src\langs.model.xml ..\bin\langs.model.xml
copy ..\src\stylers.model.xml ..\bin\stylers.model.xml
copy ..\src\shortcuts.xml ..\bin\shortcuts.xml
copy ..\src\contextMenu.xml ..\bin\contextMenu.xml
..\misc\vistaIconTool\changeIcon.bat "..\misc\vistaIconTool\ChangeIcon.exe" "$(OutDir)\notepad++.exe"
"
|
||||
/>
|
||||
</Configuration>
|
||||
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
@ -304,6 +303,10 @@
|
||||
RelativePath="..\src\ScitillaComponent\FunctionCallTip.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\WinControls\FunctionList\functionListPanel.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ScitillaComponent\GoToLineDlg.cpp"
|
||||
>
|
||||
@ -714,6 +717,10 @@
|
||||
RelativePath="..\src\icons\findResult.ico"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\WinControls\FunctionList\functionListPanel.rc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\hot_close.ico"
|
||||
>
|
||||
@ -1243,6 +1250,14 @@
|
||||
RelativePath="..\src\ScitillaComponent\FunctionCallTip.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\WinControls\FunctionList\functionListPanel.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\WinControls\FunctionList\functionListPanel_rc.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\src\ScitillaComponent\GoToLineDlg.h"
|
||||
>
|
||||
|
Loading…
Reference in New Issue
Block a user