Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/canvas
Modified Files:
evas_object_textblock.c
Log Message:
handle tabs.. (jump to next tabstop)
===================================================================
RCS file:
/cvsroot/enlightenment/e17/libs/evas/src/lib/canvas/evas_object_textblock.c,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -3 -r1.74 -r1.75
--- evas_object_textblock.c 15 Aug 2005 15:30:30 -0000 1.74
+++ evas_object_textblock.c 15 Aug 2005 15:39:31 -0000 1.75
@@ -91,6 +91,7 @@
struct {
int l, r;
} margin;
+ int tabstops;
unsigned char style;
unsigned char wrap_word : 1;
unsigned char wrap_char : 1;
@@ -1524,6 +1525,11 @@
else if (!strcmp(param, "far_soft_shadow")) fmt->style =
STYLE_FAR_SOFT_SHADOW;
else fmt->style = STYLE_PLAIN;
}
+ else if (!strcmp(cmd, "tabstops"))
+ {
+ fmt->tabstops = atoi(param);
+ if (fmt->tabstops < 1) fmt->tabstops = 1;
+ }
if (new_font)
{
@@ -1733,6 +1739,7 @@
fmt->halign = 0.0;
fmt->valign = -1.0;
fmt->style = STYLE_PLAIN;
+ fmt->tabstops = 32;
return fmt;
}
@@ -2298,7 +2305,11 @@
if (!strcmp(item, "\n"))
_layout_line_advance(c, fmt);
else if (!strcmp(item, "\t"))
- { /* jump to next tabstop */
+ {
+ int x2;
+
+ x2 = (fmt->tabstops * ((c->x + fmt->tabstops) /
fmt->tabstops));
+ c->x = x2;
}
}
free(item);
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs