add more util calls for enty manipulation

SVN revision: 39600
This commit is contained in:
Carsten Haitzler 2009-03-20 15:07:39 +00:00
parent 3a774f6971
commit 4218f905f5
4 changed files with 32 additions and 1 deletions

View File

@ -256,6 +256,7 @@ extern "C" {
EAPI const Eina_List *edje_object_part_text_anchor_geometry_get(const Evas_Object *obj, const char *part, const char *anchor);
EAPI void edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *part, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h);
EAPI void edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part, Evas_Bool allow);
EAPI void edje_object_part_text_select_abort(const Evas_Object *obj, const char *part);
EAPI void edje_object_part_swallow (Evas_Object *obj, const char *part, Evas_Object *obj_swallow);
EAPI void edje_object_part_unswallow (Evas_Object *obj, Evas_Object *obj_swallow);

View File

@ -1482,3 +1482,14 @@ _edje_entry_select_allow_set(Edje_Real_Part *rp, Evas_Bool allow)
Entry *en = rp->entry_data;
en->select_allow = allow;
}
void
_edje_entry_select_abort(Edje_Real_Part *rp)
{
Entry *en = rp->entry_data;
if (en->selecting)
{
en->selecting = 0;
_edje_entry_real_part_configure(rp);
}
}

View File

@ -1307,5 +1307,6 @@ const Eina_List *_edje_entry_anchor_geometry_get(Edje_Real_Part *rp, const char
const Eina_List *_edje_entry_anchors_list(Edje_Real_Part *rp);
void _edje_entry_cursor_geometry_get(Edje_Real_Part *rp, Evas_Coord *cx, Evas_Coord *cy, Evas_Coord *cw, Evas_Coord *ch);
void _edje_entry_select_allow_set(Edje_Real_Part *rp, Evas_Bool allow);
void _edje_entry_select_abort(Edje_Real_Part *rp);
#endif

View File

@ -1101,7 +1101,7 @@ edje_object_part_text_cursor_geometry_get(const Evas_Object *obj, const char *pa
return;
}
/** XX
/** Enables selection if the entyr is an EXPLICIT selection mode type
* @param obj A valid Evas_Object handle
* @param part The part name
*/
@ -1119,6 +1119,24 @@ edje_object_part_text_select_allow_set(const Evas_Object *obj, const char *part,
_edje_entry_select_allow_set(rp, allow);
}
/** Aborts any selection action on a part
* @param obj A valid Evas_Object handle
* @param part The part name
*/
EAPI void
edje_object_part_text_select_abort(const Evas_Object *obj, const char *part)
{
Edje *ed;
Edje_Real_Part *rp;
ed = _edje_fetch(obj);
if ((!ed) || (!part)) return;
rp = _edje_real_part_recursive_get(ed, (char *)part);
if (!rp) return;
if (rp->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_select_abort(rp);
}
/** Swallows an object into the edje
* @param obj A valid Evas_Object handle
* @param part The part name