From 6eb08d415bd0ca5bd0b74d45b5908eb9e834e287 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Thu, 19 May 2011 21:19:05 +0000 Subject: [PATCH] [NEW_FEATURE] Add find characters in range feature. [NEW_FEATURE] Add file switcher (list) dialog (in progress). git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@756 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 57 ++++-- PowerEditor/src/Notepad_plus.h | 15 +- PowerEditor/src/Notepad_plus.rc | 2 + PowerEditor/src/Notepad_plus_Window.cpp | 3 + PowerEditor/src/NppCommands.cpp | 24 ++- PowerEditor/src/Parameters.cpp | 4 +- PowerEditor/src/Parameters.h | 8 +- .../WinControls/AnsiCharPanel/ListView.cpp | 2 +- .../AnsiCharPanel/ansiCharPanel.cpp | 3 - .../FindCharsInRange/FindCharsInRange.cpp | 163 ++++++++++++++++++ .../FindCharsInRange/FindCharsInRange.h | 68 ++++++++ .../FindCharsInRange/findCharsInRange.rc | 39 +++++ .../FindCharsInRange/findCharsInRange_rc.h | 32 ++++ .../VerticalFileSwitcher.cpp | 63 +++++++ .../VerticalFileSwitcher.h | 55 ++++++ .../VerticalFileSwitcher.rc | 30 ++++ .../VerticalFileSwitcherListView.cpp | 101 +++++++++++ .../VerticalFileSwitcherListView.h | 46 +++++ .../VerticalFileSwitcher_rc.h | 25 +++ PowerEditor/src/menuCmdID.h | 7 +- PowerEditor/src/resource.h | 9 + PowerEditor/visual.net/notepadPlus.vcproj | 44 ++++- 22 files changed, 766 insertions(+), 34 deletions(-) create mode 100644 PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp create mode 100644 PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h create mode 100644 PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange.rc create mode 100644 PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange_rc.h create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.rc create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h create mode 100644 PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher_rc.h diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 365846e6..7dff372e 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -30,6 +30,9 @@ #include "TaskListDlg.h" #include "xmlMatchedTagsHighlighter.h" #include "EncodingMapper.h" +#include "ansiCharPanel.h" +#include "clipboardHistoryPanel.h" +#include "VerticalFileSwitcher.h" enum tb_stat {tb_saved, tb_unsaved, tb_ro}; #define DIR_LEFT true @@ -104,7 +107,7 @@ ToolBarButtonUnit toolBarIcons[] = { Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL), _pMainSplitter(NULL), - _recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), + _recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _pFileSwitcherPanel(NULL), _linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false), _sysMenuEntering(false), _autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView), _smartHighlighter(&_findReplaceDlg), _isFileOpening(false), _rememberThisSession(true), _pAnsiCharPanel(NULL), _pClipboardHistoryPanel(NULL) @@ -150,6 +153,9 @@ Notepad_plus::~Notepad_plus() if (_pClipboardHistoryPanel) delete _pClipboardHistoryPanel; + + if (_pFileSwitcherPanel) + delete _pFileSwitcherPanel; } @@ -533,6 +539,7 @@ LRESULT Notepad_plus::init(HWND hwnd) _incrementFindDlg.init(_pPublicInterface->getHinst(), hwnd, &_findReplaceDlg, _nativeLangSpeaker.isRTL()); _incrementFindDlg.addToRebar(&_rebarBottom); _goToLineDlg.init(_pPublicInterface->getHinst(), hwnd, &_pEditView); + _findCharsInRangeDlg.init(_pPublicInterface->getHinst(), hwnd, &_pEditView); _colEditorDlg.init(_pPublicInterface->getHinst(), hwnd, &_pEditView); _aboutDlg.init(_pPublicInterface->getHinst(), hwnd); _runDlg.init(_pPublicInterface->getHinst(), hwnd); @@ -578,12 +585,12 @@ LRESULT Notepad_plus::init(HWND hwnd) for (size_t i = 0 ; i < dmd._pluginDockInfo.size() ; i++) { - PlugingDlgDockingInfo & pdi = dmd._pluginDockInfo[i]; + PluginDlgDockingInfo & pdi = dmd._pluginDockInfo[i]; if (pdi._isVisible) { if (pdi._name == NPP_INTERNAL_FUCTION_STR) { - ::SendMessage(hwnd, WM_COMMAND, pdi._internalID, 0); + _internalFuncIDs.push_back(pdi._internalID); } else { @@ -688,7 +695,7 @@ void Notepad_plus::saveDockingParams() nppGUI._dockingData._containerTabInfo.clear(); // create a vector to save the current information - vector vPluginDockInfo; + vector vPluginDockInfo; vector vFloatingWindowInfo; // save every container @@ -703,7 +710,7 @@ void Notepad_plus::saveDockingParams() { if (vDataVis[j]->pszName && vDataVis[j]->pszName[0]) { - PlugingDlgDockingInfo pddi(vDataVis[j]->pszModuleName, vDataVis[j]->dlgID, i, vDataVis[j]->iPrevCont, true); + PluginDlgDockingInfo pddi(vDataVis[j]->pszModuleName, vDataVis[j]->dlgID, i, vDataVis[j]->iPrevCont, true); vPluginDockInfo.push_back(pddi); } } @@ -715,7 +722,7 @@ void Notepad_plus::saveDockingParams() { if ((vDataAll[j]->pszName && vDataAll[j]->pszName[0]) && (!vCont[i]->isTbVis(vDataAll[j]))) { - PlugingDlgDockingInfo pddi(vDataAll[j]->pszModuleName, vDataAll[j]->dlgID, i, vDataAll[j]->iPrevCont, false); + PluginDlgDockingInfo pddi(vDataAll[j]->pszModuleName, vDataAll[j]->dlgID, i, vDataAll[j]->iPrevCont, false); vPluginDockInfo.push_back(pddi); } } @@ -2467,7 +2474,6 @@ int Notepad_plus::wordCount() { FindOption env; env._str2Search = TEXT("[^ \\\\.,;:!?()+\\-\\*/=\\]\\[{}&~\"'`|@$%§<>\\^]+"); - //printStr(env._str2Search.c_str()); env._searchType = FindRegex; return _findReplaceDlg.processAll(ProcessCountAll, &env, true); } @@ -3829,7 +3835,7 @@ bool Notepad_plus::getIntegralDockingData(tTbData & dockData, int & iCont, bool for (size_t i = 0 ; i < dockingData._pluginDockInfo.size() ; i++) { - const PlugingDlgDockingInfo & pddi = dockingData._pluginDockInfo[i]; + const PluginDlgDockingInfo & pddi = dockingData._pluginDockInfo[i]; if (!generic_stricmp(pddi._name.c_str(), dockData.pszModuleName) && (pddi._internalID == dockData.dlgID)) { @@ -3842,7 +3848,7 @@ bool Notepad_plus::getIntegralDockingData(tTbData & dockData, int & iCont, bool int cont = (pddi._currContainer < DOCKCONT_MAX ? pddi._prevContainer : pddi._currContainer); RECT *pRc = dockingData.getFloatingRCFrom(cont); if (pRc) - dockData.rcFloat = *pRc; + dockData.rcFloat = *pRc; } return true; } @@ -4555,9 +4561,9 @@ bool Notepad_plus::reloadLang() _nativeLangSpeaker.changeDlgLang(_runMacroDlg.getHSelf(), "MultiMacro"); } - if (_goToLineDlg.isCreated()) + if (_findCharsInRangeDlg.isCreated()) { - _nativeLangSpeaker.changeDlgLang(_goToLineDlg.getHSelf(), "GoToLine"); + _nativeLangSpeaker.changeDlgLang(_findCharsInRangeDlg.getHSelf(), "FindCharsInRange"); } if (_colEditorDlg.isCreated()) @@ -4601,6 +4607,32 @@ void Notepad_plus::launchClipboardHistoryPanel() _pClipboardHistoryPanel->display(); } +void Notepad_plus::launchFileSwitcherPanel() +{ + if (!_pFileSwitcherPanel) + { + _pFileSwitcherPanel = new VerticalFileSwitcher; + HIMAGELIST hImgLst = _docTabIconList.getHandle(); + _pFileSwitcherPanel->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf(), hImgLst); + + tTbData data = {0}; + _pFileSwitcherPanel->create(&data); + + ::SendMessage(_pPublicInterface->getHSelf(), NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, (WPARAM)_pFileSwitcherPanel->getHSelf()); + // define the default docking behaviour + data.uMask = DWS_DF_CONT_LEFT | 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_FILESWITCHER_PANEL; + ::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data); + } + _pFileSwitcherPanel->display(); +} + void Notepad_plus::launchAnsiCharPanel() { if (!_pAnsiCharPanel) @@ -4614,7 +4646,7 @@ void Notepad_plus::launchAnsiCharPanel() ::SendMessage(_pPublicInterface->getHSelf(), NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, (WPARAM)_pAnsiCharPanel->getHSelf()); // define the default docking behaviour - data.uMask = DWS_DF_CONT_RIGHT | DWS_ICONTAB/* | DWS_ADDINFO*/; + 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; @@ -4626,4 +4658,3 @@ void Notepad_plus::launchAnsiCharPanel() } _pAnsiCharPanel->display(); } - diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 89a12a7f..7c2d7e84 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -54,6 +54,10 @@ #include "GoToLineDlg.h" #endif //GOTILINE_DLG_H +#ifndef FINDCHARSINRANGE_DLG_H +#include "FindCharsInRange.h" +#endif //FINDCHARSINRANGE_DLG_H + #ifndef COLUMNEDITOR_H #include "columnEditor.h" #endif //COLUMNEDITOR_H @@ -111,8 +115,7 @@ #endif //SIZE_DLG_H #include "localization.h" -#include "ansiCharPanel.h" -#include "clipboardHistoryPanel.h" + #define MENU 0x01 #define TOOLBAR 0x02 @@ -168,7 +171,9 @@ struct VisibleGUIConf { class FileDialog; class Notepad_plus_Window; class AnsiCharPanel; - +class ClipboardHistoryPanel; +class VerticalFileSwitcher; + class Notepad_plus { friend class Notepad_plus_Window; @@ -278,6 +283,7 @@ private: Notepad_plus_Window *_pPublicInterface; Window *_pMainWindow; DockingManager _dockingManager; + vector _internalFuncIDs; AutoCompletion _autoCompleteMain; AutoCompletion _autoCompleteSub; //each Scintilla has its own autoComplete @@ -319,6 +325,7 @@ private: ColumnEditorDlg _colEditorDlg; WordStyleDlg _configStyleDlg; PreferenceDlg _preference; + FindCharsInRangeDlg _findCharsInRangeDlg; // a handle list of all the Notepad++ dialogs vector _hModelessDlgs; @@ -391,6 +398,7 @@ private: AnsiCharPanel *_pAnsiCharPanel; ClipboardHistoryPanel *_pClipboardHistoryPanel; + VerticalFileSwitcher *_pFileSwitcherPanel; BOOL notify(SCNotification *notification); void specialCmd(int id); @@ -576,6 +584,7 @@ private: void doTrim(trimOp whichPart); void launchAnsiCharPanel(); void launchClipboardHistoryPanel(); + void launchFileSwitcherPanel(); }; diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index e74f522c..cea69c6b 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -351,6 +351,8 @@ BEGIN MENUITEM "Remove Unmarked Lines", IDM_SEARCH_DELETEUNMARKEDLINES MENUITEM "Inverse Bookmark", IDM_SEARCH_INVERSEMARKS END + MENUITEM SEPARATOR + MENUITEM "Find characters in range...", IDM_SEARCH_FINDCHARINRANGE END POPUP "&View" diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index ba6b00cc..0d090a6f 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -193,6 +193,9 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin } } + for (size_t i = 0 ; i < _notepad_plus_plus_core._internalFuncIDs.size() ; i++) + ::SendMessage(_hSelf, WM_COMMAND, _notepad_plus_plus_core._internalFuncIDs[i], 0); + // Notify plugins that Notepad++ is ready SCNotification scnN; scnN.nmhdr.code = NPPN_READY; diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 5b5099c1..a7bc4100 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -43,12 +43,17 @@ void Notepad_plus::command(int id) switch (id) { case IDM_FILE_NEW: + { fileNew(); - break; + //launchFileSwitcherPanel(); + } + break; case IDM_FILE_OPEN: + { fileOpen(); - break; + } + break; case IDM_FILE_RELOAD: fileReload(); @@ -287,6 +292,12 @@ void Notepad_plus::command(int id) } break; + case IDM_VIEW_FILESWITCHER_PANEL: + { + launchFileSwitcherPanel(); + } + break; + case IDM_EDIT_DELETE: _pEditView->execute(WM_CLEAR); break; @@ -602,6 +613,15 @@ void Notepad_plus::command(int id) break; } + case IDM_SEARCH_FINDCHARINRANGE : + { + bool isFirstTime = !_findCharsInRangeDlg.isCreated(); + _findCharsInRangeDlg.doDialog(_nativeLangSpeaker.isRTL()); + if (isFirstTime) + _nativeLangSpeaker.changeDlgLang(_findCharsInRangeDlg.getHSelf(), "FindCharsInRange"); + break; + } + case IDM_EDIT_COLUMNMODETIP : { _nativeLangSpeaker.messageBox("ColumnModeTip", diff --git a/PowerEditor/src/Parameters.cpp b/PowerEditor/src/Parameters.cpp index 9886ee0f..729adab0 100644 --- a/PowerEditor/src/Parameters.cpp +++ b/PowerEditor/src/Parameters.cpp @@ -3854,7 +3854,7 @@ void NppParameters::feedDockingManager(TiXmlNode *node) isVisible = (lstrcmp(val, TEXT("yes")) == 0); } - _nppGUI._dockingData._pluginDockInfo.push_back(PlugingDlgDockingInfo(name, id, curr, prev, isVisible)); + _nppGUI._dockingData._pluginDockInfo.push_back(PluginDlgDockingInfo(name, id, curr, prev, isVisible)); } } @@ -4602,7 +4602,7 @@ void NppParameters::insertDockingParamNode(TiXmlNode *GUIRoot) for (size_t i = 0 ; i < _nppGUI._dockingData._pluginDockInfo.size() ; i++) { - PlugingDlgDockingInfo & pdi = _nppGUI._dockingData._pluginDockInfo[i]; + PluginDlgDockingInfo & pdi = _nppGUI._dockingData._pluginDockInfo[i]; TiXmlElement PDNode(TEXT("PluginDlg")); PDNode.SetAttribute(TEXT("pluginName"), pdi._name); PDNode.SetAttribute(TEXT("id"), pdi._internalID); diff --git a/PowerEditor/src/Parameters.h b/PowerEditor/src/Parameters.h index ce5961a2..eaea6bb6 100644 --- a/PowerEditor/src/Parameters.h +++ b/PowerEditor/src/Parameters.h @@ -185,7 +185,7 @@ struct FloatingWindowInfo { }; }; -struct PlugingDlgDockingInfo { +struct PluginDlgDockingInfo { generic_string _name; int _internalID; @@ -193,9 +193,9 @@ struct PlugingDlgDockingInfo { int _prevContainer; bool _isVisible; - PlugingDlgDockingInfo(const TCHAR *pluginName, int id, int curr, int prev, bool isVis) : _internalID(id), _currContainer(curr), _prevContainer(prev), _isVisible(isVis), _name(pluginName){}; + PluginDlgDockingInfo(const TCHAR *pluginName, int id, int curr, int prev, bool isVis) : _internalID(id), _currContainer(curr), _prevContainer(prev), _isVisible(isVis), _name(pluginName){}; - friend inline const bool operator==(const PlugingDlgDockingInfo & a, const PlugingDlgDockingInfo & b) { + friend inline const bool operator==(const PluginDlgDockingInfo & a, const PluginDlgDockingInfo & b) { if ((a._name == b._name) && (a._internalID == b._internalID)) return true; else @@ -219,7 +219,7 @@ struct DockingManagerData { DockingManagerData() : _leftWidth(200), _rightWidth(200), _topHeight(200), _bottomHight(200) {}; vector _flaotingWindowInfo; - vector _pluginDockInfo; + vector _pluginDockInfo; vector _containerTabInfo; RECT * getFloatingRCFrom(int floatCont) { diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp index 34a5118a..f58c82ed 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ListView.cpp @@ -162,7 +162,7 @@ generic_string ListView::getAscii(unsigned char value) ascii[1] = '\0'; MultiByteToWideChar(_codepage, 0, ascii, -1, charStr, sizeof(charStr)); #else - charStr[0] = (unsigned char)i; + charStr[0] = (unsigned char)value; charStr[1] = '\0'; #endif return charStr; diff --git a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp index 0bb0f5b9..bc426961 100644 --- a/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp +++ b/PowerEditor/src/WinControls/AnsiCharPanel/ansiCharPanel.cpp @@ -33,9 +33,6 @@ BOOL CALLBACK AnsiCharPanel::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPa { case WM_INITDIALOG : { - TCHAR asciiStr[2]; - asciiStr[1] = '\0'; - _listView.init(_hInst, _hSelf); int codepage = (*_ppEditView)->getCurrentBuffer()->getEncoding(); _listView.setValues(codepage==-1?0:codepage); diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp new file mode 100644 index 00000000..0ff66694 --- /dev/null +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.cpp @@ -0,0 +1,163 @@ +//this file is part of notepad++ +//Copyright (C)2003 Don HO ( donho@altern.org ) +// +//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. +// +//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 "FindCharsInRange.h" +#include "FindCharsInRange_rc.h" + +BOOL CALLBACK FindCharsInRangeDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM) +{ + switch (message) + { + case WM_INITDIALOG : + { + ::SendDlgItemMessage(_hSelf, IDC_RANGESTART_EDIT, EM_LIMITTEXT, 3, 0); + ::SendDlgItemMessage(_hSelf, IDC_RANGEEND_EDIT, EM_LIMITTEXT, 3, 0); + ::SendDlgItemMessage(_hSelf, IDC_NONASCCI_RADIO, BM_SETCHECK, TRUE, 0); + ::SendDlgItemMessage(_hSelf, ID_FINDCHAR_DIRDOWN, BM_SETCHECK, TRUE, 0); + goToCenter(); + return TRUE; + } + case WM_COMMAND : + { + switch (wParam) + { + case IDCANCEL : // Close + display(false); + return TRUE; + + case ID_FINDCHAR_NEXT: + { + int currentPos = (*_ppEditView)->execute(SCI_GETCURRENTPOS); + unsigned char startRange = 0; + unsigned char endRange = 255; + bool direction = dirDown; + bool isWrap = true; + if (!getRangeFromUI(startRange, endRange)) + { + //STOP! + ::MessageBox(_hSelf, TEXT("You should type between from 0 to 255."), TEXT("Range Value problem"), MB_OK); + return TRUE; + } + getDirectionFromUI(direction, isWrap); + findCharInRange(startRange, endRange, currentPos, direction, isWrap); + return TRUE; + } + + default : + { + break; + } + } + } + default : + return FALSE; + } +} + +bool FindCharsInRangeDlg::findCharInRange(unsigned char beginRange, unsigned char endRange, int startPos, bool direction, bool wrap) +{ + int totalSize = (*_ppEditView)->getCurrentDocLen(); + if (startPos == -1) + startPos = direction==dirDown?0:totalSize-1; + if (startPos > totalSize) + return false; + + char *content = new char[totalSize+1]; + (*_ppEditView)->getText(content, 0, totalSize); + int found = -1; + + for (int i = startPos-(direction == dirUp?1:0); + (direction == dirDown)?i < totalSize:i >= 0 ; + (direction == dirDown)?(i++):(i--)) + { + if ((unsigned char)content[i] >= beginRange && (unsigned char)content[i] <= endRange) + { + found = i; + break; + } + } + + if (found == -1) + { + if (wrap) + { + for (int i = (direction == dirUp?totalSize-1:0); + (direction == dirDown)?i < totalSize:i >= 0 ; + (direction == dirDown)?(i++):(i--)) + { + if ((unsigned char)content[i] >= beginRange && (unsigned char)content[i] <= endRange) + { + found = i; + break; + } + } + } + } + + if (found != -1) + { + //printInt(found); + int sci_line = (*_ppEditView)->execute(SCI_LINEFROMPOSITION, found); + (*_ppEditView)->execute(SCI_ENSUREVISIBLE, sci_line); + (*_ppEditView)->execute(SCI_GOTOPOS, found); + (*_ppEditView)->execute(SCI_SETSEL, (direction == dirDown)?found:found+1, (direction == dirDown)?found+1:found); + } + delete [] content; + return (found != -1); +} + +void FindCharsInRangeDlg::getDirectionFromUI(bool & whichDirection, bool & isWrap) +{ + whichDirection = isCheckedOrNot(ID_FINDCHAR_DIRUP); + isWrap = isCheckedOrNot(ID_FINDCHAR_WRAP); +} + +bool FindCharsInRangeDlg::getRangeFromUI(unsigned char & startRange, unsigned char & endRange) +{ + if (isCheckedOrNot(IDC_NONASCCI_RADIO)) + { + startRange = 128; + endRange = 255; + return true; + } + if (isCheckedOrNot(IDC_ASCCI_RADIO)) + { + startRange = 0; + endRange = 127; + return true; + } + + if (isCheckedOrNot(IDC_MYRANGE_RADIO)) + { + BOOL startBool, endBool; + int start = ::GetDlgItemInt(_hSelf, IDC_RANGESTART_EDIT, &startBool, FALSE); + int end = ::GetDlgItemInt(_hSelf, IDC_RANGEEND_EDIT, &endBool, FALSE); + + if (!startBool || !endBool) + return false; + if (start > 255 || end > 255) + return false; + if (start > end) + return false; + startRange = (unsigned char)start; + endRange = (unsigned char)end; + return true; + } + + return false; +} diff --git a/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h new file mode 100644 index 00000000..0a398bd5 --- /dev/null +++ b/PowerEditor/src/WinControls/FindCharsInRange/FindCharsInRange.h @@ -0,0 +1,68 @@ +//this file is part of notepad++ +//Copyright (C)2003 Don HO ( donho@altern.org ) +// +//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. +// +//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 FINDCHARSINRANGE_DLG_H +#define FINDCHARSINRANGE_DLG_H + +#ifndef FINDCHARSINRANGE_RC_H +#include "findCharsInRange_rc.h" +#endif //FINDCHARSINRANGE_RC_H + +#ifndef SCINTILLA_EDIT_VIEW_H +#include "ScintillaEditView.h" +#endif //SCINTILLA_EDIT_VIEW_H + +class FindCharsInRangeDlg : public StaticDialog +{ +public : + FindCharsInRangeDlg() : StaticDialog() {}; + + void init(HINSTANCE hInst, HWND hPere, ScintillaEditView **ppEditView) { + Window::init(hInst, hPere); + if (!ppEditView) + throw std::runtime_error("FindCharsInRangeDlg::init : ppEditView is null."); + _ppEditView = ppEditView; + }; + + virtual void create(int dialogID, bool isRTL = false) { + StaticDialog::create(dialogID, isRTL); + }; + + void doDialog(bool isRTL = false) { + if (!isCreated()) + create(IDD_FINDCHARACTERS, isRTL); + display(); + }; + + virtual void display(bool toShow = true) const { + Window::display(toShow); + }; + +protected : + virtual BOOL CALLBACK run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + +private : + ScintillaEditView **_ppEditView; + bool findCharInRange(unsigned char beginRange, unsigned char endRange, int startPos, bool direction, bool wrap); + bool getRangeFromUI(unsigned char & startRange, unsigned char & endRange); + void getDirectionFromUI(bool & whichDirection, bool & isWrap); + bool isCheckedOrNot(int checkControlID) const { + return (BST_CHECKED == ::SendMessage(::GetDlgItem(_hSelf, checkControlID), BM_GETCHECK, 0, 0)); + }; +}; + +#endif //FINDCHARSINRANGE_DLG_H diff --git a/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange.rc b/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange.rc new file mode 100644 index 00000000..667029bc --- /dev/null +++ b/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange.rc @@ -0,0 +1,39 @@ +//this file is part of notepad++ +//Copyright (C)2011 Don HO +// +//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. +// +//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 +#include "findCharsInRange_rc.h" + +IDD_FINDCHARACTERS DIALOGEX 26, 41, 263, 126 +STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE +CAPTION "Find Characters in Range..." +FONT 8, "MS Shell Dlg", 0, 0, 0x0 +BEGIN + CONTROL "Non-ASCII Characters (128-255)",IDC_NONASCCI_RADIO,"Button",BS_AUTORADIOBUTTON,22,13,146,10 + CONTROL "ASCII Characters (0 - 127)",IDC_ASCCI_RADIO,"Button",BS_AUTORADIOBUTTON,22,32,151,10 + CONTROL "My Range:",IDC_MYRANGE_RADIO,"Button",BS_AUTORADIOBUTTON,22,51,67,10 + EDITTEXT IDC_RANGESTART_EDIT,91,49,25,14,ES_AUTOHSCROLL | ES_NUMBER + LTEXT "-",IDC_STATIC,122,52,8,8 + EDITTEXT IDC_RANGEEND_EDIT,129,49,25,14,ES_AUTOHSCROLL | ES_NUMBER + CONTROL "&Up",ID_FINDCHAR_DIRUP,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,25,91,64,12 + CONTROL "&Down",ID_FINDCHAR_DIRDOWN,"Button",BS_AUTORADIOBUTTON | WS_TABSTOP,25,103,63,12 + GROUPBOX "Direction",IDC_FINDCHAR_DIR_STATIC,19,79,74,42,WS_GROUP + CONTROL "Wra&p around",ID_FINDCHAR_WRAP,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,105,102,110,15 + DEFPUSHBUTTON "Find",ID_FINDCHAR_NEXT,182,8,70,14,BS_NOTIFY + PUSHBUTTON "Close",IDCANCEL,181,27,70,14,BS_NOTIFY +END diff --git a/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange_rc.h b/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange_rc.h new file mode 100644 index 00000000..aa8c5b17 --- /dev/null +++ b/PowerEditor/src/WinControls/FindCharsInRange/findCharsInRange_rc.h @@ -0,0 +1,32 @@ +//this file is part of notepad++ +//Copyright (C)2011 Don HO +// +//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. +// +//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 IDC_STATIC +#define IDC_STATIC -1 +#endif + +#define IDD_FINDCHARACTERS 2900 +#define IDC_NONASCCI_RADIO (IDD_FINDCHARACTERS + 1) +#define IDC_ASCCI_RADIO (IDD_FINDCHARACTERS + 2) +#define IDC_MYRANGE_RADIO (IDD_FINDCHARACTERS + 3) +#define IDC_RANGESTART_EDIT (IDD_FINDCHARACTERS + 4) +#define IDC_RANGEEND_EDIT (IDD_FINDCHARACTERS + 5) +#define ID_FINDCHAR_DIRUP (IDD_FINDCHARACTERS + 6) +#define ID_FINDCHAR_DIRDOWN (IDD_FINDCHARACTERS + 7) +#define IDC_FINDCHAR_DIR_STATIC (IDD_FINDCHARACTERS + 8) +#define ID_FINDCHAR_WRAP (IDD_FINDCHARACTERS + 9) +#define ID_FINDCHAR_NEXT (IDD_FINDCHARACTERS + 10) diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp new file mode 100644 index 00000000..bdfbc934 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.cpp @@ -0,0 +1,63 @@ +/* +this file is part of notepad++ +Copyright (C)2011 Don HO + +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. + +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 "VerticalFileSwitcher.h" + +BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam) +{ + switch (message) + { + case WM_INITDIALOG : + { + + _fileListView.init(_hInst, _hSelf, _hImaLst); + _fileListView.initList(); + _fileListView.display(); + + return TRUE; + } +/* + case WM_NOTIFY: + { + switch (((LPNMHDR)lParam)->code) + { + case NM_DBLCLK: + { + return TRUE; + } + default: + break; + } + } + return TRUE; +*/ + case WM_SIZE: + { + int width = LOWORD(lParam); + int height = HIWORD(lParam); + ::MoveWindow(_fileListView.getHSelf(), 0, 0, width, height, TRUE); + break; + } + + default : + return DockingDlgInterface::run_dlgProc(message, wParam, lParam); + } + return DockingDlgInterface::run_dlgProc(message, wParam, lParam); +} diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h new file mode 100644 index 00000000..2d3b0133 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.h @@ -0,0 +1,55 @@ +/* +this file is part of notepad++ +Copyright (C)2011 Don HO + +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. + +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 VERTICALFILESWITCHER_H +#define VERTICALFILESWITCHER_H + +//#include +#ifndef DOCKINGDLGINTERFACE_H +#include "DockingDlgInterface.h" +#endif //DOCKINGDLGINTERFACE_H + +#include "VerticalFileSwitcher_rc.h" +#include "VerticalFileSwitcherListView.h" + +class VerticalFileSwitcher : public DockingDlgInterface { +public: + VerticalFileSwitcher(): DockingDlgInterface(IDD_FILESWITCHER_PANEL) {}; + + void init(HINSTANCE hInst, HWND hPere, HIMAGELIST hImaLst) { + DockingDlgInterface::init(hInst, hPere); + _hImaLst = hImaLst; + }; + + virtual void display(bool toShow = true) const { + DockingDlgInterface::display(toShow); + }; + + void setParent(HWND parent2set){ + _hParent = parent2set; + }; + +protected: + virtual BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam); + +private: + VerticalFileSwitcherListView _fileListView; + HIMAGELIST _hImaLst; +}; +#endif // VERTICALFILESWITCHER_H diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.rc b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.rc new file mode 100644 index 00000000..b160baf6 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher.rc @@ -0,0 +1,30 @@ +/* +this file is part of notepad++ +Copyright (C)2011 Don HO + +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. + +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 +#include "VerticalFileSwitcher_rc.h" + +IDD_FILESWITCHER_PANEL DIALOGEX 26, 41, 142, 324 +STYLE DS_SETFONT | WS_POPUP | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_TOOLWINDOW | WS_EX_WINDOWEDGE +CAPTION "File Switcher" +FONT 8, "MS Sans Serif", 0, 0, 0x0 +BEGIN + //LISTBOX IDC_LIST_FILESWITCHER,50,44,78,120,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_TABSTOP +END diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp new file mode 100644 index 00000000..dd07eac4 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.cpp @@ -0,0 +1,101 @@ +//this file is part of notepad++ +//Copyright (C)2011 Don HO +// +//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. +// +//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 "VerticalFileSwitcherListView.h" + +void VerticalFileSwitcherListView::init(HINSTANCE hInst, HWND parent, HIMAGELIST hImaLst) +{ + Window::init(hInst, parent); + _hImaLst = hImaLst; + INITCOMMONCONTROLSEX icex; + + // Ensure that the common control DLL is loaded. + icex.dwSize = sizeof(INITCOMMONCONTROLSEX); + icex.dwICC = ICC_LISTVIEW_CLASSES; + InitCommonControlsEx(&icex); + + // Create the list-view window in report view with label editing enabled. + int listViewStyles = LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_NOSORTHEADER\ + | LVS_SINGLESEL | LVS_AUTOARRANGE\ + | LVS_SHAREIMAGELISTS /*| WS_BORDER*/; + + _hSelf = ::CreateWindow(WC_LISTVIEW, + TEXT(""), + WS_CHILD | listViewStyles, + 0, + 0, + 0, + 0, + _hParent, + (HMENU) NULL, + hInst, + NULL); + if (!_hSelf) + { + throw std::runtime_error("VerticalFileSwitcherListView::init : CreateWindowEx() function return null"); + } + + ::SetWindowLongPtr(_hSelf, GWLP_USERDATA, (LONG_PTR)this); + _defaultProc = reinterpret_cast(::SetWindowLongPtr(_hSelf, GWLP_WNDPROC, (LONG_PTR)staticProc)); + + DWORD exStyle = ListView_GetExtendedListViewStyle(_hSelf); + exStyle |= LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT ; + ListView_SetExtendedListViewStyle(_hSelf, exStyle); + + LVCOLUMN lvColumn; + lvColumn.mask = LVCF_WIDTH; + + lvColumn.cx = 200; + + ListView_InsertColumn(_hSelf, 0, &lvColumn); + + ListView_SetItemCountEx(_hSelf, 50, LVSICF_NOSCROLL); + ListView_SetImageList(_hSelf, _hImaLst, LVSIL_SMALL); + + ListView_SetItemState(_hSelf, 0, LVIS_SELECTED|LVIS_FOCUSED, LVIS_SELECTED|LVIS_FOCUSED); + //ListView_SetBkColor(_hSelf, lightYellow); +} + +void VerticalFileSwitcherListView::destroy() +{ + ::DestroyWindow(_hSelf); + _hSelf = NULL; +} + +LRESULT VerticalFileSwitcherListView::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) +{ + return ::CallWindowProc(_defaultProc, hwnd, Message, wParam, lParam); +} + +void VerticalFileSwitcherListView::initList() +{ + ::SendMessage(::GetParent(_hParent), WM_GETTASKLISTINFO, (WPARAM)&_taskListInfo, 0); + for (size_t i = 0 ; i < _taskListInfo._tlfsLst.size() ; i++) + { + TaskLstFnStatus & fileNameStatus = _taskListInfo._tlfsLst[i]; + + LVITEM item; + item.mask = LVIF_TEXT | LVIF_IMAGE; + + item.pszText = (TCHAR *)::PathFindFileName(fileNameStatus._fn.c_str()); + item.iItem = i; + item.iSubItem = 0; + item.iImage = fileNameStatus._status; + ListView_InsertItem(_hSelf, &item); + } +} diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h new file mode 100644 index 00000000..0bcd95b4 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcherListView.h @@ -0,0 +1,46 @@ +//this file is part of notepad++ +//Copyright (C)2011 Don HO +// +//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. +// +//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 VERTICALFILESWITCHERLISTVIEW_H +#define VERTICALFILESWITCHERLISTVIEW_H + +#include "window.h" +#include "TaskListDlg.h" + +class VerticalFileSwitcherListView : public Window +{ +public: + VerticalFileSwitcherListView() : Window() {}; + + virtual ~VerticalFileSwitcherListView() {}; + virtual void init(HINSTANCE hInst, HWND parent, HIMAGELIST hImaLst); + virtual void destroy(); + void initList(); + +protected: + TaskListInfo _taskListInfo; + HIMAGELIST _hImaLst; + WNDPROC _defaultProc; + LRESULT runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam); + + static LRESULT CALLBACK staticProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam) { + return (((VerticalFileSwitcherListView *)(::GetWindowLongPtr(hwnd, GWL_USERDATA)))->runProc(hwnd, Message, wParam, lParam)); + }; +}; + + +#endif // VERTICALFILESWITCHERLISTVIEW_H diff --git a/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher_rc.h b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher_rc.h new file mode 100644 index 00000000..816040e0 --- /dev/null +++ b/PowerEditor/src/WinControls/VerticalFileSwitcher/VerticalFileSwitcher_rc.h @@ -0,0 +1,25 @@ +//this file is part of notepad++ +//Copyright (C)2011 Don HO +// +//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. +// +//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 VERTICALFILESWITCHER_RC_H +#define VERTICALFILESWITCHER_RC_H + +#define IDD_FILESWITCHER_PANEL 3000 +#define IDC_LIST_FILESWITCHER (IDD_FILESWITCHER_PANEL + 1) + +#endif // VERTICALFILESWITCHER_RC_H + diff --git a/PowerEditor/src/menuCmdID.h b/PowerEditor/src/menuCmdID.h index 80d4a2d7..2de283f6 100644 --- a/PowerEditor/src/menuCmdID.h +++ b/PowerEditor/src/menuCmdID.h @@ -169,6 +169,7 @@ #define IDM_SEARCH_SETANDFINDPREV (IDM_SEARCH + 49) #define IDM_SEARCH_INVERSEMARKS (IDM_SEARCH + 50) #define IDM_SEARCH_DELETEUNMARKEDLINES (IDM_SEARCH + 51) + #define IDM_SEARCH_FINDCHARINRANGE (IDM_SEARCH + 52) #define IDM_VIEW (IDM + 4000) //#define IDM_VIEW_TOOLBAR_HIDE (IDM_VIEW + 1) @@ -231,7 +232,7 @@ #define IDM_VIEW_FOLD_7 (IDM_VIEW_FOLD + 7) #define IDM_VIEW_FOLD_8 (IDM_VIEW_FOLD + 8) - #define IDM_VIEW_UNFOLD (IDM_VIEW + 60) + #define IDM_VIEW_UNFOLD (IDM_VIEW + 60) #define IDM_VIEW_UNFOLD_1 (IDM_VIEW_UNFOLD + 1) #define IDM_VIEW_UNFOLD_2 (IDM_VIEW_UNFOLD + 2) #define IDM_VIEW_UNFOLD_3 (IDM_VIEW_UNFOLD + 3) @@ -240,7 +241,9 @@ #define IDM_VIEW_UNFOLD_6 (IDM_VIEW_UNFOLD + 6) #define IDM_VIEW_UNFOLD_7 (IDM_VIEW_UNFOLD + 7) #define IDM_VIEW_UNFOLD_8 (IDM_VIEW_UNFOLD + 8) - + + #define IDM_VIEW_FILESWITCHER_PANEL (IDM_VIEW + 70) + #define IDM_VIEW_GOTO_ANOTHER_VIEW 10001 #define IDM_VIEW_CLONE_TO_ANOTHER_VIEW 10002 #define IDM_VIEW_GOTO_NEW_INSTANCE 10003 diff --git a/PowerEditor/src/resource.h b/PowerEditor/src/resource.h index c5a9a68c..d43309b6 100644 --- a/PowerEditor/src/resource.h +++ b/PowerEditor/src/resource.h @@ -292,6 +292,15 @@ //See ansiCharPanel_rc.h //#define IDD_ANSIASCII_PANEL 2700 +//See clipboardHistoryPanel_rc.h +//#define IDD_CLIPBOARDHISTORY_PANEL 2800 + +//See findCharsInRange_rc.h +//#define IDD_FINDCHARACTERS 2900 + +//See VerticalFileSwitcher_rc.h +//#define IDC_LIST_FILESWITCHER 3000 + // See regExtDlg.h //#define IDD_REGEXT 4000 diff --git a/PowerEditor/visual.net/notepadPlus.vcproj b/PowerEditor/visual.net/notepadPlus.vcproj index abd7f158..db28983d 100644 --- a/PowerEditor/visual.net/notepadPlus.vcproj +++ b/PowerEditor/visual.net/notepadPlus.vcproj @@ -133,7 +133,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" + 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" PreprocessorDefinitions="WIN32;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL" MinimalRebuild="true" ExceptionHandling="2" @@ -228,7 +228,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" + 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" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL" GeneratePreprocessedFile="0" StringPooling="true" @@ -325,7 +325,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" + 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\FindCharsInRange;..\src\WinControls\ClipboardHistory" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL" StringPooling="true" ExceptionHandling="2" @@ -421,7 +421,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" + 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\FindCharsInRange" PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USE_64BIT_TIME_T;TIXML_USE_STL;TIXMLA_USE_STL" GeneratePreprocessedFile="0" StringPooling="true" @@ -571,6 +571,10 @@ RelativePath="..\src\WinControls\OpenSaveFileDialog\FileDialog.cpp" > + + @@ -787,6 +791,14 @@ RelativePath="..\src\Utf8_16.cpp" > + + + + @@ -945,6 +957,10 @@ RelativePath="..\src\icons\find_on.ico" > + + @@ -1317,6 +1333,10 @@ RelativePath="..\src\icons\userDefineDlg_on.ico" > + + @@ -1466,6 +1486,10 @@ RelativePath="..\src\MISC\FileNameStringSplitter.h" > + + @@ -1694,6 +1718,18 @@ RelativePath="..\src\Utf8_16.h" > + + + + + +