Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/lib
Modified Files:
edje_calc.c edje_data.c edje_private.h edje_text.c
Log Message:
add elipsis direct control
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_calc.c,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -3 -r1.71 -r1.72
--- edje_calc.c 28 Oct 2005 02:56:27 -0000 1.71
+++ edje_calc.c 6 Nov 2005 03:32:01 -0000 1.72
@@ -879,6 +879,7 @@
{
params->text.align.y = desc->text.align.y;
}
+ params->text.elipsis = desc->text.elipsis;
}
static void
@@ -1008,6 +1009,7 @@
p3.text.align.x = (p1.text.align.x * (1.0 - pos)) + (p2.text.align.x *
(pos));
p3.text.align.y = (p1.text.align.y * (1.0 - pos)) + (p2.text.align.y *
(pos));
+ p3.text.elipsis = (p1.text.elipsis * (1.0 - pos)) + (p2.text.elipsis *
(pos));
}
else
{
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_data.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -3 -r1.25 -r1.26
--- edje_data.c 19 Sep 2005 06:51:49 -0000 1.25
+++ edje_data.c 6 Nov 2005 03:32:01 -0000 1.26
@@ -238,6 +238,7 @@
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description,
Edje_Part_Description, "text.align.y", text.align.y, EET_T_DOUBLE);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description,
Edje_Part_Description, "text.id_source", text.id_source, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description,
Edje_Part_Description, "text.id_text_source", text.id_text_source, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description,
Edje_Part_Description, "text.elipsis", text.elipsis, EET_T_DOUBLE);
_edje_edd_edje_part =
NEWD("Edje_Part",
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_private.h,v
retrieving revision 1.96
retrieving revision 1.97
diff -u -3 -r1.96 -r1.97
--- edje_private.h 2 Nov 2005 08:13:56 -0000 1.96
+++ edje_private.h 6 Nov 2005 03:32:01 -0000 1.97
@@ -427,6 +427,7 @@
int id_source; /* -1 if none */
int id_text_source; /* -1 if none */
+ double elipsis; /* 0.0 - 1.0 defining where the elipsis align */
} text;
};
@@ -558,6 +559,7 @@
char *out_str;
int out_size;
double align_x, align_y;
+ double elipsis;
} cache;
Edje_Real_Part *source;
Edje_Real_Part *text_source;
@@ -621,6 +623,7 @@
struct {
double x, y; /* text alignment within bounds */
} align;
+ double elipsis;
} text;
};
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/edje/src/lib/edje_text.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -3 -r1.40 -r1.41
--- edje_text.c 4 Nov 2005 07:56:13 -0000 1.40
+++ edje_text.c 6 Nov 2005 03:32:01 -0000 1.41
@@ -340,16 +340,16 @@
evas_object_geometry_get(ep->object, NULL, NULL, &tw, &th);
- p = ((sw - tw) * params->text.align.x);
+ p = ((sw - tw) * params->text.elipsis);
/* chop chop */
if (tw > sw)
{
- if (params->text.align.x != 0.0)
+ if (params->text.elipsis != 0.0)
c1 = evas_object_text_char_coords_get(ep->object,
-p, th / 2,
NULL, NULL, NULL, NULL);
- if (params->text.align.x != 1.0)
+ if (params->text.elipsis != 1.0)
c2 = evas_object_text_char_coords_get(ep->object,
-p + sw, th / 2,
NULL, NULL, NULL, NULL);
@@ -575,7 +575,8 @@
(text) &&
(!strcmp(ep->text.cache.in_str, text)) &&
(ep->text.cache.align_x == params->text.align.x) &&
- (ep->text.cache.align_y == params->text.align.y))
+ (ep->text.cache.align_y == params->text.align.y) &&
+ (ep->text.cache.elipsis == params->text.elipsis))
{
text = ep->text.cache.out_str;
size = ep->text.cache.out_size;
@@ -703,6 +704,7 @@
ep->text.cache.out_size = size;
ep->text.cache.align_x = params->text.align.x;
ep->text.cache.align_y = params->text.align.y;
+ ep->text.cache.elipsis = params->text.elipsis;
arrange_text:
if (inlined_font) evas_object_text_font_source_set(ep->object, ed->path);
-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs