static void st_collections_group_parts_part_description_table_homogeneous(void);
static void st_collections_group_parts_part_description_table_align(void);
static void st_collections_group_parts_part_description_table_padding(void);
+static void st_collections_group_parts_part_description_table_min(void);
static void st_collections_group_parts_part_description_map_perspective(void);
static void st_collections_group_parts_part_description_map_light(void);
static void st_collections_group_parts_part_description_map_rotation_center(void);
{"collections.group.parts.part.description.table.homogeneous", st_collections_group_parts_part_description_table_homogeneous},
{"collections.group.parts.part.description.table.align", st_collections_group_parts_part_description_table_align},
{"collections.group.parts.part.description.table.padding", st_collections_group_parts_part_description_table_padding},
+ {"collections.group.parts.part.description.table.min", st_collections_group_parts_part_description_table_min},
{"collections.group.parts.part.description.map.perspective", st_collections_group_parts_part_description_map_perspective},
{"collections.group.parts.part.description.map.light", st_collections_group_parts_part_description_map_light},
{"collections.group.parts.part.description.map.rotation.center", st_collections_group_parts_part_description_map_rotation_center},
homogeneous: TABLE;
padding: 0 2;
align: 0.5 0.5;
+ min: 0 0;
}
..
}
@effect
Sets the space between cells in pixels. Defaults to 0 0.
@endproperty
+
+ @property
+ min
+ @parameters
+ [horizontal] [vertical]
+ @effect
+ When any of the parameters is enabled (1) it forces the minimum size of
+ the table to be equal to the minimum size of the items. The default
+ value is "0 0".
+ @endproperty
*/
static void st_collections_group_parts_part_description_table_homogeneous(void)
{
ed->table.padding.y = parse_int_range(1, 0, 0x7fffffff);
}
+static void
+st_collections_group_parts_part_description_table_min(void)
+{
+ Edje_Part_Collection *pc;
+ Edje_Part *ep;
+ Edje_Part_Description_Table *ed;
+
+ check_arg_count(2);
+
+ pc = eina_list_data_get(eina_list_last(edje_collections));
+ ep = pc->parts[pc->parts_count - 1];
+
+ if (ep->type != EDJE_PART_TYPE_TABLE)
+ {
+ ERR("%s: Error. parse error %s:%i. "
+ "box attributes in non-TABLE part.",
+ progname, file_in, line - 1);
+ exit(-1);
+ }
+
+ ed = (Edje_Part_Description_Table*) ep->default_desc;
+ if (ep->other.desc_count) ed = (Edje_Part_Description_Table*) ep->other.desc[ep->other.desc_count - 1];
+
+ ed->table.min.h = parse_bool(0);
+ ed->table.min.v = parse_bool(1);
+}
/**
@edcsection{description_map,Map state description sub blocks}
_edje_part_recalc_single_textblock(sc, ed, ep, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
else if (ep->part->type == EDJE_PART_TYPE_TEXT)
_edje_part_recalc_single_text(sc, ed, ep, (Edje_Part_Description_Text*) desc, (Edje_Part_Description_Text*) chosen_desc, params, &minw, &minh, &maxw, &maxh);
+
+ if ((ep->part->type == EDJE_PART_TYPE_TABLE) &&
+ (((((Edje_Part_Description_Table *)chosen_desc)->table.min.h) ||
+ (((Edje_Part_Description_Table *)chosen_desc)->table.min.v))))
+ {
+ Evas_Coord lminw = 0, lminh = 0;
+
+ evas_object_smart_need_recalculate_set(ep->object, 1);
+ evas_object_smart_calculate(ep->object);
+ evas_object_size_hint_min_get(ep->object, &lminw, &lminh);
+ if (((Edje_Part_Description_Table *)chosen_desc)->table.min.h)
+ {
+ if (lminw > minw) minw = lminw;
+ }
+ if (((Edje_Part_Description_Table *)chosen_desc)->table.min.v)
+ {
+ if (lminh > minh) minh = lminh;
+ }
+ }
+ else if ((ep->part->type == EDJE_PART_TYPE_BOX) &&
+ ((((Edje_Part_Description_Box *)chosen_desc)->box.min.h) ||
+ (((Edje_Part_Description_Box *)chosen_desc)->box.min.v)))
+ {
+ Evas_Coord lminw = 0, lminh = 0;
+
+ evas_object_smart_need_recalculate_set(ep->object, 1);
+ evas_object_smart_calculate(ep->object);
+ evas_object_size_hint_min_get(ep->object, &lminw, &lminh);
+ if (((Edje_Part_Description_Box *)chosen_desc)->box.min.h)
+ {
+ if (lminw > minw) minw = lminw;
+ }
+ if (((Edje_Part_Description_Box *)chosen_desc)->box.min.v)
+ {
+ if (lminh > minh) minh = lminh;
+ }
+ }
/* remember what our size is BEFORE we go limit it */
params->req.x = params->x;
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_table, Edje_Part_Description_Table, "table.align.y", table.align.y, EDJE_T_FLOAT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_table, Edje_Part_Description_Table, "table.padding.x", table.padding.x, EET_T_INT);
EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_table, Edje_Part_Description_Table, "table.padding.y", table.padding.y, EET_T_INT);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_table, Edje_Part_Description_Table, "table.min.h", table.min.h, EET_T_UCHAR);
+ EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_description_table, Edje_Part_Description_Table, "table.min.v", table.min.v, EET_T_UCHAR);
EET_EINA_FILE_DATA_DESCRIPTOR_CLASS_SET(&eddc, Edje_Part_Description_External);
eddc.func.mem_free = mem_free_external;
int x, y;
} padding;
struct {
- Eina_Bool h, v;
+ unsigned char h, v;
} min;
};
struct {
int x, y;
} padding;
+ struct {
+ unsigned char h, v;
+ } min;
};
struct _Edje_Part_Description_Image