Add the Expand All capacity into Folder as Workspace
This commit is contained in:
parent
fbde7d2188
commit
703a49b323
@ -208,6 +208,7 @@ IDI_FB_ROOTCLOSE BITMAP "icons/fb_root_close.bmp"
|
|||||||
|
|
||||||
IDI_FB_SELECTCURRENTFILE BITMAP "icons/fb_select_current_file.bmp"
|
IDI_FB_SELECTCURRENTFILE BITMAP "icons/fb_select_current_file.bmp"
|
||||||
IDI_FB_FOLDALL BITMAP "icons/fb_fold_all.bmp"
|
IDI_FB_FOLDALL BITMAP "icons/fb_fold_all.bmp"
|
||||||
|
IDI_FB_EXPANDALL BITMAP "icons/fb_expand_all.bmp"
|
||||||
|
|
||||||
IDI_FUNCLIST_ROOT BITMAP "icons/project_file.bmp"
|
IDI_FUNCLIST_ROOT BITMAP "icons/project_file.bmp"
|
||||||
IDI_FUNCLIST_NODE BITMAP "icons/funcList_node.bmp"
|
IDI_FUNCLIST_NODE BITMAP "icons/funcList_node.bmp"
|
||||||
|
@ -55,6 +55,7 @@
|
|||||||
#define FB_RNFILE (WM_USER + 1026)
|
#define FB_RNFILE (WM_USER + 1026)
|
||||||
#define FB_CMD_AIMFILE 1
|
#define FB_CMD_AIMFILE 1
|
||||||
#define FB_CMD_FOLDALL 2
|
#define FB_CMD_FOLDALL 2
|
||||||
|
#define FB_CMD_EXPANDALL 3
|
||||||
|
|
||||||
FileBrowser::~FileBrowser()
|
FileBrowser::~FileBrowser()
|
||||||
{
|
{
|
||||||
@ -110,13 +111,15 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
NppParameters& nppParam = NppParameters::getInstance();
|
NppParameters& nppParam = NppParameters::getInstance();
|
||||||
int style = WS_CHILD | WS_VISIBLE | CCS_ADJUSTABLE | TBSTYLE_AUTOSIZE | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | BTNS_AUTOSIZE | BTNS_SEP | TBSTYLE_TOOLTIPS;
|
int style = WS_CHILD | WS_VISIBLE | CCS_ADJUSTABLE | TBSTYLE_AUTOSIZE | TBSTYLE_FLAT | TBSTYLE_LIST | TBSTYLE_TRANSPARENT | BTNS_AUTOSIZE | BTNS_SEP | TBSTYLE_TOOLTIPS;
|
||||||
_hToolbarMenu = CreateWindowEx(WS_EX_LAYOUTRTL, TOOLBARCLASSNAME, NULL, style, 0, 0, 0, 0, _hSelf, nullptr, _hInst, NULL);
|
_hToolbarMenu = CreateWindowEx(WS_EX_LAYOUTRTL, TOOLBARCLASSNAME, NULL, style, 0, 0, 0, 0, _hSelf, nullptr, _hInst, NULL);
|
||||||
TBBUTTON tbButtons[2];
|
TBBUTTON tbButtons[3];
|
||||||
// Add the bmap image into toolbar's imagelist
|
// Add the bmap image into toolbar's imagelist
|
||||||
TBADDBITMAP addbmp = { _hInst, 0 };
|
TBADDBITMAP addbmp = { _hInst, 0 };
|
||||||
addbmp.nID = IDI_FB_SELECTCURRENTFILE;
|
addbmp.nID = IDI_FB_SELECTCURRENTFILE;
|
||||||
::SendMessage(_hToolbarMenu, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp));
|
::SendMessage(_hToolbarMenu, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp));
|
||||||
addbmp.nID = IDI_FB_FOLDALL;
|
addbmp.nID = IDI_FB_FOLDALL;
|
||||||
::SendMessage(_hToolbarMenu, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp));
|
::SendMessage(_hToolbarMenu, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp));
|
||||||
|
addbmp.nID = IDI_FB_EXPANDALL;
|
||||||
|
::SendMessage(_hToolbarMenu, TB_ADDBITMAP, 1, reinterpret_cast<LPARAM>(&addbmp));
|
||||||
tbButtons[0].idCommand = FB_CMD_AIMFILE;
|
tbButtons[0].idCommand = FB_CMD_AIMFILE;
|
||||||
tbButtons[0].iBitmap = 0;
|
tbButtons[0].iBitmap = 0;
|
||||||
tbButtons[0].fsState = TBSTATE_ENABLED;
|
tbButtons[0].fsState = TBSTATE_ENABLED;
|
||||||
@ -127,6 +130,11 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
tbButtons[1].fsState = TBSTATE_ENABLED;
|
tbButtons[1].fsState = TBSTATE_ENABLED;
|
||||||
tbButtons[1].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE;
|
tbButtons[1].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE;
|
||||||
tbButtons[1].iString = reinterpret_cast<INT_PTR>(TEXT(""));
|
tbButtons[1].iString = reinterpret_cast<INT_PTR>(TEXT(""));
|
||||||
|
tbButtons[2].idCommand = FB_CMD_EXPANDALL;
|
||||||
|
tbButtons[2].iBitmap = 2;
|
||||||
|
tbButtons[2].fsState = TBSTATE_ENABLED;
|
||||||
|
tbButtons[2].fsStyle = BTNS_BUTTON | BTNS_AUTOSIZE;
|
||||||
|
tbButtons[2].iString = reinterpret_cast<INT_PTR>(TEXT(""));
|
||||||
|
|
||||||
::SendMessage(_hToolbarMenu, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
::SendMessage(_hToolbarMenu, TB_BUTTONSTRUCTSIZE, sizeof(TBBUTTON), 0);
|
||||||
::SendMessage(_hToolbarMenu, TB_SETBUTTONSIZE, 0, MAKELONG(nppParam._dpiManager.scaleX(20), nppParam._dpiManager.scaleY(20)));
|
::SendMessage(_hToolbarMenu, TB_SETBUTTONSIZE, 0, MAKELONG(nppParam._dpiManager.scaleX(20), nppParam._dpiManager.scaleY(20)));
|
||||||
@ -214,6 +222,12 @@ INT_PTR CALLBACK FileBrowser::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case FB_CMD_EXPANDALL:
|
||||||
|
{
|
||||||
|
_treeView.expandAll();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
popupMenuCmd(LOWORD(wParam));
|
popupMenuCmd(LOWORD(wParam));
|
||||||
}
|
}
|
||||||
|
BIN
PowerEditor/src/icons/fb_expand_all.bmp
Normal file
BIN
PowerEditor/src/icons/fb_expand_all.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
@ -146,6 +146,7 @@
|
|||||||
#define IDI_FB_ROOTCLOSE 609
|
#define IDI_FB_ROOTCLOSE 609
|
||||||
#define IDI_FB_SELECTCURRENTFILE 610
|
#define IDI_FB_SELECTCURRENTFILE 610
|
||||||
#define IDI_FB_FOLDALL 611
|
#define IDI_FB_FOLDALL 611
|
||||||
|
#define IDI_FB_EXPANDALL 612
|
||||||
|
|
||||||
#define IDI_FUNCLIST_ROOT 620
|
#define IDI_FUNCLIST_ROOT 620
|
||||||
#define IDI_FUNCLIST_NODE 621
|
#define IDI_FUNCLIST_NODE 621
|
||||||
|
Loading…
Reference in New Issue
Block a user