*/
EAPI Eina_Bool edje_edit_part_pointer_mode_set(Evas_Object *obj, const char *part, Evas_Object_Pointer_Mode pointer_mode);
+/** Get cursor_mode of a part.
+ *
+ * Note that Cursor Mode can be:
+ * 0 - UNDER cursor mode means the cursor will draw below the character pointed
+ * at. That's the default.
+ * 1 - BEFORE cursor mode means the cursor is drawn as a vertical line before
+ * the current character, just like many other GUI toolkits handle it.
+ *
+ * @param obj Object being edited.
+ * @param part Part name to get it's cursor_mode.
+ *
+ * @return Ponter Mode of the part.
+ */
+EAPI unsigned char edje_edit_part_cursor_mode_get(Evas_Object *obj, const char *part);
+
+/** Get pointer_mode of a part.
+ *
+ * Note that Cursor Mode can be:
+ * 0 - UNDER cursor mode means the cursor will draw below the character pointed
+ * at. That's the default.
+ * 1 - BEFORE cursor mode means the cursor is drawn as a vertical line before
+ * the current character, just like many other GUI toolkits handle it.
+ *
+ * @param obj Object being edited.
+ * @param part Part name to get it's pointer_mode.
+ * @param pointer_mode Pointer Mode.
+ *
+ * @return EINA_TRUE if successful, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool edje_edit_part_cursor_mode_set(Evas_Object *obj, const char *part, unsigned char cursor_mode);
+
/** Set scale property for the part.
*
* This property tells Edje that the given part should be scaled by the
return EINA_TRUE;
}
+EAPI unsigned char
+edje_edit_part_cursor_mode_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 0;
+
+ return rp->part->cursor_mode;
+}
+
+EAPI Eina_Bool
+edje_edit_part_cursor_mode_set(Evas_Object *obj, const char *part, unsigned char cursor_mode)
+{
+ 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->cursor_mode = cursor_mode;
+ return EINA_TRUE;
+}
+
EAPI Eina_Bool
edje_edit_part_scale_set(Evas_Object *obj, const char *part, Eina_Bool scale)
{
//TODO Support ignore_flags
if (edje_edit_part_pointer_mode_get(obj, part) == EVAS_OBJECT_POINTER_MODE_NOGRAB)
BUF_APPEND(I4"pointer_mode: NOGRAB;\n");
+ if (edje_edit_part_cursor_mode_get(obj, part) == 1)
+ BUF_APPEND(I4"cursor_mode: BEFORE;\n");
if (edje_edit_part_precise_is_inside_get(obj, part))
BUF_APPEND(I4"precise_is_inside: 1;\n");
if (edje_edit_part_access_get(obj, part))