Hello Chuck,
I investigated a bit on correcting the tab bug by modifying
textedit_str_size() as follows:
void textedit_str_size ( struct widget *self,
TEXTEDIT_UCHAR * txt,
size_t len,
==> s16 xpos,
s16 * w,
s16 * h ) {
...
if (ch == '\t') {
p.x = 0;
DATA->fd->lib->measure_char(DATA->fd,&p,' ',0);
==> *w += p.x;
==> *w += ( *w + xpos ) % ( p.x * 8 );
} else if (ch != '\n') {
...
where xpos is the starting horizontal absolute position of the text.
There are a few other places to modify, in order to transmit xpos. I did
not have time to get it completely working.
The several problems are:
1. xpos must be transmitted to several other functions
2. I sometimes found difficult to determine the absolute position,
since calculation of text lengths are mostly done in a relative
way
3. If the tab is near to the widget border, it could lead to an
incorrect wrapping of the following word and/or the preceding
word
Micah, I haven't yet examined the in detail the textbox widget, but
AFAIK it just replaces tab by a space. Is the horizontal text position
easily available when measure_char() is used ?
Greetings,
Pascal
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Pgui-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/pgui-devel