Discussion:
Calltip style affects container character layout
Markus Nißl
2014-02-21 15:57:05 UTC
Permalink
I actually wanted to work on a patch that allows for having a separate
style for the autocompletion list.

While the patch for this feature was actually pretty simple, I ran into the
circumstance that also shows up when setting a separate style for calltips:
it affects the layout of the characters in the container. When you choose
two fonts with distinct font metrics for your styles, Scintilla most likely
takes the maximum values.

While this does make sense for styles used in the container, it does not
for the calltip style ... or a potential future autocompletion style.

Is it possible in a rather simple way to separate the calltip style from
the remaining container styles? ... Which would also allow for a separate
autocompletion style!?

Markus
--
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-21 22:04:53 UTC
Permalink
While the patch for this feature was actually pretty simple, I ran into the circumstance that also shows up when setting a separate style for calltips: it affects the layout of the characters in the container. When you choose two fonts with distinct font metrics for your styles, Scintilla most likely takes the maximum values.
Line height is determined by the tallest font.
While this does make sense for styles used in the container, it does not for the calltip style ... or a potential future autocompletion style.
STYLE_CALLTIP may also be used for text content.
Is it possible in a rather simple way to separate the calltip style from the remaining container styles?
No, that can not be changed simply. Most likely it would require adding a new style attribute.

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.
Markus Nißl
2014-02-24 09:22:09 UTC
Permalink
Post by Markus Nißl
Post by Markus Nißl
While this does make sense for styles used in the container, it does not
for the calltip style ... or a potential future autocompletion style.
STYLE_CALLTIP may also be used for text content.
It is theoretically and practically possible ... but does it make sense in
practice to use such a dedicated style for text in the container?
Post by Markus Nißl
Post by Markus Nißl
Is it possible in a rather simple way to separate the calltip style from
the remaining container styles?
No, that can not be changed simply. Most likely it would require adding
a new style attribute.
Do you think of two new separate styles (calltip, autocompletion) that are
treated differently from current container styles?

Well, I guess you won't be working on this issue. If you give me some
guidance on how to have that feature request implemented in a proper way to
have your approval to include it in Scintilla, I'm willing to work on this
:-)
--
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-26 22:04:47 UTC
Permalink
Style 39 is STYLE_LASTPREDEFINED ... I thought that instead of hard coding 39, users of Scintilla can take this constant and continue with their styles à la
enum MyStyles
{
firstStyle = STYLE_LASTPREDEFINED,
secondStyle,
thirdStyle
};
STYLE_LASTPREDEFINED should not normally be used by containers or lexers as it is meant for future use by Scintilla. Scintilla maintains binary compatibility between releases so an application will work with a newer Scintilla DLL or shared library. Your secondStyle (40) will clash with, for example, SCE_PL_SUB_PROTOTYPE. If you are using your own lexing code then you could use style 40 as you wish.
I guess I'm missing the point ... because as I just found out, if you set a large font as an annotation style, this also has an impact on the regular text lines, even when using SCI_ALLOCATEEXTENDEDSTYLES and SCI_ANNOTATIONSETSTYLEOFFSET.
This was in response to you wanting additional style numbers for call tips and autocompletion. It was not addressing the issue of ignoring styles for the purpose of line height calculation. That would, as said earlier, require something like adding a new attribute to each style.

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.
Loading...