diff options
author | nyamatongwe <unknown> | 2006-07-20 13:02:50 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2006-07-20 13:02:50 +0000 |
commit | 49114cfaf0bf8a5c6e49db3b6fe5dc2cd11e6ec8 (patch) | |
tree | c4acba01a19db641df11db45d86eb2946d04e861 | |
parent | 2b9a42e9d5b3105bbd8f4c18c2ac05a190cdd107 (diff) | |
download | scintilla-mirror-49114cfaf0bf8a5c6e49db3b6fe5dc2cd11e6ec8.tar.gz |
Added line and position to SCN_DOUBLECLICK notification.
-rw-r--r-- | doc/ScintillaDoc.html | 7 | ||||
-rw-r--r-- | 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</a>(lineNumber); than 256.</p> <p><b id="SCN_DOUBLECLICK">SCN_DOUBLECLICK</b><br /> - The mouse button was double clicked in editor. There is no additional information.</p> + The mouse button was double clicked in editor. The <code>position</code> field is set to the text position of the + double click and the <code>line</code> field is set to the line of the double click.</p> <p><b id="SCN_UPDATEUI">SCN_UPDATEUI</b><br /> 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); } |