[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;
|
||||
}
|
||||
|
||||
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:
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
void VerticalFileSwitcher::activateDoc(int i) const
|
||||
{
|
||||
int view = MAIN_VIEW;
|
||||
|
@ -64,6 +64,10 @@ public:
|
||||
_fileListView.setItemIconStatus(bufferID) ;
|
||||
};
|
||||
|
||||
generic_string getFullFilePath(size_t i) const {
|
||||
return _fileListView.getFullFilePath(i);
|
||||
};
|
||||
|
||||
protected:
|
||||
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 ;
|
||||
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.mask = LVCF_WIDTH;
|
||||
@ -119,6 +119,7 @@ int VerticalFileSwitcherListView::newItem(int bufferID, int iView)
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
void VerticalFileSwitcherListView::setItemIconStatus(int bufferID)
|
||||
{
|
||||
int i = find(bufferID, MAIN_VIEW);
|
||||
|
@ -38,6 +38,11 @@ public:
|
||||
int closeItem(int bufferID, int iView);
|
||||
void activateItem(int bufferID, int iView);
|
||||
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:
|
||||
TaskListInfo _taskListInfo;
|
||||
|
Loading…
Reference in New Issue
Block a user