From 49114cfaf0bf8a5c6e49db3b6fe5dc2cd11e6ec8 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Thu, 20 Jul 2006 13:02:50 +0000 Subject: Added line and position to SCN_DOUBLECLICK notification. --- doc/ScintillaDoc.html | 7 ++++--- src/Editor.cxx | 4 +++- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/ScintillaDoc.html b/doc/ScintillaDoc.html index f20da9bb3..3767b3b24 100644 --- a/doc/ScintillaDoc.html +++ b/doc/ScintillaDoc.html @@ -4546,7 +4546,7 @@ struct NotifyHeader { // This matches the Win32 NMHDR structure struct SCNotification { struct NotifyHeader nmhdr; int position; - // SCN_STYLENEEDED, SCN_MODIFIED, SCN_DWELLSTART, + // SCN_STYLENEEDED, SCN_DOUBLECLICK, SCN_MODIFIED, SCN_DWELLSTART, // SCN_DWELLEND, SCN_CALLTIPCLICK, // SCN_HOTSPOTCLICK, SCN_HOTSPOTDOUBLECLICK int ch; // SCN_CHARADDED, SCN_KEY @@ -4558,7 +4558,7 @@ struct SCNotification { int message; // SCN_MACRORECORD uptr_t wParam; // SCN_MACRORECORD sptr_t lParam; // SCN_MACRORECORD - int line; // SCN_MODIFIED + int line; // SCN_MODIFIED, SCN_DOUBLECLICK int foldLevelNow; // SCN_MODIFIED int foldLevelPrev; // SCN_MODIFIED int margin; // SCN_MARGINCLICK @@ -4656,7 +4656,8 @@ href="#SCI_POSITIONFROMLINE">SCI_POSITIONFROMLINE(lineNumber); than 256.

SCN_DOUBLECLICK
- The mouse button was double clicked in editor. There is no additional information.

+ The mouse button was double clicked in editor. The position field is set to the text position of the + double click and the line field is set to the line of the double click.

SCN_UPDATEUI
Either the text or styling of the document has changed or the selection range has changed. Now diff --git a/src/Editor.cxx b/src/Editor.cxx index 87a0391b4..bcaa8f839 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -3612,9 +3612,11 @@ void Editor::NotifyModifyAttempt() { NotifyParent(scn); } -void Editor::NotifyDoubleClick(Point, bool) { +void Editor::NotifyDoubleClick(Point pt, bool) { SCNotification scn = {0}; scn.nmhdr.code = SCN_DOUBLECLICK; + scn.line = LineFromLocation(pt); + scn.position = PositionFromLocationClose(pt); NotifyParent(scn); } -- cgit v1.2.3