Discussion:
Make specific text clickable by a plugin
Gur Stavi
2014-02-08 23:02:55 UTC
Permalink
Hi,

I am trying to extend a plugin for Notepad++ to make file names in C/C++
include directives clickable.

It seems that the hot-spot feature gives the clickability that I want but I
haven't figured out yet how to inject hotspots into an active document with
an active lexer. As far as I understand hot-spot is a feature of the style.
None of the C/C++ styles has the hot-spot property and I also need a style
that will only be used for filenames in include directives.
Is it possible to inject an additional style into a document just for that?
Is it reasonable?
I assume that the C/C++ lexer will constantly override the lexing of the
include directives forcing me to re-lex them again and again.

I also tried to figure out if indicators could answer my needs.They seem
more suitable for dynamic injection into a document but they are less
clickable. There are indicator click/release notifications but hovering an
indicator will not change the cursor into a hand.
Is it possible to turn an indicator into a hotspot.

Any suggestions will be appreciated.

Thanks,
Gur
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Neil Hodgson
2014-02-09 21:40:05 UTC
Permalink
I am trying to extend a plugin for Notepad++ to make file names in C/C++ include directives clickable.
You should subclass the Scintilla window, process mouse clicks, match to text you want to be clickable, and then handle the match.

Neil
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Gur Stavi
2014-02-10 07:32:30 UTC
Permalink
Post by Neil Hodgson
You should subclass the Scintilla window, process mouse clicks, match
to text you want to be clickable, and then handle the match.
The problem is that clickable text concept is only worth something if the
user get a visual indication before the click. At minimum change the
cursor, ideally also underline/highlight the clickable text.

It may be doable but it will require a huge amount of work. The hotspot
mechanism seems like a near perfect match.
--
You received this message because you are subscribed to the Google Groups "scintilla-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scintilla-interest+***@googlegroups.com.
To post to this group, send email to scintilla-***@googlegroups.com.
Visit this group at http://groups.google.com/group/scintilla-interest.
For more options, visit https://groups.google.com/groups/opt_out.
Loading...