[MNEW_FEATURE] Add mouse wheel horizontal scroll feature (vista only).
Add mouse browsing (forward/back) feature. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@128 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
e0d391d73e
commit
c0ae1fefc3
@ -171,8 +171,8 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
|
||||
// in the beginning of this file then use the command symbols defined in "menuCmdID.h" file
|
||||
// to access all the Notepad++ menu command items
|
||||
|
||||
#define NPPM_ACTIVATEDOCMENU (NPPMSG + 49)
|
||||
//void NPPM_ACTIVATEDOCMENU(int view, int index2Activate)
|
||||
#define NPPM_TRIGGERTABBARCONTEXTMENU (NPPMSG + 49)
|
||||
//void NPPM_TRIGGERTABBARCONTEXTMENU(int view, int index2Activate)
|
||||
|
||||
#define NPPM_GETNPPVERSION (NPPMSG + 50)
|
||||
// int NPPM_GETNPPVERSION(0, 0)
|
||||
|
@ -2401,6 +2401,7 @@ void Notepad_plus::command(int id)
|
||||
|
||||
case IDM_EDIT_COPY:
|
||||
_pEditView->execute(WM_COPY);
|
||||
this->_mainEditView.canGoRight();
|
||||
checkClipboard();
|
||||
break;
|
||||
|
||||
@ -6644,6 +6645,21 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case WM_APPCOMMAND :
|
||||
{
|
||||
switch(GET_APPCOMMAND_LPARAM(lParam))
|
||||
{
|
||||
case APPCOMMAND_BROWSER_BACKWARD :
|
||||
case APPCOMMAND_BROWSER_FORWARD :
|
||||
int nbDoc = _mainDocTab.isVisible()?_mainEditView.getNbDoc():0;
|
||||
nbDoc += _subDocTab.isVisible()?_subEditView.getNbDoc():0;
|
||||
if (nbDoc > 1)
|
||||
activateNextDoc((GET_APPCOMMAND_LPARAM(lParam) == APPCOMMAND_BROWSER_FORWARD)?dirDown:dirUp);
|
||||
_linkTriggered = true;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
case NPPM_GETNBSESSIONFILES :
|
||||
{
|
||||
const char *sessionFileName = (const char *)lParam;
|
||||
@ -6787,7 +6803,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
}
|
||||
|
||||
case NPPM_ACTIVATEDOC :
|
||||
case NPPM_ACTIVATEDOCMENU:
|
||||
case NPPM_TRIGGERTABBARCONTEXTMENU:
|
||||
{
|
||||
// similar to NPPM_ACTIVEDOC
|
||||
int whichView = ((wParam != MAIN_VIEW) && (wParam != SUB_VIEW))?getCurrentView():wParam;
|
||||
@ -6796,7 +6812,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
switchEditViewTo(whichView);
|
||||
activateDoc(index);
|
||||
|
||||
if (Message == NPPM_ACTIVATEDOCMENU)
|
||||
if (Message == NPPM_TRIGGERTABBARCONTEXTMENU)
|
||||
{
|
||||
// open here tab menu
|
||||
NMHDR nmhdr;
|
||||
|
@ -142,6 +142,19 @@ LRESULT ScintillaEditView::scintillaNew_Proc(HWND hwnd, UINT Message, WPARAM wPa
|
||||
}
|
||||
|
||||
case WM_MOUSEHWHEEL :
|
||||
{
|
||||
if ((short)HIWORD(wParam) > 0)
|
||||
{
|
||||
//if (execute(SCI_GETXOFFSET) < 10)
|
||||
::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, SB_LINERIGHT, NULL);
|
||||
}
|
||||
else
|
||||
{
|
||||
::CallWindowProc(_scintillaDefaultProc, hwnd, WM_HSCROLL, SB_LINELEFT, NULL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
case WM_MOUSEWHEEL :
|
||||
{
|
||||
if (LOWORD(wParam) & MK_RBUTTON)
|
||||
@ -721,7 +734,7 @@ void ScintillaEditView::defineDocType(LangType typeDoc)
|
||||
setLispLexer(); break;
|
||||
|
||||
case L_SCHEME :
|
||||
setShemeLexer(); break;
|
||||
setSchemeLexer(); break;
|
||||
|
||||
case L_ASM :
|
||||
setAsmLexer(); break;
|
||||
|
Loading…
Reference in New Issue
Block a user