I am enjoying setting up Call tips, but have hit a couple of annoyances, at 
least one of which has been mentioned in a prior posting, but with no follow up 
regarding implementation.

1) Call tips seem to use STYLE_DEFAULT - at least as far as the facename and 
size. This is a pain as it makes the call tip seem too imposing... it would be 
really nice to either add a new predefined style, say STYLE_CALLTIP=38, or add 
another message - SCI_SETCALLTIPSTYLE(int styleNum, <unused>) to determine 
which style is to be used. I noticed that there was a message about fonts 
earlier and Neil indicated he would accept a patch. Did anything come of this? 
As far as I can tell, it involves changing ScintillaBase::CallTipShow() to 
replace STYLE_DEFAULT with either a dedicated style, or with the style number 
set by the container.
2) In my call tips, I like to give the user some help with the arguments. I end 
up with a call tip like:

Func MyFunc(var1, var2$)
var1   Set this to 0 to cool the kettle and to 97 to be awkward.
       Other number cause my blood to boil.
var2$  A list of kettle manufacturers, separated by steam.
Return The mass of an average kettle.

All Ok so far, but if we use a proportional font, nothing lines up as . So it 
would
be nice to set a tab size. This could be done as part of an SC_SETCALLTIPSTYLE
(int styleNum, int TabSize)... with tabs set in pixels (we can find out how big 
by using the SCI_TEXTWIDTH call).

3) The documentation for call tips should be extended to say how the call tip 
font is constructed:

"The call tip is displayed using the font facename and current zoomed size of 
STYLE_DEFAULT [or the style set by SC_SETCALLTIPSTYLE]. Other style features 
such as italic and bold are ignored."
--------------------------------------------------

In terms of implementation, allowing the container to choose the style to set 
for the call-tip looks straightforward. However, implementing a tab width looks 
more involved due to the way that the call-tip is drawn. In terms of backwards 
compatibility using a SCI_SETCALLTIPSTYLE must be OK. Setting a new default 
style would probably be OK, but folks who set a new default style without 
copying it to all styles would see differences.

Does anyone have any thoughts about this?
Would Neil accept a patch to implement any/some/all of this?


_______________________________________________
Scintilla-interest mailing list
[email protected]
http://mailman.lyra.org/mailman/listinfo/scintilla-interest

Reply via email to