summaryrefslogtreecommitdiff
path: root/legacy/edje/src/bin/edje_cc_handlers.c
diff options
context:
space:
mode:
Diffstat (limited to 'legacy/edje/src/bin/edje_cc_handlers.c')
-rw-r--r--legacy/edje/src/bin/edje_cc_handlers.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/legacy/edje/src/bin/edje_cc_handlers.c b/legacy/edje/src/bin/edje_cc_handlers.c
index 5836704..0c97d59 100644
--- a/legacy/edje/src/bin/edje_cc_handlers.c
+++ b/legacy/edje/src/bin/edje_cc_handlers.c
@@ -198,6 +198,7 @@ static void st_collections_group_parts_part_description_text_font(void);
198static void st_collections_group_parts_part_description_text_style(void); 198static void st_collections_group_parts_part_description_text_style(void);
199static void st_collections_group_parts_part_description_text_repch(void); 199static void st_collections_group_parts_part_description_text_repch(void);
200static void st_collections_group_parts_part_description_text_size(void); 200static void st_collections_group_parts_part_description_text_size(void);
201static void st_collections_group_parts_part_description_text_size_range(void);
201static void st_collections_group_parts_part_description_text_fit(void); 202static void st_collections_group_parts_part_description_text_fit(void);
202static void st_collections_group_parts_part_description_text_min(void); 203static void st_collections_group_parts_part_description_text_min(void);
203static void st_collections_group_parts_part_description_text_max(void); 204static void st_collections_group_parts_part_description_text_max(void);
@@ -449,6 +450,7 @@ New_Statement_Handler statement_handlers[] =
449 {"collections.group.parts.part.description.text.style", st_collections_group_parts_part_description_text_style}, 450 {"collections.group.parts.part.description.text.style", st_collections_group_parts_part_description_text_style},
450 {"collections.group.parts.part.description.text.repch", st_collections_group_parts_part_description_text_repch}, 451 {"collections.group.parts.part.description.text.repch", st_collections_group_parts_part_description_text_repch},
451 {"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size}, 452 {"collections.group.parts.part.description.text.size", st_collections_group_parts_part_description_text_size},
453 {"collections.group.parts.part.description.text.size_range", st_collections_group_parts_part_description_text_size_range},
452 {"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit}, 454 {"collections.group.parts.part.description.text.fit", st_collections_group_parts_part_description_text_fit},
453 {"collections.group.parts.part.description.text.min", st_collections_group_parts_part_description_text_min}, 455 {"collections.group.parts.part.description.text.min", st_collections_group_parts_part_description_text_min},
454 {"collections.group.parts.part.description.text.max", st_collections_group_parts_part_description_text_max}, 456 {"collections.group.parts.part.description.text.max", st_collections_group_parts_part_description_text_max},
@@ -5345,6 +5347,54 @@ st_collections_group_parts_part_description_text_size(void)
5345 @page edcref 5347 @page edcref
5346 5348
5347 @property 5349 @property
5350 size_range
5351 @parameters
5352 [font min size in points (pt)] [font max size in points (pt)]
5353 @effect
5354 Sets the allowed font size for the text part. Setting min and max to 0
5355 means we won't restrict the sizing (default).
5356 @endproperty
5357 @since 1.1.0
5358*/
5359static void
5360st_collections_group_parts_part_description_text_size_range(void)
5361{
5362 Edje_Part_Collection *pc;
5363 Edje_Part *ep;
5364 Edje_Part_Description_Text *ed;
5365
5366 check_arg_count(2);
5367
5368 pc = eina_list_data_get(eina_list_last(edje_collections));
5369 ep = pc->parts[pc->parts_count - 1];
5370
5371 if ((ep->type != EDJE_PART_TYPE_TEXT) &&
5372 (ep->type != EDJE_PART_TYPE_TEXTBLOCK))
5373 {
5374 ERR("%s: Error. parse error %s:%i. "
5375 "text attributes in non-TEXT part.",
5376 progname, file_in, line - 1);
5377 exit(-1);
5378 }
5379
5380 ed = (Edje_Part_Description_Text*) ep->default_desc;
5381 if (ep->other.desc_count) ed = (Edje_Part_Description_Text*) ep->other.desc[ep->other.desc_count - 1];
5382
5383 ed->text.size_range_min = parse_int_range(0, 0, 255);
5384 ed->text.size_range_max = parse_int_range(1, 0, 255);
5385 if (ed->text.size_range_min > ed->text.size_range_max)
5386 {
5387 ERR("%s: Error. parse error %s:%i. "
5388 "min size is bigger than max size.",
5389 progname, file_in, line - 1);
5390 exit(-1);
5391 }
5392}
5393
5394/**
5395 @page edcref
5396
5397 @property
5348 fit 5398 fit
5349 @parameters 5399 @parameters
5350 [horizontal] [vertical] 5400 [horizontal] [vertical]