[NEW] Add FunctionList toolbar button.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1054 f5eea248-9336-0410-98b8-ebc06183d4e3remotes/trunk
parent
02086c9c0c
commit
3b9f24ba51
|
@ -106,6 +106,7 @@ ToolBarButtonUnit toolBarIcons[] = {
|
||||||
{IDM_VIEW_INDENT_GUIDE, IDI_VIEW_INDENT_OFF_ICON, IDI_VIEW_INDENT_ON_ICON, IDI_VIEW_INDENT_OFF_ICON, IDR_INDENTGUIDE},
|
{IDM_VIEW_INDENT_GUIDE, IDI_VIEW_INDENT_OFF_ICON, IDI_VIEW_INDENT_ON_ICON, IDI_VIEW_INDENT_OFF_ICON, IDR_INDENTGUIDE},
|
||||||
{IDM_LANG_USER_DLG, IDI_VIEW_UD_DLG_OFF_ICON, IDI_VIEW_UD_DLG_ON_ICON, IDI_VIEW_UD_DLG_OFF_ICON, IDR_SHOWPANNEL},
|
{IDM_LANG_USER_DLG, IDI_VIEW_UD_DLG_OFF_ICON, IDI_VIEW_UD_DLG_ON_ICON, IDI_VIEW_UD_DLG_OFF_ICON, IDR_SHOWPANNEL},
|
||||||
{IDM_VIEW_DOC_MAP, IDI_VIEW_UD_DLG_OFF_ICON, IDI_VIEW_UD_DLG_ON_ICON, IDI_VIEW_UD_DLG_OFF_ICON, IDR_DOCMAP},
|
{IDM_VIEW_DOC_MAP, IDI_VIEW_UD_DLG_OFF_ICON, IDI_VIEW_UD_DLG_ON_ICON, IDI_VIEW_UD_DLG_OFF_ICON, IDR_DOCMAP},
|
||||||
|
{IDM_VIEW_FUNC_LIST, IDI_VIEW_UD_DLG_OFF_ICON, IDI_VIEW_UD_DLG_ON_ICON, IDI_VIEW_UD_DLG_OFF_ICON, IDR_FUNC_LIST},
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------//
|
//-------------------------------------------------------------------------------------//
|
||||||
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
|
{0, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON, IDI_SEPARATOR_ICON},
|
||||||
|
|
|
@ -156,7 +156,7 @@ IDR_CLOSETAB_INACT BITMAP "icons\\closeTabButton_inact.bmp"
|
||||||
IDR_CLOSETAB_HOVER BITMAP "icons\\closeTabButton_hover.bmp"
|
IDR_CLOSETAB_HOVER BITMAP "icons\\closeTabButton_hover.bmp"
|
||||||
IDR_CLOSETAB_PUSH BITMAP "icons\\closeTabButton_push.bmp"
|
IDR_CLOSETAB_PUSH BITMAP "icons\\closeTabButton_push.bmp"
|
||||||
IDR_DOCMAP BITMAP "icons\\docMap.bmp"
|
IDR_DOCMAP BITMAP "icons\\docMap.bmp"
|
||||||
|
IDR_FUNC_LIST BITMAP "icons\\functionList.bmp"
|
||||||
IDI_STARTRECORD_OFF_ICON ICON "icons\\startrecord_off.ico"
|
IDI_STARTRECORD_OFF_ICON ICON "icons\\startrecord_off.ico"
|
||||||
IDI_STARTRECORD_ON_ICON ICON "icons\\startrecord_on.ico"
|
IDI_STARTRECORD_ON_ICON ICON "icons\\startrecord_on.ico"
|
||||||
IDI_STARTRECORD_DISABLE_ICON ICON "icons\\startrecord_dis.ico"
|
IDI_STARTRECORD_DISABLE_ICON ICON "icons\\startrecord_dis.ico"
|
||||||
|
@ -454,7 +454,6 @@ BEGIN
|
||||||
END
|
END
|
||||||
|
|
||||||
MENUITEM "Document Map", IDM_VIEW_DOC_MAP
|
MENUITEM "Document Map", IDM_VIEW_DOC_MAP
|
||||||
|
|
||||||
MENUITEM "Function List", IDM_VIEW_FUNC_LIST
|
MENUITEM "Function List", IDM_VIEW_FUNC_LIST
|
||||||
MENUITEM SEPARATOR
|
MENUITEM SEPARATOR
|
||||||
MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV
|
MENUITEM "Synchronize Vertical Scrolling", IDM_VIEW_SYNSCROLLV
|
||||||
|
|
|
@ -1900,12 +1900,6 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
case NPPM_INTERNAL_SETDOCMAPCHECK:
|
|
||||||
{
|
|
||||||
checkMenuItem(IDM_VIEW_DOC_MAP, lParam == TRUE ? true : false);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// These are sent by Preferences Dialog
|
// These are sent by Preferences Dialog
|
||||||
//
|
//
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
#include "clipboardFormats.h"
|
#include "clipboardFormats.h"
|
||||||
#include "VerticalFileSwitcher.h"
|
#include "VerticalFileSwitcher.h"
|
||||||
#include "documentMap.h"
|
#include "documentMap.h"
|
||||||
|
#include "functionListPanel.h"
|
||||||
|
|
||||||
void Notepad_plus::macroPlayback(Macro macro)
|
void Notepad_plus::macroPlayback(Macro macro)
|
||||||
{
|
{
|
||||||
|
@ -344,10 +345,11 @@ void Notepad_plus::command(int id)
|
||||||
|
|
||||||
case IDM_VIEW_DOC_MAP:
|
case IDM_VIEW_DOC_MAP:
|
||||||
{
|
{
|
||||||
if(_pDocMap && _pDocMap->isVisible())
|
if (_pDocMap && (!_pDocMap->isClosed()))
|
||||||
{
|
{
|
||||||
_pDocMap->display(false);
|
_pDocMap->display(false);
|
||||||
_pDocMap->vzDlgDisplay(false);
|
_pDocMap->vzDlgDisplay(false);
|
||||||
|
_pDocMap->setClosed(true);
|
||||||
checkMenuItem(IDM_VIEW_DOC_MAP, false);
|
checkMenuItem(IDM_VIEW_DOC_MAP, false);
|
||||||
_toolBar.setCheck(IDM_VIEW_DOC_MAP, false);
|
_toolBar.setCheck(IDM_VIEW_DOC_MAP, false);
|
||||||
}
|
}
|
||||||
|
@ -356,26 +358,27 @@ void Notepad_plus::command(int id)
|
||||||
checkMenuItem(IDM_VIEW_DOC_MAP, true);
|
checkMenuItem(IDM_VIEW_DOC_MAP, true);
|
||||||
_toolBar.setCheck(IDM_VIEW_DOC_MAP, true);
|
_toolBar.setCheck(IDM_VIEW_DOC_MAP, true);
|
||||||
launchDocMap();
|
launchDocMap();
|
||||||
|
_pDocMap->setClosed(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IDM_VIEW_FUNC_LIST:
|
case IDM_VIEW_FUNC_LIST:
|
||||||
{
|
{
|
||||||
launchFunctionList();
|
if (_pFuncList && (!_pFuncList->isClosed()))
|
||||||
/*
|
|
||||||
if(_pDocMap && _pDocMap->isVisible())
|
|
||||||
{
|
{
|
||||||
_pDocMap->display(false);
|
_pFuncList->display(false);
|
||||||
_pDocMap->vzDlgDisplay(false);
|
_pFuncList->setClosed(true);
|
||||||
checkMenuItem(IDM_VIEW_DOC_MAP, false);
|
checkMenuItem(IDM_VIEW_FUNC_LIST, false);
|
||||||
|
_toolBar.setCheck(IDM_VIEW_FUNC_LIST, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
checkMenuItem(IDM_VIEW_DOC_MAP, true);
|
checkMenuItem(IDM_VIEW_FUNC_LIST, true);
|
||||||
launchDocMap();
|
_toolBar.setCheck(IDM_VIEW_FUNC_LIST, true);
|
||||||
|
launchFunctionList();
|
||||||
|
_pFuncList->setClosed(false);
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -79,6 +79,14 @@ public:
|
||||||
::SendMessage(_hParent, toShow?NPPM_DMMSHOW:NPPM_DMMHIDE, 0, (LPARAM)_hSelf);
|
::SendMessage(_hParent, toShow?NPPM_DMMSHOW:NPPM_DMMHIDE, 0, (LPARAM)_hSelf);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
bool isClosed() const {
|
||||||
|
return _isClosed;
|
||||||
|
};
|
||||||
|
|
||||||
|
void setClosed(bool toClose) {
|
||||||
|
_isClosed = toClose;
|
||||||
|
};
|
||||||
|
|
||||||
const TCHAR * getPluginFileName() const {
|
const TCHAR * getPluginFileName() const {
|
||||||
return _moduleName.c_str();
|
return _moduleName.c_str();
|
||||||
};
|
};
|
||||||
|
@ -131,6 +139,7 @@ protected :
|
||||||
int _iDockedPos;
|
int _iDockedPos;
|
||||||
generic_string _moduleName;
|
generic_string _moduleName;
|
||||||
generic_string _pluginName;
|
generic_string _pluginName;
|
||||||
|
bool _isClosed;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // DOCKINGDLGINTERFACE_H
|
#endif // DOCKINGDLGINTERFACE_H
|
||||||
|
|
|
@ -311,8 +311,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||||
{
|
{
|
||||||
case DMN_CLOSE:
|
case DMN_CLOSE:
|
||||||
{
|
{
|
||||||
::SendMessage(_hParent, NPPM_INTERNAL_SETDOCMAPCHECK, 0, FALSE);
|
::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_DOC_MAP, 0);
|
||||||
_vzDlg.display(false);
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,7 +324,6 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||||
|
|
||||||
case DMN_SWITCHOFF:
|
case DMN_SWITCHOFF:
|
||||||
{
|
{
|
||||||
::SendMessage(_hParent, NPPM_INTERNAL_SETDOCMAPCHECK, 0, FALSE);
|
|
||||||
_vzDlg.display(false);
|
_vzDlg.display(false);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -307,7 +307,10 @@ void FunctionListPanel::notified(LPNMHDR notification)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (notification->code == DMN_CLOSE)
|
||||||
|
{
|
||||||
|
::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_FUNC_LIST, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
|
@ -186,6 +186,7 @@
|
||||||
#define IDR_REDO 1525
|
#define IDR_REDO 1525
|
||||||
#define IDR_M_PLAYRECORD 1526
|
#define IDR_M_PLAYRECORD 1526
|
||||||
#define IDR_DOCMAP 1527
|
#define IDR_DOCMAP 1527
|
||||||
|
#define IDR_FUNC_LIST 1528
|
||||||
|
|
||||||
#define IDR_CLOSETAB 1530
|
#define IDR_CLOSETAB 1530
|
||||||
#define IDR_CLOSETAB_INACT 1531
|
#define IDR_CLOSETAB_INACT 1531
|
||||||
|
@ -384,7 +385,7 @@
|
||||||
#define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
|
#define NPPM_INTERNAL_RECENTFILELIST_UPDATE (NOTEPADPLUS_USER_INTERNAL + 35)
|
||||||
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)
|
#define NPPM_INTERNAL_RECENTFILELIST_SWITCH (NOTEPADPLUS_USER_INTERNAL + 36)
|
||||||
#define NPPM_INTERNAL_GETSCINTEDTVIEW (NOTEPADPLUS_USER_INTERNAL + 37)
|
#define NPPM_INTERNAL_GETSCINTEDTVIEW (NOTEPADPLUS_USER_INTERNAL + 37)
|
||||||
#define NPPM_INTERNAL_SETDOCMAPCHECK (NOTEPADPLUS_USER_INTERNAL + 38)
|
//#define NPPM_INTERNAL_SETDOCMAPCHECK (NOTEPADPLUS_USER_INTERNAL + 38)
|
||||||
|
|
||||||
//wParam: 0
|
//wParam: 0
|
||||||
//lParam: document new index
|
//lParam: document new index
|
||||||
|
|
Loading…
Reference in New Issue