mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-23 05:45:00 +02:00
Add reduce mode in Find/Replace dialog
Add a button on the bottom-right corner of Find/Replace dialog to switch between collapsed & complete mode. Fix #11780, close #11937
This commit is contained in:
parent
bbf3adb9bb
commit
f85a9c45e9
@ -46,7 +46,7 @@ void Notepad_plus::macroPlayback(Macro macro)
|
||||
for (Macro::iterator step = macro.begin(); step != macro.end(); ++step)
|
||||
{
|
||||
if (step->isScintillaMacro())
|
||||
step->PlayBack(this->_pPublicInterface, _pEditView);
|
||||
step->PlayBack(_pPublicInterface, _pEditView);
|
||||
else
|
||||
_findReplaceDlg.execSavedCommand(step->_message, step->_lParameter, step->_sParameter);
|
||||
}
|
||||
|
@ -4848,6 +4848,10 @@ void NppParameters::feedGUIParameters(TiXmlNode *node)
|
||||
{
|
||||
_nppGUI._findWindowPos = oldRect;
|
||||
}
|
||||
|
||||
const TCHAR* val = element->Attribute(TEXT("isLessModeOn"));
|
||||
if (val)
|
||||
_nppGUI._findWindowLessMode = (lstrcmp(val, TEXT("yes")) == 0);
|
||||
}
|
||||
|
||||
else if (!lstrcmp(nm, TEXT("FinderConfig")))
|
||||
@ -6324,6 +6328,7 @@ void NppParameters::createXmlTreeFromGUIParams()
|
||||
GUIConfigElement->SetAttribute(TEXT("top"), _nppGUI._findWindowPos.top);
|
||||
GUIConfigElement->SetAttribute(TEXT("right"), _nppGUI._findWindowPos.right);
|
||||
GUIConfigElement->SetAttribute(TEXT("bottom"), _nppGUI._findWindowPos.bottom);
|
||||
GUIConfigElement->SetAttribute(TEXT("isLessModeOn"), _nppGUI._findWindowLessMode ? TEXT("yes") : TEXT("no"));
|
||||
}
|
||||
|
||||
// <GUIConfig name="FinderConfig" wrappedLines="no" purgeBeforeEverySearch="no" showOnlyOneEntryPerFoundLine="yes"/>
|
||||
|
@ -769,6 +769,7 @@ struct NppGUI final
|
||||
RECT _appPos = {};
|
||||
|
||||
RECT _findWindowPos = {};
|
||||
bool _findWindowLessMode = false;
|
||||
|
||||
bool _isMaximized = false;
|
||||
bool _isMinimizedToTray = false;
|
||||
|
@ -30,7 +30,7 @@ void DocTabView::addBuffer(BufferID buffer)
|
||||
{
|
||||
if (buffer == BUFFER_INVALID) //valid only
|
||||
return;
|
||||
if (this->getIndexByBuffer(buffer) != -1) //no duplicates
|
||||
if (getIndexByBuffer(buffer) != -1) //no duplicates
|
||||
return;
|
||||
Buffer * buf = MainFileManager.getBufferByID(buffer);
|
||||
TCITEM tie;
|
||||
|
@ -259,6 +259,9 @@ FindReplaceDlg::~FindReplaceDlg()
|
||||
if (_hLargerBolderFont)
|
||||
::DeleteObject(_hLargerBolderFont);
|
||||
|
||||
if (_hCourrierNewFont)
|
||||
::DeleteObject(_hCourrierNewFont);
|
||||
|
||||
delete[] _uniFileName;
|
||||
}
|
||||
|
||||
@ -272,12 +275,13 @@ void FindReplaceDlg::create(int dialogID, bool isRTL, bool msgDestParent)
|
||||
_statusBar.init(GetModuleHandle(NULL), _hSelf, 0);
|
||||
_statusBar.display();
|
||||
|
||||
DPIManager& dpiManager = NppParameters::getInstance()._dpiManager;
|
||||
|
||||
RECT rect;
|
||||
//::GetWindowRect(_hSelf, &rect);
|
||||
getClientRect(rect);
|
||||
_tab.init(_hInst, _hSelf, false, true);
|
||||
NppDarkMode::subclassTabControl(_tab.getHSelf());
|
||||
int tabDpiDynamicalHeight = NppParameters::getInstance()._dpiManager.scaleY(13);
|
||||
int tabDpiDynamicalHeight = dpiManager.scaleY(13);
|
||||
_tab.setFont(TEXT("Tahoma"), tabDpiDynamicalHeight);
|
||||
|
||||
const TCHAR *find = TEXT("Find");
|
||||
@ -298,12 +302,18 @@ void FindReplaceDlg::create(int dialogID, bool isRTL, bool msgDestParent)
|
||||
_initialClientWidth = rect.right - rect.left;
|
||||
|
||||
//fill min dialog size info
|
||||
this->getWindowRect(_initialWindowRect);
|
||||
getWindowRect(_initialWindowRect);
|
||||
_initialWindowRect.right = _initialWindowRect.right - _initialWindowRect.left;
|
||||
_initialWindowRect.left = 0;
|
||||
_initialWindowRect.bottom = _initialWindowRect.bottom - _initialWindowRect.top;
|
||||
_initialWindowRect.top = 0;
|
||||
|
||||
RECT dlgRc = {};
|
||||
getWindowRect(dlgRc);
|
||||
|
||||
RECT countRc = {};
|
||||
::GetWindowRect(::GetDlgItem(_hSelf, IDCCOUNTALL), &countRc);
|
||||
|
||||
NppParameters& nppParam = NppParameters::getInstance();
|
||||
NppGUI& nppGUI = nppParam.getNppGUI();
|
||||
if (nppGUI._findWindowPos.bottom - nppGUI._findWindowPos.top != 0) // check height against 0 as a test of valid data from config
|
||||
@ -315,6 +325,16 @@ void FindReplaceDlg::create(int dialogID, bool isRTL, bool msgDestParent)
|
||||
{
|
||||
goToCenter();
|
||||
}
|
||||
|
||||
_lesssModeHeight = countRc.bottom - dlgRc.top + _statusBar.getHeight() + dpiManager.scaleY(10);
|
||||
|
||||
if (nppGUI._findWindowLessMode)
|
||||
{
|
||||
// reverse the value of _findWindowLessMode because the value will be inversed again in IDD_RESIZE_TOGGLE_BUTTON
|
||||
nppGUI._findWindowLessMode = false;
|
||||
|
||||
::SendMessage(_hSelf, WM_COMMAND, IDD_RESIZE_TOGGLE_BUTTON, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void FindReplaceDlg::fillFindHistory()
|
||||
@ -1090,7 +1110,7 @@ void FindReplaceDlg::resizeDialogElements(LONG newWidth)
|
||||
|
||||
IDD_FINDINFILES_BROWSE_BUTTON, IDCMARKALL, IDC_CLEAR_ALL, IDCCOUNTALL, IDC_FINDALL_OPENEDFILES, IDC_FINDALL_CURRENTFILE,
|
||||
IDREPLACE, IDREPLACEALL, IDD_FINDREPLACE_SWAP_BUTTON, IDC_REPLACE_OPENEDFILES, IDD_FINDINFILES_FIND_BUTTON, IDD_FINDINFILES_REPLACEINFILES, IDOK, IDCANCEL,
|
||||
IDC_FINDPREV, IDC_FINDNEXT, IDC_2_BUTTONS_MODE, IDC_COPY_MARKED_TEXT, IDD_FINDINFILES_REPLACEINPROJECTS
|
||||
IDC_FINDPREV, IDC_FINDNEXT, IDC_2_BUTTONS_MODE, IDC_COPY_MARKED_TEXT, IDD_FINDINFILES_REPLACEINPROJECTS, IDD_RESIZE_TOGGLE_BUTTON
|
||||
};
|
||||
|
||||
const UINT flags = SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOACTIVATE | SWP_NOCOPYBITS;
|
||||
@ -1127,6 +1147,7 @@ void FindReplaceDlg::resizeDialogElements(LONG newWidth)
|
||||
}
|
||||
|
||||
auto additionalWindowHwndsToResize = { _tab.getHSelf() , _statusBar.getHSelf() };
|
||||
|
||||
for (HWND resizeHwnd : additionalWindowHwndsToResize)
|
||||
{
|
||||
::GetClientRect(resizeHwnd, &rc);
|
||||
@ -1142,10 +1163,12 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
{
|
||||
case WM_GETMINMAXINFO:
|
||||
{
|
||||
bool isLessModeOn = NppParameters::getInstance().getNppGUI()._findWindowLessMode;
|
||||
MINMAXINFO* mmi = reinterpret_cast<MINMAXINFO*>(lParam);
|
||||
mmi->ptMinTrackSize.y = _initialWindowRect.bottom;
|
||||
mmi->ptMinTrackSize.y = isLessModeOn ? _lesssModeHeight : _initialWindowRect.bottom;
|
||||
mmi->ptMinTrackSize.x = _initialWindowRect.right;
|
||||
mmi->ptMaxTrackSize.y = _initialWindowRect.bottom;
|
||||
mmi->ptMaxTrackSize.y = isLessModeOn ? _lesssModeHeight : _initialWindowRect.bottom;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1253,6 +1276,8 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
SendMessage(hDirCombo, WM_SETFONT, (WPARAM)_hMonospaceFont, MAKELPARAM(true, 0));
|
||||
}
|
||||
|
||||
DPIManager& dpiManager = NppParameters::getInstance()._dpiManager;
|
||||
|
||||
// Change ComboBox height to accomodate High-DPI settings.
|
||||
// ComboBoxes are scaled using the font used in them, however this results in weird optics
|
||||
// on scaling > 200% (192 DPI). Using this method we accomodate these scalings way better
|
||||
@ -1262,7 +1287,7 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
LOGFONT lf = {};
|
||||
HFONT font = reinterpret_cast<HFONT>(SendMessage(hComboBox, WM_GETFONT, 0, 0));
|
||||
::GetObject(font, sizeof(lf), &lf);
|
||||
lf.lfHeight = (NppParameters::getInstance()._dpiManager.scaleY(16) - 5) * -1;
|
||||
lf.lfHeight = (dpiManager.scaleY(16) - 5) * -1;
|
||||
SendMessage(hComboBox, WM_SETFONT, (WPARAM)CreateFontIndirect(&lf), MAKELPARAM(true, 0));
|
||||
}
|
||||
|
||||
@ -1292,6 +1317,21 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
_findClosePos.left = p.x;
|
||||
_findClosePos.top = p.y + 10;
|
||||
|
||||
::GetWindowRect(::GetDlgItem(_hSelf, IDD_RESIZE_TOGGLE_BUTTON), &arc);
|
||||
long resizeButtonW = arc.right - arc.left;
|
||||
long resizeButtonH = arc.bottom - arc.top;
|
||||
_collapseButtonPos.bottom = _uncollapseButtonPos.bottom = resizeButtonW;
|
||||
_collapseButtonPos.right = _uncollapseButtonPos.right = resizeButtonH;
|
||||
|
||||
::GetWindowRect(::GetDlgItem(_hSelf, IDC_TRANSPARENT_GRPBOX), &arc);
|
||||
p = getTopPoint(::GetDlgItem(_hSelf, IDC_TRANSPARENT_GRPBOX), !_isRTL);
|
||||
_collapseButtonPos.left = p.x + (arc.right - arc.left) + dpiManager.scaleX(10);
|
||||
_collapseButtonPos.top = p.y + (arc.bottom - arc.top) - resizeButtonH + dpiManager.scaleX(10);
|
||||
::GetWindowRect(::GetDlgItem(_hSelf, IDCCOUNTALL), &arc);
|
||||
p = getTopPoint(::GetDlgItem(_hSelf, IDCCOUNTALL), !_isRTL);
|
||||
_uncollapseButtonPos.left = p.x + (arc.right - arc.left) + dpiManager.scaleX(8);
|
||||
_uncollapseButtonPos.top = p.y + dpiManager.scaleY(2);
|
||||
|
||||
// in selection check
|
||||
RECT checkRect;
|
||||
::GetWindowRect(::GetDlgItem(_hSelf, IDC_IN_SELECTION_CHECK), &checkRect);
|
||||
@ -1314,10 +1354,8 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
_countInSelFramePos.left = _replaceInSelFramePos.left = p.x;
|
||||
_countInSelFramePos.top = _replaceInSelFramePos.top = p.y;
|
||||
|
||||
DPIManager* pDpiMgr = &(NppParameters::getInstance()._dpiManager);
|
||||
|
||||
_countInSelFramePos.top = countP.y - pDpiMgr->scaleY(10);
|
||||
_countInSelFramePos.bottom = pDpiMgr->scaleY(80 - 3);
|
||||
_countInSelFramePos.top = countP.y - dpiManager.scaleY(10);
|
||||
_countInSelFramePos.bottom = dpiManager.scaleY(80 - 3);
|
||||
|
||||
NativeLangSpeaker *pNativeSpeaker = (NppParameters::getInstance()).getNativeLangSpeaker();
|
||||
|
||||
@ -1333,12 +1371,16 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
::SetWindowTextW(::GetDlgItem(_hSelf, IDC_FINDPREV), TEXT("▲"));
|
||||
::SetWindowTextW(::GetDlgItem(_hSelf, IDC_FINDNEXT), TEXT("▼ Find Next"));
|
||||
::SetWindowTextW(::GetDlgItem(_hSelf, IDD_FINDREPLACE_SWAP_BUTTON), TEXT("⇅"));
|
||||
::SetWindowTextW(::GetDlgItem(_hSelf, IDD_RESIZE_TOGGLE_BUTTON), TEXT("˄"));
|
||||
|
||||
// "⇅" enlargement
|
||||
_hLargerBolderFont = createFont(TEXT("Courier New"), 14, true, _hSelf);
|
||||
|
||||
SendMessage(::GetDlgItem(_hSelf, IDD_FINDREPLACE_SWAP_BUTTON), WM_SETFONT, (WPARAM)_hLargerBolderFont, MAKELPARAM(true, 0));
|
||||
|
||||
// Make "˄" & "˅" look better
|
||||
_hCourrierNewFont = createFont(TEXT("Courier New"), 12, false, _hSelf);
|
||||
SendMessage(::GetDlgItem(_hSelf, IDD_RESIZE_TOGGLE_BUTTON), WM_SETFONT, (WPARAM)_hCourrierNewFont, MAKELPARAM(true, 0));
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@ -2140,6 +2182,42 @@ intptr_t CALLBACK FindReplaceDlg::run_dlgProc(UINT message, WPARAM wParam, LPARA
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case IDD_RESIZE_TOGGLE_BUTTON:
|
||||
{
|
||||
RECT rc = { 0, 0, 0, 0};
|
||||
getWindowRect(rc);
|
||||
int w = rc.right - rc.left;
|
||||
POINT p;
|
||||
p.x = rc.left;
|
||||
p.y = rc.top;
|
||||
bool& isLessModeOn = NppParameters::getInstance().getNppGUI()._findWindowLessMode;
|
||||
isLessModeOn = !isLessModeOn;
|
||||
long dlgH = isLessModeOn ? _lesssModeHeight : _initialWindowRect.bottom;
|
||||
RECT& buttonRc = isLessModeOn ? _uncollapseButtonPos : _collapseButtonPos;
|
||||
|
||||
// For unknown reason, the original default width doesn't make the status bar moveed
|
||||
// Here we use a dirty workaround: increase 1 pixel so WM_SIZE message will be triggered
|
||||
if (w == _initialWindowRect.right)
|
||||
w += 1;
|
||||
|
||||
::MoveWindow(_hSelf, p.x, p.y, w, dlgH, FALSE); // WM_SIZE message to call resizeDialogElements - status bar will be reposition correctly.
|
||||
::MoveWindow(::GetDlgItem(_hSelf, IDD_RESIZE_TOGGLE_BUTTON), buttonRc.left + _deltaWidth, buttonRc.top, buttonRc.right, buttonRc.bottom, TRUE);
|
||||
|
||||
// Reposition the status bar
|
||||
const UINT flags = SWP_NOMOVE | SWP_NOZORDER | SWP_NOOWNERZORDER | SWP_NOCOPYBITS | SWP_DRAWFRAME;
|
||||
::GetClientRect(_statusBar.getHSelf(), &rc);
|
||||
::SetWindowPos(_statusBar.getHSelf(), 0, 0, 0, rc.right + _deltaWidth, rc.bottom, flags);
|
||||
|
||||
DIALOG_TYPE dlgT = getCurrentStatus();
|
||||
|
||||
hideOrShowCtrl4reduceOrNormalMode(dlgT);
|
||||
|
||||
::SetDlgItemText(_hSelf, IDD_RESIZE_TOGGLE_BUTTON, isLessModeOn ? L"˅" : L"˄");
|
||||
|
||||
redraw();
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
default :
|
||||
break;
|
||||
}
|
||||
@ -3228,6 +3306,8 @@ void FindReplaceDlg::enableReplaceFunc(bool isEnable)
|
||||
::SetWindowText(_hSelf, label);
|
||||
|
||||
setDefaultButton(IDOK);
|
||||
|
||||
hideOrShowCtrl4reduceOrNormalMode(_currentStatus);
|
||||
}
|
||||
|
||||
void FindReplaceDlg::enableMarkAllControls(bool isEnable)
|
||||
@ -3952,6 +4032,36 @@ LRESULT FAR PASCAL FindReplaceDlg::comboEditProc(HWND hwnd, UINT message, WPARAM
|
||||
return CallWindowProc((WNDPROC)originalComboEditProc, hwnd, message, wParam, lParam);
|
||||
}
|
||||
|
||||
void FindReplaceDlg::hideOrShowCtrl4reduceOrNormalMode(DIALOG_TYPE dlgT)
|
||||
{
|
||||
bool isLessModeOn = NppParameters::getInstance().getNppGUI()._findWindowLessMode;
|
||||
if (dlgT == FIND_DLG)
|
||||
{
|
||||
for (int id : _reduce2hide_find)
|
||||
::ShowWindow(::GetDlgItem(_hSelf, id), isLessModeOn ? SW_HIDE : SW_SHOW);
|
||||
}
|
||||
else if (dlgT == REPLACE_DLG)
|
||||
{
|
||||
for (int id : _reduce2hide_findReplace)
|
||||
::ShowWindow(::GetDlgItem(_hSelf, id), isLessModeOn ? SW_HIDE : SW_SHOW);
|
||||
}
|
||||
else if (dlgT == FINDINFILES_DLG)
|
||||
{
|
||||
for (int id : _reduce2hide_fif)
|
||||
::ShowWindow(::GetDlgItem(_hSelf, id), isLessModeOn ? SW_HIDE : SW_SHOW);
|
||||
}
|
||||
else if (dlgT == FINDINPROJECTS_DLG)
|
||||
{
|
||||
for (int id : _reduce2hide_fip)
|
||||
::ShowWindow(::GetDlgItem(_hSelf, id), isLessModeOn ? SW_HIDE : SW_SHOW);
|
||||
}
|
||||
else // MARK_DLG
|
||||
{
|
||||
for (int id : _reduce2hide_mark)
|
||||
::ShowWindow(::GetDlgItem(_hSelf, id), isLessModeOn ? SW_HIDE : SW_SHOW);
|
||||
}
|
||||
}
|
||||
|
||||
void FindReplaceDlg::enableFindInFilesFunc()
|
||||
{
|
||||
enableFindInFilesControls(true, false);
|
||||
@ -3963,6 +4073,7 @@ void FindReplaceDlg::enableFindInFilesFunc()
|
||||
::SetWindowText(_hSelf, label);
|
||||
setDefaultButton(IDD_FINDINFILES_FIND_BUTTON);
|
||||
enableFindDlgItem (IDD_FINDINFILES_FIND_BUTTON, true);
|
||||
hideOrShowCtrl4reduceOrNormalMode(_currentStatus);
|
||||
}
|
||||
|
||||
void FindReplaceDlg::enableFindInProjectsFunc()
|
||||
@ -3978,6 +4089,7 @@ void FindReplaceDlg::enableFindInProjectsFunc()
|
||||
bool enable = _options._isProjectPanel_1 || _options._isProjectPanel_2 || _options._isProjectPanel_3;
|
||||
enableFindDlgItem (IDD_FINDINFILES_FIND_BUTTON, enable);
|
||||
enableFindDlgItem (IDD_FINDINFILES_REPLACEINPROJECTS, enable);
|
||||
hideOrShowCtrl4reduceOrNormalMode(_currentStatus);
|
||||
}
|
||||
|
||||
void FindReplaceDlg::enableMarkFunc()
|
||||
@ -4014,7 +4126,10 @@ void FindReplaceDlg::enableMarkFunc()
|
||||
_tab.getCurrentTitle(label, MAX_PATH);
|
||||
::SetWindowText(_hSelf, label);
|
||||
setDefaultButton(IDCMARKALL);
|
||||
|
||||
hideOrShowCtrl4reduceOrNormalMode(_currentStatus);
|
||||
}
|
||||
|
||||
void FindReplaceDlg::combo2ExtendedMode(int comboID)
|
||||
{
|
||||
HWND hFindCombo = ::GetDlgItem(_hSelf, comboID);
|
||||
|
@ -378,11 +378,22 @@ private :
|
||||
RECT _initialWindowRect = {};
|
||||
LONG _deltaWidth = 0;
|
||||
LONG _initialClientWidth = 0;
|
||||
LONG _lesssModeHeight = 0;
|
||||
|
||||
DIALOG_TYPE _currentStatus = DIALOG_TYPE::FIND_DLG;
|
||||
RECT _findClosePos, _replaceClosePos, _findInFilesClosePos, _markClosePos;
|
||||
RECT _countInSelFramePos, _replaceInSelFramePos;
|
||||
RECT _countInSelCheckPos, _replaceInSelCheckPos;
|
||||
RECT _findClosePos = {};
|
||||
RECT _replaceClosePos = {};
|
||||
RECT _findInFilesClosePos = {};
|
||||
RECT _markClosePos = {};
|
||||
|
||||
RECT _countInSelFramePos = {};
|
||||
RECT _replaceInSelFramePos = {};
|
||||
|
||||
RECT _countInSelCheckPos = {};
|
||||
RECT _replaceInSelCheckPos = {};
|
||||
|
||||
RECT _collapseButtonPos = {};
|
||||
RECT _uncollapseButtonPos = {};
|
||||
|
||||
ScintillaEditView **_ppEditView = nullptr;
|
||||
Finder *_pFinder = nullptr;
|
||||
@ -414,9 +425,16 @@ private :
|
||||
|
||||
HFONT _hMonospaceFont = nullptr;
|
||||
HFONT _hLargerBolderFont = nullptr;
|
||||
HFONT _hCourrierNewFont = nullptr;
|
||||
|
||||
std::map<int, bool> _controlEnableMap;
|
||||
|
||||
std::vector<int> _reduce2hide_find = { IDC_IN_SELECTION_CHECK, IDC_REPLACEINSELECTION, IDC_FINDALL_CURRENTFILE };
|
||||
std::vector<int> _reduce2hide_findReplace = { IDC_IN_SELECTION_CHECK, IDC_REPLACEINSELECTION, IDREPLACEALL };
|
||||
std::vector<int> _reduce2hide_fif = { IDD_FINDINFILES_FILTERS_STATIC, IDD_FINDINFILES_FILTERS_COMBO, IDCANCEL };
|
||||
std::vector<int> _reduce2hide_fip = { IDD_FINDINFILES_FILTERS_STATIC, IDD_FINDINFILES_FILTERS_COMBO, IDCANCEL };
|
||||
std::vector<int> _reduce2hide_mark = { IDC_MARKLINE_CHECK, IDC_PURGE_CHECK, IDC_IN_SELECTION_CHECK, IDC_COPY_MARKED_TEXT };
|
||||
|
||||
void enableFindDlgItem(int dlgItemID, bool isEnable = true);
|
||||
void showFindDlgItem(int dlgItemID, bool isShow = true);
|
||||
|
||||
@ -426,6 +444,7 @@ private :
|
||||
void enableFindInProjectsFunc();
|
||||
void enableMarkAllControls(bool isEnable);
|
||||
void enableMarkFunc();
|
||||
void hideOrShowCtrl4reduceOrNormalMode(DIALOG_TYPE dlgT);
|
||||
|
||||
void setDefaultButton(int nID) {
|
||||
SendMessage(_hSelf, DM_SETDEFID, nID, 0L);
|
||||
@ -438,7 +457,7 @@ private :
|
||||
};
|
||||
|
||||
FindStatus getFindStatus() {
|
||||
return this->_statusbarFindStatus;
|
||||
return _statusbarFindStatus;
|
||||
}
|
||||
|
||||
void updateCombos();
|
||||
|
@ -14,7 +14,6 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#include <windows.h>
|
||||
#include "FindReplaceDlg_rc.h"
|
||||
|
||||
@ -34,18 +33,12 @@ BEGIN
|
||||
RTEXT "Dir&ectory :",IDD_FINDINFILES_DIR_STATIC,7,76,41,8
|
||||
COMBOBOX IDD_FINDINFILES_DIR_COMBO,50,74,196,150,CBS_DROPDOWN | CBS_AUTOHSCROLL | WS_TABSTOP
|
||||
PUSHBUTTON "...",IDD_FINDINFILES_BROWSE_BUTTON,248,73,16,14
|
||||
CONTROL "Follow current doc.",IDD_FINDINFILES_FOLDERFOLLOWSDOC_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,73,94,15
|
||||
CONTROL "In all su&b-folders",IDD_FINDINFILES_RECURSIVE_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,87,94,15
|
||||
CONTROL "In &hidden folders",IDD_FINDINFILES_INHIDDENDIR_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,101,94,15
|
||||
CONTROL "Project Panel 1",IDD_FINDINFILES_PROJECT1_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,73,94,15
|
||||
CONTROL "Project Panel 2",IDD_FINDINFILES_PROJECT2_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,87,94,15
|
||||
CONTROL "Project Panel 3",IDD_FINDINFILES_PROJECT3_CHECK,
|
||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,101,94,15
|
||||
CONTROL "Follow current doc.",IDD_FINDINFILES_FOLDERFOLLOWSDOC_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,73,94,15
|
||||
CONTROL "In all su&b-folders",IDD_FINDINFILES_RECURSIVE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,87,94,15
|
||||
CONTROL "In &hidden folders",IDD_FINDINFILES_INHIDDENDIR_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,101,94,15
|
||||
CONTROL "Project Panel 1",IDD_FINDINFILES_PROJECT1_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,73,94,15
|
||||
CONTROL "Project Panel 2",IDD_FINDINFILES_PROJECT2_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,87,94,15
|
||||
CONTROL "Project Panel 3",IDD_FINDINFILES_PROJECT3_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,270,101,94,15
|
||||
CONTROL "Book&mark line",IDC_MARKLINE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,52,140,15
|
||||
CONTROL "Purge for each search",IDC_PURGE_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,64,140,15
|
||||
PUSHBUTTON "Mark All",IDCMARKALL,268,20,91,14
|
||||
@ -58,8 +51,7 @@ BEGIN
|
||||
CONTROL "Wra&p around",IDWRAP,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,112,140,15
|
||||
GROUPBOX "Search Mode",IDC_MODE_STATIC,6,131,159,48
|
||||
CONTROL "&Normal",IDNORMAL,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,143,126,10
|
||||
CONTROL "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED,
|
||||
"Button",BS_AUTORADIOBUTTON,12,155,145,10
|
||||
CONTROL "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED,"Button",BS_AUTORADIOBUTTON,12,155,145,10
|
||||
CONTROL "Re&gular expression",IDREGEXP,"Button",BS_AUTORADIOBUTTON,12,167,78,10
|
||||
CONTROL "&. matches newline",IDREDOTMATCHNL,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,93,167,68,9
|
||||
PUSHBUTTON "", IDC_FINDPREV, 268, 20, 18, 14, WS_GROUP | BS_MULTILINE
|
||||
@ -82,6 +74,7 @@ BEGIN
|
||||
CONTROL "On losing focus",IDC_TRANSPARENT_LOSSFOCUS_RADIO,"Button",BS_AUTORADIOBUTTON | WS_GROUP | WS_TABSTOP,268,143,85,10
|
||||
CONTROL "Always",IDC_TRANSPARENT_ALWAYS_RADIO,"Button",BS_AUTORADIOBUTTON ,268,155,85,10
|
||||
CONTROL "",IDC_PERCENTAGE_SLIDER,"msctls_trackbar32",TBS_BOTH | TBS_NOTICKS | TBS_TRANSPARENTBKGND | NOT WS_VISIBLE | WS_TABSTOP,265,166,85,10
|
||||
PUSHBUTTON "",IDD_RESIZE_TOGGLE_BUTTON,365,171,16,14
|
||||
END
|
||||
|
||||
IDB_INCREMENTAL_BG BITMAP "../icons/incrementalBg.bmp"
|
||||
@ -120,7 +113,6 @@ BEGIN
|
||||
CONTROL "Search only in found lines",IDC_MATCHLINENUM_CHECK_FIFOLDER,"Button",BS_AUTOCHECKBOX | BS_MULTILINE | WS_TABSTOP,12,66,99,16
|
||||
CONTROL "Match &whole word only",IDWHOLEWORD_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,88,140,15
|
||||
CONTROL "Match &case",IDMATCHCASE_FIFOLDER,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,100,140,15
|
||||
|
||||
GROUPBOX "Search Mode",IDC_MODE_STATIC_FIFOLDER,6,131,159,48
|
||||
CONTROL "&Normal",IDNORMAL_FIFOLDER,"Button",BS_AUTORADIOBUTTON | WS_GROUP,12,143,126,10
|
||||
CONTROL "E&xtended (\\n, \\r, \\t, \\0, \\x...)",IDEXTENDED_FIFOLDER, "Button",BS_AUTORADIOBUTTON,12,155,145,10
|
||||
|
@ -70,7 +70,7 @@
|
||||
//#define IDC_FINDINFILES 1637
|
||||
#define IDC_FINDINFILES_LAUNCH 1638
|
||||
#define IDC_GETCURRENTDOCTYPE 1639
|
||||
//#define IDSWITCH 1640
|
||||
#define IDD_RESIZE_TOGGLE_BUTTON 1640
|
||||
#define IDC_FINDALL_CURRENTFILE 1641
|
||||
|
||||
#define IDD_FINDINFILES_DLG 1650
|
||||
|
@ -2179,13 +2179,13 @@ void ScintillaEditView::collapse(int level2Collapse, bool mode)
|
||||
|
||||
void ScintillaEditView::foldCurrentPos(bool mode)
|
||||
{
|
||||
auto currentLine = this->getCurrentLineNumber();
|
||||
auto currentLine = getCurrentLineNumber();
|
||||
fold(currentLine, mode);
|
||||
}
|
||||
|
||||
bool ScintillaEditView::isCurrentLineFolded() const
|
||||
{
|
||||
auto currentLine = this->getCurrentLineNumber();
|
||||
auto currentLine = getCurrentLineNumber();
|
||||
|
||||
intptr_t headerLine;
|
||||
auto level = execute(SCI_GETFOLDLEVEL, currentLine);
|
||||
|
@ -1386,7 +1386,7 @@ void DockingCont::doClose(BOOL closeAll)
|
||||
if (iItemCnt == 0)
|
||||
{
|
||||
// hide dialog first
|
||||
this->doDialog(false);
|
||||
doDialog(false);
|
||||
::SendMessage(_hParent, WM_SIZE, 0, 0);
|
||||
}
|
||||
}
|
||||
@ -1433,7 +1433,7 @@ int DockingCont::hideToolbar(tTbData *pTbData, BOOL hideClient)
|
||||
else
|
||||
{
|
||||
// hide dialog
|
||||
this->doDialog(false);
|
||||
doDialog(false);
|
||||
|
||||
// send message to docking manager for resize
|
||||
if (!_isFloating)
|
||||
@ -1495,7 +1495,7 @@ void DockingCont::viewToolbar(tTbData *pTbData)
|
||||
// show dialog and notify parent to update dialog view
|
||||
if (isVisible() == false)
|
||||
{
|
||||
this->doDialog();
|
||||
doDialog();
|
||||
::SendMessage(_hParent, WM_SIZE, 0, 0);
|
||||
}
|
||||
|
||||
|
@ -601,7 +601,7 @@ void FunctionListPanel::notified(LPNMHDR notification)
|
||||
wcscpy_s(lpttt->szText, _preferenceTipStr.c_str());
|
||||
}
|
||||
}
|
||||
else if (notification->hwndFrom == _treeView.getHSelf() || notification->hwndFrom == this->_treeViewSearchResult.getHSelf())
|
||||
else if (notification->hwndFrom == _treeView.getHSelf() || notification->hwndFrom == _treeViewSearchResult.getHSelf())
|
||||
{
|
||||
const TreeView & treeView = notification->hwndFrom == _treeView.getHSelf()?_treeView:_treeViewSearchResult;
|
||||
switch (notification->code)
|
||||
|
@ -309,7 +309,7 @@ LRESULT SplitterContainer::runProc(UINT message, WPARAM wParam, LPARAM lParam)
|
||||
|
||||
HWND parent = ::GetParent(getHSelf());
|
||||
|
||||
Window* targetWindow = (this->isVertical())
|
||||
Window* targetWindow = (isVertical())
|
||||
? (pt.x < 0 ? _pWin0 : _pWin1)
|
||||
: (pt.y < 0 ? _pWin0 : _pWin1);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user