On 15.04.2017 22:25 Greg Ercolano wrote:
> On 04/15/17 12:47,
holm.h...@gmail.com wrote:
>> I try the test/help program in the following html-code :
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "
http://www.w3.org/TR/html4/loose.dtd">
>> [..]
>> </TABLE>
>> </body></html>
>
> Yes, looks like the <table> is going into word wrap, which does
> surprise me. That should probably be fixed.
>
> I'd like to see what others say, but I think even our simple HTML
> widget shouldn't break a table into word wrap; the table should be
> fixed, and provide a scrollbar if it's too wide. IMHO.
I agree although I don't know what the standard exactly says.
Something "simple" seems to be broken with width calculation anyway,
maybe because the table header is in a bold font? When shrinking the
window horizontally, parts of the rightmost column disappear ('vekt' and
'199') before word wrapping begins. That seems to indicate wrong text
width calculation.
Word wrapping inside particular columns seems to be okay - firefox does
it as well. But wrapping (and overwriting parts of) the table header
seems to be plainly wrong.
>> I do not see the whole text, neigther a horizontal scrollbar..
>> I guess a solution could be to recode the html code, however in this
>> case I do not have control of the html-code. It is downloaded from the net.
>
> I wouldn't expect random internet HTML content to work in
> Fl_Help_View/Fl_Help_Dialog.
>
> These widgets only understand a small subset of HTML commands,
> and are meant for formatted help documentation where the content
> is under the application developer's control.
Yes, that's the intention, AFAICT. For instance there's no CSS
implementation and it lacks more modern html keywords.
> For raw internet content, I'd strongly suggest opening an actual
> web browser from your fltk app using:
>
> fl_open_uri("
http://what/ever.html")
>
> Or use a third party FLTK widget that handles more complete HTML.
What about Roman's proposal in STR #3240?
http://www.fltk.org/str.php?L3240
According to his description and screenshot(s) this widget ought to be
much better, i.e. more complete and standards compliant, for instance
http://www.fltk.org/strfiles/3240/screenshot-1.png
I suggest the OP may try this and report if it works better for his
application. Please report here and in STR. Sorry, I don't have enough
time to test myself right now...