On 6/6/24 03:10, Ian MacArthur wrote:
On Thursday 6 June 2024 at 09:49:23 UTC+1 eclet... wrote:
[..]
Is there a way to disable this and have string displayed as passed, skipping having '@' used as a special char inside widgets text ?
There's some discussion of this in the docs., but the easy option is probably to crib from Greg's examples...
Fl_Table itself doesn't draw strings; it depends what text
drawing functions you call in the draw_cell() callback.
Some fl_draw() text drawing methods use '@' symbols by
default, some do not, and some offer a flag to control it.
For instance, this form of fl_draw() has a "draw_symbols" flag
at the end which, if disabled, will disable drawing @ symbols:
void
fl_draw(const char *str, int x, int y, int w, int h, Fl_Align
align, Fl_Image *img, int draw_symbols)
..so that's probably the best route is to use the best
fl_draw() method variation for what you're doing; the docs (link
above) say:
".. The draw_symbols
argument specifies whether
or not to look for symbol names starting with the '@' character'"
In cases where you might be stuck with @ symbols being on,
you can prefix strings with @. to disable special '@' parsing for
the rest of the string, e.g. "@.rob@example.com".