On 04/04/13 09:44, Manolo Gouy wrote:
>> It'd be good if we could fix adjacent <BR>'s though.
>>
>> I recall our html parser's source being a bit tricky to grok,
>> but I think I worked on a small part of it once.. will see if
>> I can figure this one out.
>
> I've seen that commenting out line 657 of file src/Fl_Help_View.cxx
> seems to fix this problem. But does this have other negative effects?
Comment out the 'hh = 0;' line? Interesting:
--------------------------------------------
else if (strcasecmp(buf, "BR") == 0)
{
if (line < 31)
line ++;
xx = block->line[line];
yy += hh;
hh = 0; // <-- COMMENT THIS OUT
}
--------------------------------------------
That does seem to allow multiple <BR>s to work.
But also seems to badly affect the document height calculations
such that the scrollbar doesn't let one reach the bottom of the
document.
For instance:
#include <FL/Fl_Help_Dialog.H>
int main() {
Fl_Help_Dialog *help = new Fl_Help_Dialog();
help->value("single aaa<br>single bbb<br>single ccc"
"<br><br>double ddd<br><br>double eee<br><br>double fff"
"<br><br><br>triple ggg<br><br><br>triple hhh<br><br><br>triple
iii"
"<br><br><br><br>quad jjj<br><br><br><br>quad
kkk<br><br><br><br>quad lll"
"<br>END");
help->show();
return(Fl::run());
return (0);
}
With 657 left alone, one can view the above document up to the last
line (END)
using the scrollbar.
But with 657 commented out, the document becomes larger (due to the
extra lines
the working <BR>'s now do), but the bottom lines are cut off in the
window,
and there's no scrollbar. One can enlarge the window vertically to see
the missing
lines.
Perhaps block->h needs to be adjusted for this to work correctly.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk