forked from enlightenment/efl
edje: Edje_Edit - add edje_edit_part_multiline functions.
Summary: Add two main functions - edje_edit_part_multiline_get - edje_edit_part_multiline_set Also support multiline into part's source code generation. @feature Reviewers: seoz, Hermet, cedric, raster CC: reutskiy.v.v, cedric Differential Revision: https://phab.enlightenment.org/D951 Signed-off-by: Cedric BAIL <c.bail@partner.samsung.com>
This commit is contained in:
parent
793cef0d04
commit
f587307a94
|
@ -1215,6 +1215,25 @@ EAPI Eina_Bool edje_edit_part_repeat_events_get(Evas_Object *obj, const char *pa
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events);
|
EAPI Eina_Bool edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool repeat_events);
|
||||||
|
|
||||||
|
/** Get multiline for part.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Part to get if editing multiple lines for text or textblock part is enabled.
|
||||||
|
*
|
||||||
|
* @return EINA_TRUE if multiple lines for editing is enabled, EINA_FALSE otherwise
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool edje_edit_part_multiline_get(Evas_Object *obj, const char *part);
|
||||||
|
|
||||||
|
/** Set multiline for part.
|
||||||
|
*
|
||||||
|
* @param obj Object being edited.
|
||||||
|
* @param part Part to set if editing multiple lines for text or textblock part is enabled.
|
||||||
|
* @param multiline EINA_TRUE if multiple lines for editing is enabled, EINA_FALSE otherwise
|
||||||
|
*
|
||||||
|
* @return EINA_TRUE if successful, EINA_FALSE otherwise.
|
||||||
|
*/
|
||||||
|
EAPI Eina_Bool edje_edit_part_multiline_set(Evas_Object *obj, const char *part, Eina_Bool multiline);
|
||||||
|
|
||||||
/** Get precise_is_inside for part.
|
/** Get precise_is_inside for part.
|
||||||
*
|
*
|
||||||
* @param obj Object being edited.
|
* @param obj Object being edited.
|
||||||
|
|
|
@ -2912,6 +2912,32 @@ edje_edit_part_repeat_events_set(Evas_Object *obj, const char *part, Eina_Bool r
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_part_multiline_get(Evas_Object *obj, const char *part)
|
||||||
|
{
|
||||||
|
GET_RP_OR_RETURN(0);
|
||||||
|
|
||||||
|
if ((rp->part->type != EDJE_PART_TYPE_TEXT) &&
|
||||||
|
(rp->part->type != EDJE_PART_TYPE_TEXTBLOCK))
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
return rp->part->multiline;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
edje_edit_part_multiline_set(Evas_Object *obj, const char *part, Eina_Bool multiline)
|
||||||
|
{
|
||||||
|
GET_RP_OR_RETURN(EINA_FALSE);
|
||||||
|
|
||||||
|
if ((!rp->object) ||
|
||||||
|
((rp->part->type != EDJE_PART_TYPE_TEXT) &&
|
||||||
|
(rp->part->type != EDJE_PART_TYPE_TEXTBLOCK)))
|
||||||
|
return EINA_FALSE;
|
||||||
|
|
||||||
|
rp->part->multiline = multiline;
|
||||||
|
return EINA_TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
edje_edit_part_precise_is_inside_get(Evas_Object *obj, const char *part)
|
edje_edit_part_precise_is_inside_get(Evas_Object *obj, const char *part)
|
||||||
{
|
{
|
||||||
|
@ -8168,6 +8194,8 @@ _edje_generate_source_of_part(Evas_Object *obj, Edje_Part *ep, Eina_Strbuf *buf)
|
||||||
BUF_APPEND(I4"precise_is_inside: 1;\n");
|
BUF_APPEND(I4"precise_is_inside: 1;\n");
|
||||||
if (edje_edit_part_access_get(obj, part))
|
if (edje_edit_part_access_get(obj, part))
|
||||||
BUF_APPEND(I4"access: 1;\n");
|
BUF_APPEND(I4"access: 1;\n");
|
||||||
|
if (edje_edit_part_multiline_get(obj, part))
|
||||||
|
BUF_APPEND(I4"multiline: 1;\n");
|
||||||
//TODO Support use_alternate_font_metrics
|
//TODO Support use_alternate_font_metrics
|
||||||
if ((str = edje_edit_part_clip_to_get(obj, part)))
|
if ((str = edje_edit_part_clip_to_get(obj, part)))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue