mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-31 01:34:58 +02:00
[NEW_FEATURE] Add full path file name as tip in file switcher (while hovering on item).
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@787 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
505fba9b79
commit
5aad3ba823
@ -68,6 +68,17 @@ BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPA
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case LVN_GETINFOTIP:
|
||||||
|
{
|
||||||
|
LPNMLVGETINFOTIP pGetInfoTip = (LPNMLVGETINFOTIP)lParam;
|
||||||
|
int i = pGetInfoTip->iItem;
|
||||||
|
if (i == -1)
|
||||||
|
return TRUE;
|
||||||
|
generic_string fn = this->getFullFilePath((size_t)i);
|
||||||
|
lstrcpyn(pGetInfoTip->pszText, fn.c_str(), pGetInfoTip->cchTextMax);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
case LVN_KEYDOWN:
|
case LVN_KEYDOWN:
|
||||||
{
|
{
|
||||||
switch (((LPNMLVKEYDOWN)lParam)->wVKey)
|
switch (((LPNMLVKEYDOWN)lParam)->wVKey)
|
||||||
@ -108,6 +119,7 @@ BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPA
|
|||||||
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void VerticalFileSwitcher::activateDoc(int i) const
|
void VerticalFileSwitcher::activateDoc(int i) const
|
||||||
{
|
{
|
||||||
int view = MAIN_VIEW;
|
int view = MAIN_VIEW;
|
||||||
|
@ -64,6 +64,10 @@ public:
|
|||||||
_fileListView.setItemIconStatus(bufferID) ;
|
_fileListView.setItemIconStatus(bufferID) ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
generic_string getFullFilePath(size_t i) const {
|
||||||
|
return _fileListView.getFullFilePath(i);
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
virtual BOOL CALLBACK VerticalFileSwitcher::run_dlgProc(UINT message, WPARAM wParam, LPARAM lParam);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ void VerticalFileSwitcherListView::init(HINSTANCE hInst, HWND parent, HIMAGELIST
|
|||||||
exStyle |= LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT ;
|
exStyle |= LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT ;
|
||||||
ListView_SetExtendedListViewStyle(_hSelf, exStyle);
|
ListView_SetExtendedListViewStyle(_hSelf, exStyle);
|
||||||
*/
|
*/
|
||||||
ListView_SetExtendedListViewStyle(_hSelf, LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT);
|
ListView_SetExtendedListViewStyle(_hSelf, LVS_EX_FULLROWSELECT | LVS_EX_BORDERSELECT | LVS_EX_INFOTIP);
|
||||||
|
|
||||||
LVCOLUMN lvColumn;
|
LVCOLUMN lvColumn;
|
||||||
lvColumn.mask = LVCF_WIDTH;
|
lvColumn.mask = LVCF_WIDTH;
|
||||||
@ -119,6 +119,7 @@ int VerticalFileSwitcherListView::newItem(int bufferID, int iView)
|
|||||||
}
|
}
|
||||||
return i;
|
return i;
|
||||||
}
|
}
|
||||||
|
|
||||||
void VerticalFileSwitcherListView::setItemIconStatus(int bufferID)
|
void VerticalFileSwitcherListView::setItemIconStatus(int bufferID)
|
||||||
{
|
{
|
||||||
int i = find(bufferID, MAIN_VIEW);
|
int i = find(bufferID, MAIN_VIEW);
|
||||||
|
@ -38,6 +38,11 @@ public:
|
|||||||
int closeItem(int bufferID, int iView);
|
int closeItem(int bufferID, int iView);
|
||||||
void activateItem(int bufferID, int iView);
|
void activateItem(int bufferID, int iView);
|
||||||
void setItemIconStatus(int bufferID);
|
void setItemIconStatus(int bufferID);
|
||||||
|
generic_string getFullFilePath(size_t i) const {
|
||||||
|
if (i < 0 || i > _taskListInfo._tlfsLst.size())
|
||||||
|
return TEXT("");
|
||||||
|
return _taskListInfo._tlfsLst[i]._fn;
|
||||||
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TaskListInfo _taskListInfo;
|
TaskListInfo _taskListInfo;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user