Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#1046 Hotspots in annotations (clickable annotations)

Completed
open
nobody
None
3
2014-04-05
2014-04-02
Tom
No

First let me thank you and congratulate for creating outstanding piece of programming.
One thing I think it would be useful is adding support for hotspots in annotations.
Currently even if style used in annotation is marked as hotspot with SCI_STYLESETHOTSPOT it is simply ignored. It would be nice if hotspots were possible in annotations or at least
add a notification for annotation clicked and changing cursor to normal when mouse hovers over annotation.

Why I think it is useful?
Let me give you an example:
Suppose that we use annotation to display error / warning messages in the editor. Now clickable annotations allow displaying extra help/explanation when error message is clicked.

Currently a workaround is to handle normal lclick/double click notifications and check if line has annotations attached but this has 2 disadvantates:
a) one can not differentiate between annotation lines (if there is more than one per line of text)
b) mouse cursor shape (text entry) is misleading because it suggests that annotations can be edited while they are read-only so text-entry mouse cursor does not make too much sense to me.

Discussion

  • Neil Hodgson
    Neil Hodgson
    2014-04-03

    It is unlikely I will work on this.

    The application should take over or augment all mouse processing if functionality is wanted that is not provided by Scintilla.

     
  • Neil Hodgson
    Neil Hodgson
    2014-04-03

    • Priority: 5 --> 3
     
  • Tom
    Tom
    2014-04-03

    Thank you very much for the response.
    But in order for application to take over, Scintilla would need to expose methods to get annotation from mouse position. Currently, as far as I know, it is not available.

     
    • Neil Hodgson
      Neil Hodgson
      2014-04-04

      Fairly sure the current API can achieve this although there is no direct position to annotation call.

       
  • Tom
    Tom
    2014-04-05

    Thanks. Fair enough.

    If I implement what I suggested by myself, and provide the source code changes, would you be willing to incorporate changes to Scintilla code base or you simply think this feature is not needed at all?

     
    • Neil Hodgson
      Neil Hodgson
      2014-04-05

      Depends on the API being proposed and quality of implementation.