Greg Smith
2014-01-09 19:08:53 UTC
I have spent some interesting time attempting to allow nested tooltips, that is when the arguments to a function are also functions, so the tooltips need to change as you type, then revert to previous tips.
A user was very keen that erasing should allow you to restore previous tips, and I have just about figured out that this is possible... but you have to mess about a lot due to the way that Scintilla decides if it should remove a tip when you delete.
The documentation says:
SCI_CALLTIPCANCEL
This message cancels any displayed call tip. Scintilla will also cancel call tips for you if you use any keyboard commands that are not compatible with editing the argument list of a function.
Can I suggest that you add: Call tips are erased if you delete back past the position that the caret was in when the tip was triggered.
Also, for SCI_CALLTIPSHOW, it would be worth adding that Scintilla stores the current position when the tip is started. The position passed in is solely used for tip alignment.
The problem with Scintilla automatically killing tips is that it makes it much harder to write fancier tip mechanisms as you have to work around the tips being deleted for you, and when you try to revert to an older tip, you have to move the caret to a fake position in order to recreate the previous tip, then restore the caret to the original position.
I wonder if we need an option to stop Scintilla killing off tips itself so that this becomes the containers responsibility... or at least allow erase back and adding a new line to not kill it off so that continuous typing does not kill it.
I think there was another post along these lines recently.
All the best,
Greg Smith
A user was very keen that erasing should allow you to restore previous tips, and I have just about figured out that this is possible... but you have to mess about a lot due to the way that Scintilla decides if it should remove a tip when you delete.
The documentation says:
SCI_CALLTIPCANCEL
This message cancels any displayed call tip. Scintilla will also cancel call tips for you if you use any keyboard commands that are not compatible with editing the argument list of a function.
Can I suggest that you add: Call tips are erased if you delete back past the position that the caret was in when the tip was triggered.
Also, for SCI_CALLTIPSHOW, it would be worth adding that Scintilla stores the current position when the tip is started. The position passed in is solely used for tip alignment.
The problem with Scintilla automatically killing tips is that it makes it much harder to write fancier tip mechanisms as you have to work around the tips being deleted for you, and when you try to revert to an older tip, you have to move the caret to a fake position in order to recreate the previous tip, then restore the caret to the original position.
I wonder if we need an option to stop Scintilla killing off tips itself so that this becomes the containers responsibility... or at least allow erase back and adding a new line to not kill it off so that continuous typing does not kill it.
I think there was another post along these lines recently.
All the best,
Greg Smith
--
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.
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.