[NEW_FEATURE] Doc map: mouse wheel is working.
[BUG_FIXED] Doc map: Remove the unnecessary merge. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@871 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
f89bd5aeea
commit
9d1e836079
@ -592,6 +592,9 @@ public:
|
||||
};
|
||||
void setHiLiteResultWords(const TCHAR *keywords);
|
||||
void defineDocType(LangType typeDoc); //setup stylers for active document
|
||||
void mouseWheel(WPARAM wParam, LPARAM lParam) {
|
||||
scintillaNew_Proc(_hSelf, WM_MOUSEWHEEL, wParam, lParam);
|
||||
};
|
||||
|
||||
/*
|
||||
pair<size_t, bool> getLineUndoState(size_t currentLine) {
|
||||
|
@ -33,6 +33,7 @@ void DocumentMap::reloadMap()
|
||||
// sync with the current document
|
||||
// Lexing
|
||||
_pScintillaEditView->defineDocType((*_ppEditView)->getCurrentBuffer()->getLangType());
|
||||
_pScintillaEditView->showMargin(ScintillaEditView::_SC_MARGE_FOLDER, false);
|
||||
|
||||
// folding
|
||||
_pScintillaEditView->syncFoldStateWith((*_ppEditView)->getCurrentFoldStates());
|
||||
@ -150,7 +151,7 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
|
||||
_vzDlg.init(::GetModuleHandle(NULL), _hSelf);
|
||||
_vzDlg.doDialog();
|
||||
(NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 100); // 0 <= transparancy < 256
|
||||
(NppParameters::getInstance())->SetTransparent(_vzDlg.getHSelf(), 50); // 0 <= transparancy < 256
|
||||
return TRUE;
|
||||
}
|
||||
case WM_DESTROY:
|
||||
@ -313,11 +314,18 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case DOCUMENTMAP_MOUSEWHEEL:
|
||||
{
|
||||
//::SendMessage((*_ppEditView)->getHSelf(), WM_MOUSEWHEEL, wParam, lParam);
|
||||
(*_ppEditView)->mouseWheel(wParam, lParam);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
|
||||
|
||||
default :
|
||||
return DockingDlgInterface::run_dlgProc(message, wParam, lParam);
|
||||
}
|
||||
@ -325,13 +333,6 @@ BOOL CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
}
|
||||
|
||||
void ViewZoneDlg::drawPreviewZone(DRAWITEMSTRUCT *pdis)
|
||||
{
|
||||
//switch (pdis->itemAction)
|
||||
{
|
||||
//case ODA_DRAWENTIRE:
|
||||
//switch (pdis->CtlID)
|
||||
{
|
||||
//case IDC_GLASS:
|
||||
{
|
||||
RECT rc = pdis->rcItem;
|
||||
|
||||
@ -360,24 +361,8 @@ void ViewZoneDlg::drawPreviewZone(DRAWITEMSTRUCT *pdis)
|
||||
SelectObject(pdis->hDC, holdPen);
|
||||
DeleteObject(hpen);
|
||||
*/
|
||||
|
||||
|
||||
DeleteObject(hbrushFg);
|
||||
DeleteObject(hbrushBg);
|
||||
//FrameRect(pdis->hDC, &rc, (HBRUSH) GetStockObject(GRAY_BRUSH));
|
||||
//break;
|
||||
}
|
||||
}
|
||||
// *** FALL THROUGH ***
|
||||
/*
|
||||
case ODA_SELECT:
|
||||
break;
|
||||
case ODA_FOCUS:
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
*/
|
||||
}
|
||||
}
|
||||
|
||||
void ViewZoneDlg::doDialog()
|
||||
@ -444,6 +429,21 @@ BOOL CALLBACK ViewZoneDlg::run_dlgProc(UINT message, WPARAM wParam, LPARAM lPara
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_MOUSEWHEEL :
|
||||
{
|
||||
/*
|
||||
if (LOWORD(wParam) & MK_RBUTTON)
|
||||
{
|
||||
::SendMessage(_hParent, Message, wParam, lParam);
|
||||
return TRUE;
|
||||
}
|
||||
*/
|
||||
|
||||
//Have to perform the scroll first, because the first/last line do not get updated untill after the scroll has been parsed
|
||||
::SendMessage(_hParent, DOCUMENTMAP_MOUSEWHEEL, wParam, lParam);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
case WM_DESTROY :
|
||||
{
|
||||
return TRUE;
|
||||
@ -466,7 +466,7 @@ BOOL CALLBACK ViewZoneDlg::canvas_runProc(HWND hwnd, UINT message, WPARAM wParam
|
||||
{
|
||||
case WM_DESTROY:
|
||||
{
|
||||
::MessageBoxA(NULL,"Destroy","",MB_OK);
|
||||
//::MessageBoxA(NULL,"Destroy","",MB_OK);
|
||||
}
|
||||
return TRUE;
|
||||
|
||||
|
@ -28,6 +28,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
#define DOCUMENTMAP_SCROLL (WM_USER + 1)
|
||||
#define DOCUMENTMAP_MOUSECLICKED (WM_USER + 2)
|
||||
#define DOCUMENTMAP_MOUSEWHEEL (WM_USER + 3)
|
||||
|
||||
class ScintillaEditView;
|
||||
const bool moveDown = true;
|
||||
|
Loading…
Reference in New Issue
Block a user