Enlightenment CVS committal
Author : raster
Project : e17
Module : libs/edje
Dir : e17/libs/edje/src/bin
Modified Files:
edje_cc_handlers.c edje_test_main.c
Log Message:
add max text size for text objects - object wont get bigger than its text
contents. useful for some things.
===================================================================
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_cc_handlers.c,v
retrieving revision 1.69
retrieving revision 1.70
diff -u -3 -r1.69 -r1.70
--- edje_cc_handlers.c 21 Aug 2006 03:14:09 -0000 1.69
+++ edje_cc_handlers.c 9 Oct 2006 06:01:13 -0000 1.70
@@ -91,6 +91,7 @@
static void st_collections_group_parts_part_description_text_size(void);
static void st_collections_group_parts_part_description_text_fit(void);
static void st_collections_group_parts_part_description_text_min(void);
+static void st_collections_group_parts_part_description_text_max(void);
static void st_collections_group_parts_part_description_text_align(void);
static void st_collections_group_parts_part_description_text_source(void);
static void st_collections_group_parts_part_description_text_text_source(void);
@@ -233,6 +234,7 @@
{"collections.group.parts.part.description.text.size",
st_collections_group_parts_part_description_text_size},
{"collections.group.parts.part.description.text.fit",
st_collections_group_parts_part_description_text_fit},
{"collections.group.parts.part.description.text.min",
st_collections_group_parts_part_description_text_min},
+ {"collections.group.parts.part.description.text.max",
st_collections_group_parts_part_description_text_max},
{"collections.group.parts.part.description.text.align",
st_collections_group_parts_part_description_text_align},
{"collections.group.parts.part.description.text.source",
st_collections_group_parts_part_description_text_source},
{"collections.group.parts.part.description.text.text_source",
st_collections_group_parts_part_description_text_text_source},
@@ -2141,6 +2143,33 @@
if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
ed->text.min_x = parse_bool(0);
ed->text.min_y = parse_bool(1);
+}
+
+static void
+st_collections_group_parts_part_description_text_max(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+ Edje_Part_Description *ed;
+
+ check_arg_count(2);
+
+ pc = evas_list_data(evas_list_last(edje_collections));
+ ep = evas_list_data(evas_list_last(pc->parts));
+
+ if ((ep->type != EDJE_PART_TYPE_TEXT) &&
+ (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
+ {
+ fprintf(stderr, "%s: Error. parse error %s:%i. "
+ "text attributes in non-TEXT part.\n",
+ progname, file_in, line - 1);
+ exit(-1);
+ }
+
+ ed = ep->default_desc;
+ if (ep->other_desc) ed = evas_list_data(evas_list_last(ep->other_desc));
+ ed->text.max_x = parse_bool(0);
+ ed->text.max_y = parse_bool(1);
}
static void
===================================================================
RCS file: /cvs/e/e17/libs/edje/src/bin/edje_test_main.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- edje_test_main.c 19 Jan 2006 12:12:46 -0000 1.4
+++ edje_test_main.c 9 Oct 2006 06:01:13 -0000 1.5
@@ -290,6 +290,7 @@
main(int argc, char **argv)
{
Evas_Object *o;
+ Evas_Coord mw, mh;
if (argc != 3)
{
@@ -344,6 +345,8 @@
evas_object_show(o);
o_edje = o;
+// edje_object_size_min_calc(o, &mw, &mh);
+// evas_object_resize(o_edje, mw, mh);
/*
{
Evas_Coord mw, mh;
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs