Re: Intercepting and modifying calltips on the fly

"'Neil Hodgson' via scite-interest" <[email protected]> Sat, 22 Apr 2023 09:09:47 +1000
Newsgroups gmane.editors.scite.general
Message-ID <[email protected]>
Tim Rude:

> as 'OnCallTipShow' that fired just before a CallTip was auto-displayed, and passed as parameters the same (position pos, string definition) values as one would pass to the CallTipShow function, then a custom OnCallTipShow function could be written to modify the 'string definition' value as desired, call the actual CallTipShow function using the original 'position pos' parameter and the modified 'string definition' parameter, and then return True from the custom OnCallTipShow event function to signal to SciTE that it doesn't need to proceed with the rest of the event (displaying the calltip) because it's already been handled.

   I don't think that will be sufficient to override the current functionality cleanly. SciTE is also responsible for moving the highlight within the calltip by calling CallTipSetHlt as the user enters each parameter. To do that, it maintains several state variables:

std::string functionDefinition;
SA::Position startCalltipWord;
int currentCallTip;
int maxCallTips;
std::string currentCallTipWord;
SA::Position lastPosCallTip;

   The core method is FillFunctionDefinition but its supported by StartCallTip and ContinueCallTip.

   Neil

-- 
You received this message because you are subscribed to the Google Groups "scite-interest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/scite-interest/27A3DFE8-CF0D-47BB-980E-B9A88F067103%40me.com.