Add scale set/get to Edje_Edit.

By: Iván Briano <ivan@profusion.mobi>



SVN revision: 49746
This commit is contained in:
Iván Briano 2010-06-18 22:08:05 +00:00
parent fe6fe835a5
commit 47a7d86e5c
2 changed files with 41 additions and 3 deletions

View File

@ -917,11 +917,31 @@ EAPI Evas_Event_Flags edje_edit_part_ignore_flags_get(Evas_Object *obj, const ch
/** Set repeat_events for part.
*
* @param obj Object bein edited.
* @oaram part Part to set which event flags will be ignored
* @param obj Object being edited.
* @param part Part to set which event flags will be ignored
*/
EAPI void edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_Flags ignore_flags);
/** Set scale property for the part.
*
* This property tells Edje that the given part should be scaled by the
* Edje scale factor.
*
* @param obj Object being edited.
* @param part Part to set scale for.
* @param scale Scale value to set.
*/
EAPI void edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale);
/** Get scale for the part.
*
* @param obj Object being edited.
* @param part Part to get the scale value of.
*
* @return Whether scale is on (EINA_TRUE) or not.
*/
EAPI Eina_Bool edje_edit_part_scale_get(Evas_Object *obj, const char *part);
/** Get horizontal dragable state for part.
*
* @param obj Object being edited.

View File

@ -2465,6 +2465,23 @@ edje_edit_part_ignore_flags_set(Evas_Object *obj, const char *part, Evas_Event_F
rp->part->ignore_flags = ignore_flags;
}
EAPI void
edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale)
{
GET_RP_OR_RETURN();
rp->part->scale = scale;
edje_object_calc_force(obj);
}
EAPI Eina_Bool
edje_edit_part_scale_get(Evas_Object *obj, const char *part)
{
GET_RP_OR_RETURN(EINA_FALSE);
return rp->part->scale;
}
EAPI const char *
edje_edit_part_source_get(Evas_Object *obj, const char *part)
{
@ -6659,8 +6676,9 @@ _edje_generate_source_of_part(Evas_Object *obj, const char *part, Eina_Strbuf *b
BUF_APPEND(I4"mouse_events: 0;\n");
if (edje_edit_part_repeat_events_get(obj, part))
BUF_APPEND(I4"repeat_events: 1;\n");
if (edje_edit_part_scale_get(obj, part))
BUF_APPEND(I4"scale: 1;\n");
//TODO Support ignore_flags
//TODO Support scale
//TODO Support pointer_mode
//TODO Support precise_is_inside
//TODO Support use_alternate_font_metrics