cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f587307a94b358a630f13b92cc8fec89961f5a31

commit f587307a94b358a630f13b92cc8fec89961f5a31
Author: Vorobiov Vitalii <[email protected]>
Date:   Thu Jun 5 19:43:02 2014 +0200

    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 <[email protected]>
---
 src/lib/edje/Edje_Edit.h | 19 +++++++++++++++++++
 src/lib/edje/edje_edit.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)

diff --git a/src/lib/edje/Edje_Edit.h b/src/lib/edje/Edje_Edit.h
index d67cb69..d058c31 100644
--- a/src/lib/edje/Edje_Edit.h
+++ b/src/lib/edje/Edje_Edit.h
@@ -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);
 
+/** 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.
  *
  * @param obj Object being edited.
diff --git a/src/lib/edje/edje_edit.c b/src/lib/edje/edje_edit.c
index 26e2c14..a46cb01 100644
--- a/src/lib/edje/edje_edit.c
+++ b/src/lib/edje/edje_edit.c
@@ -2913,6 +2913,32 @@ edje_edit_part_repeat_events_set(Evas_Object *obj, const 
char *part, Eina_Bool r
 }
 
 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
 edje_edit_part_precise_is_inside_get(Evas_Object *obj, const char *part)
 {
    GET_RP_OR_RETURN(0);
@@ -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");
    if (edje_edit_part_access_get(obj, part))
      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
    if ((str = edje_edit_part_clip_to_get(obj, part)))
      {

-- 


Reply via email to