[ENHANCE] Enhance Project Manager.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@814 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
87a142c5e8
commit
100842b729
@ -109,7 +109,7 @@ ToolBarButtonUnit toolBarIcons[] = {
|
|||||||
Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL),
|
Notepad_plus::Notepad_plus(): _mainWindowStatus(0), _pDocTab(NULL), _pEditView(NULL),
|
||||||
_pMainSplitter(NULL),
|
_pMainSplitter(NULL),
|
||||||
_recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _pFileSwitcherPanel(NULL),
|
_recordingMacro(false), _pTrayIco(NULL), _isUDDocked(false), _pFileSwitcherPanel(NULL),
|
||||||
_pProjectPanel_1(NULL), _pProjectPanel_2(NULL), _pProjectPanel_3(NULL),
|
_pProjectPanel(NULL), _pProjectPanel_2(NULL), _pProjectPanel_3(NULL),
|
||||||
_linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false), _sysMenuEntering(false),
|
_linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false), _sysMenuEntering(false),
|
||||||
_autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView), _smartHighlighter(&_findReplaceDlg),
|
_autoCompleteMain(&_mainEditView), _autoCompleteSub(&_subEditView), _smartHighlighter(&_findReplaceDlg),
|
||||||
_isFileOpening(false), _rememberThisSession(true), _pAnsiCharPanel(NULL), _pClipboardHistoryPanel(NULL)
|
_isFileOpening(false), _rememberThisSession(true), _pAnsiCharPanel(NULL), _pClipboardHistoryPanel(NULL)
|
||||||
@ -159,19 +159,16 @@ Notepad_plus::~Notepad_plus()
|
|||||||
if (_pFileSwitcherPanel)
|
if (_pFileSwitcherPanel)
|
||||||
delete _pFileSwitcherPanel;
|
delete _pFileSwitcherPanel;
|
||||||
|
|
||||||
if (_pProjectPanel_1)
|
if (_pProjectPanel)
|
||||||
{
|
{
|
||||||
_pProjectPanel_1->destroy();
|
delete _pProjectPanel;
|
||||||
delete _pProjectPanel_1;
|
|
||||||
}
|
}
|
||||||
if (_pProjectPanel_2)
|
if (_pProjectPanel_2)
|
||||||
{
|
{
|
||||||
_pProjectPanel_2->destroy();
|
|
||||||
delete _pProjectPanel_2;
|
delete _pProjectPanel_2;
|
||||||
}
|
}
|
||||||
if (_pProjectPanel_3)
|
if (_pProjectPanel_3)
|
||||||
{
|
{
|
||||||
_pProjectPanel_3->destroy();
|
|
||||||
delete _pProjectPanel_3;
|
delete _pProjectPanel_3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -4674,6 +4671,55 @@ void Notepad_plus::launchAnsiCharPanel()
|
|||||||
_pAnsiCharPanel->display();
|
_pAnsiCharPanel->display();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Notepad_plus::launchProjectPanel()
|
||||||
|
{
|
||||||
|
if (!_pProjectPanel)
|
||||||
|
{
|
||||||
|
_pProjectPanel = new ProjectPanel;
|
||||||
|
_pProjectPanel->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf());
|
||||||
|
|
||||||
|
tTbData data = {0};
|
||||||
|
_pProjectPanel->create(&data);
|
||||||
|
|
||||||
|
::SendMessage(_pPublicInterface->getHSelf(), NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, (WPARAM)_pProjectPanel->getHSelf());
|
||||||
|
// define the default docking behaviour
|
||||||
|
data.uMask = DWS_DF_CONT_LEFT | DWS_ICONTAB;
|
||||||
|
//data.hIconTab = (HICON)::LoadImage(_pPublicInterface->getHinst(), MAKEINTRESOURCE(IDI_FIND_RESULT_ICON), IMAGE_ICON, 0, 0, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
|
||||||
|
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
|
||||||
|
|
||||||
|
// the dlgDlg should be the index of funcItem where the current function pointer is
|
||||||
|
// in this case is DOCKABLE_DEMO_INDEX
|
||||||
|
// In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog
|
||||||
|
data.dlgID = IDM_VIEW_PROJECT_PANEL_1;
|
||||||
|
::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data);
|
||||||
|
}
|
||||||
|
_pProjectPanel->display();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Notepad_plus::launchProjectPanel2()
|
||||||
|
{
|
||||||
|
if (!_pProjectPanel_2)
|
||||||
|
{
|
||||||
|
_pProjectPanel_2 = new ProjectPanel;
|
||||||
|
_pProjectPanel_2->init(_pPublicInterface->getHinst(), _pPublicInterface->getHSelf());
|
||||||
|
|
||||||
|
tTbData data = {0};
|
||||||
|
_pProjectPanel_2->create(&data);
|
||||||
|
|
||||||
|
::SendMessage(_pPublicInterface->getHSelf(), NPPM_MODELESSDIALOG, MODELESSDIALOGREMOVE, (WPARAM)_pProjectPanel->getHSelf());
|
||||||
|
// define the default docking behaviour
|
||||||
|
data.uMask = DWS_DF_CONT_LEFT | DWS_ICONTAB;
|
||||||
|
//data.hIconTab = (HICON)::LoadImage(_pPublicInterface->getHinst(), MAKEINTRESOURCE(IDI_FIND_RESULT_ICON), IMAGE_ICON, 0, 0, LR_LOADMAP3DCOLORS | LR_LOADTRANSPARENT);
|
||||||
|
data.pszModuleName = NPP_INTERNAL_FUCTION_STR;
|
||||||
|
|
||||||
|
// the dlgDlg should be the index of funcItem where the current function pointer is
|
||||||
|
// in this case is DOCKABLE_DEMO_INDEX
|
||||||
|
// In the case of Notepad++ internal function, it'll be the command ID which triggers this dialog
|
||||||
|
data.dlgID = IDM_VIEW_PROJECT_PANEL_2;
|
||||||
|
::SendMessage(_pPublicInterface->getHSelf(), NPPM_DMMREGASDCKDLG, 0, (LPARAM)&data);
|
||||||
|
}
|
||||||
|
_pProjectPanel_2->display();
|
||||||
|
}
|
||||||
void Notepad_plus::launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel)
|
void Notepad_plus::launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel)
|
||||||
{
|
{
|
||||||
if (!*pProjPanel)
|
if (!*pProjPanel)
|
||||||
|
@ -400,7 +400,7 @@ private:
|
|||||||
AnsiCharPanel *_pAnsiCharPanel;
|
AnsiCharPanel *_pAnsiCharPanel;
|
||||||
ClipboardHistoryPanel *_pClipboardHistoryPanel;
|
ClipboardHistoryPanel *_pClipboardHistoryPanel;
|
||||||
VerticalFileSwitcher *_pFileSwitcherPanel;
|
VerticalFileSwitcher *_pFileSwitcherPanel;
|
||||||
ProjectPanel *_pProjectPanel_1;
|
ProjectPanel *_pProjectPanel;
|
||||||
ProjectPanel *_pProjectPanel_2;
|
ProjectPanel *_pProjectPanel_2;
|
||||||
ProjectPanel *_pProjectPanel_3;
|
ProjectPanel *_pProjectPanel_3;
|
||||||
|
|
||||||
@ -589,6 +589,8 @@ private:
|
|||||||
void launchAnsiCharPanel();
|
void launchAnsiCharPanel();
|
||||||
void launchClipboardHistoryPanel();
|
void launchClipboardHistoryPanel();
|
||||||
void launchFileSwitcherPanel();
|
void launchFileSwitcherPanel();
|
||||||
|
void launchProjectPanel();
|
||||||
|
void launchProjectPanel2();
|
||||||
void launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel);
|
void launchProjectPanel(int cmdID, ProjectPanel ** pProjPanel);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -300,17 +300,17 @@ void Notepad_plus::command(int id)
|
|||||||
|
|
||||||
case IDM_VIEW_PROJECT_PANEL_1:
|
case IDM_VIEW_PROJECT_PANEL_1:
|
||||||
{
|
{
|
||||||
launchProjectPanel(id, &_pProjectPanel_1);
|
launchProjectPanel();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDM_VIEW_PROJECT_PANEL_2:
|
case IDM_VIEW_PROJECT_PANEL_2:
|
||||||
{
|
{
|
||||||
launchProjectPanel(id, &_pProjectPanel_2);
|
launchProjectPanel2();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case IDM_VIEW_PROJECT_PANEL_3:
|
case IDM_VIEW_PROJECT_PANEL_3:
|
||||||
{
|
{
|
||||||
launchProjectPanel(id, &_pProjectPanel_3);
|
launchProjectPanel(IDM_VIEW_PROJECT_PANEL_3, &_pProjectPanel_3);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user