forked from enlightenment/efl
elementary/label - support slide effect of the label widget optionally.
now it supports slides the texts if the label area is smaller than the text width length. deprecated - elm_label_slide_set()/get() added - elm_label_slide_mode_set()/get() SVN revision: 82169
This commit is contained in:
parent
103d2e27ad
commit
724a0b0f2d
|
@ -882,3 +882,7 @@
|
||||||
2012-01-03 Prince Dubey Kumar <prince.dubey@samsung.com>
|
2012-01-03 Prince Dubey Kumar <prince.dubey@samsung.com>
|
||||||
|
|
||||||
* Fix gengrid region_show/bring_in and add test
|
* Fix gengrid region_show/bring_in and add test
|
||||||
|
|
||||||
|
2012-01-04 ChunEon Park <hermet@hermet.pe.kr>
|
||||||
|
|
||||||
|
* Deprecate elm_label_slide_set()/get() and added elm_label_slide_mode_set()/get() instead.
|
||||||
|
|
|
@ -26,6 +26,7 @@ Additions:
|
||||||
* Add elm_dbus_menu to support D-Bus external menus.
|
* Add elm_dbus_menu to support D-Bus external menus.
|
||||||
* Add configuration: ELM_EXTERNAL_MENU, to switch between internal and extenal menus
|
* Add configuration: ELM_EXTERNAL_MENU, to switch between internal and extenal menus
|
||||||
* Add elm_systray.[ch]: Add support to D-Bus systray icons.
|
* Add elm_systray.[ch]: Add support to D-Bus systray icons.
|
||||||
|
* Add elm_label_slide_mode_set(), elm_label_slide_mode_get()
|
||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
@ -121,6 +122,7 @@ Removals:
|
||||||
* All internal widget hooks (and related macros) were removed, due
|
* All internal widget hooks (and related macros) were removed, due
|
||||||
to deprecation. Thus, people using that (unstable) API will have
|
to deprecation. Thus, people using that (unstable) API will have
|
||||||
to adapt themselves.
|
to adapt themselves.
|
||||||
|
* Deprecate elm_label_slide_set(), elm_label_slide_get().
|
||||||
|
|
||||||
Changes since Elementary 1.0.0:
|
Changes since Elementary 1.0.0:
|
||||||
-------------------------
|
-------------------------
|
||||||
|
|
|
@ -453,3 +453,37 @@ EINA_DEPRECATED EAPI void elm_notify_orient_set(Evas_Obj
|
||||||
* @deprecated Use elm_notify_align_get instead.
|
* @deprecated Use elm_notify_align_get instead.
|
||||||
*/
|
*/
|
||||||
EINA_DEPRECATED EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj);
|
EINA_DEPRECATED EAPI Elm_Notify_Orient elm_notify_orient_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set slide effect of label widget.
|
||||||
|
*
|
||||||
|
* @param obj The label object
|
||||||
|
* @param slide If true, slide effect will be shown
|
||||||
|
*
|
||||||
|
* If set to true, the text of the label will slide/scroll through the length of
|
||||||
|
* label.
|
||||||
|
*
|
||||||
|
* @warning This only works with the themes "slide_short", "slide_long" and
|
||||||
|
* "slide_bounce".
|
||||||
|
* @warning This doesn't work if the line wrap(elm_label_line_wrap_set()) or
|
||||||
|
* ellipsis(elm_label_ellipsis_set()) is set.
|
||||||
|
*
|
||||||
|
* @deprecated see elm_label_slide_mode_set() instead.
|
||||||
|
*
|
||||||
|
* @ingroup Label
|
||||||
|
*/
|
||||||
|
EINA_DEPRECATED EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get whether slide effect is shown or not.
|
||||||
|
*
|
||||||
|
* @param obj The label object
|
||||||
|
* @return If true, slide effect is shown.
|
||||||
|
*
|
||||||
|
* @see elm_label_slide_set()
|
||||||
|
*
|
||||||
|
* @deprecated see elm_label_slide_mode_get() instead.
|
||||||
|
*
|
||||||
|
* @ingroup Label
|
||||||
|
*/
|
||||||
|
EINA_DEPRECATED EAPI Eina_Bool elm_label_slide_get(const Evas_Object *obj);
|
||||||
|
|
|
@ -62,6 +62,7 @@ _label_format_set(Evas_Object *obj,
|
||||||
static void
|
static void
|
||||||
_label_slide_change(Evas_Object *obj)
|
_label_slide_change(Evas_Object *obj)
|
||||||
{
|
{
|
||||||
|
Evas_Object *tb;
|
||||||
char *plaintxt;
|
char *plaintxt;
|
||||||
int plainlen = 0;
|
int plainlen = 0;
|
||||||
|
|
||||||
|
@ -71,7 +72,7 @@ _label_slide_change(Evas_Object *obj)
|
||||||
// doesn't support multiline slide effect
|
// doesn't support multiline slide effect
|
||||||
if (sd->linewrap)
|
if (sd->linewrap)
|
||||||
{
|
{
|
||||||
sd->slide = EINA_FALSE;
|
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
|
||||||
WRN("Doesn't support slide effect for multiline! : label=%p", obj);
|
WRN("Doesn't support slide effect for multiline! : label=%p", obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -87,12 +88,31 @@ _label_slide_change(Evas_Object *obj)
|
||||||
// too short to slide label
|
// too short to slide label
|
||||||
if (plainlen < 1)
|
if (plainlen < 1)
|
||||||
{
|
{
|
||||||
sd->slide = EINA_FALSE;
|
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sd->slide)
|
if (sd->slide_mode != ELM_LABEL_SLIDE_MODE_NONE)
|
||||||
{
|
{
|
||||||
|
//slide only if the slide area is smaller than text width size.
|
||||||
|
if (sd->slide_mode == ELM_LABEL_SLIDE_MODE_AUTO)
|
||||||
|
{
|
||||||
|
tb = (Evas_Object *) edje_object_part_object_get(wd->resize_obj,
|
||||||
|
"elm.text");
|
||||||
|
if (tb)
|
||||||
|
{
|
||||||
|
Evas_Coord w, tb_w;
|
||||||
|
|
||||||
|
evas_object_textblock_size_formatted_get(tb, &tb_w, NULL);
|
||||||
|
evas_object_geometry_get(wd->resize_obj,
|
||||||
|
NULL, NULL, &w, NULL);
|
||||||
|
if ((tb_w > 0) && (tb_w < w))
|
||||||
|
{
|
||||||
|
sd->slide_mode = ELM_LABEL_SLIDE_MODE_NONE;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Edje_Message_Float_Set *msg =
|
Edje_Message_Float_Set *msg =
|
||||||
alloca(sizeof(Edje_Message_Float_Set) + (sizeof(double)));
|
alloca(sizeof(Edje_Message_Float_Set) + (sizeof(double)));
|
||||||
|
|
||||||
|
@ -561,41 +581,59 @@ _ellipsis_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_label_slide_set(Evas_Object *obj,
|
elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode)
|
||||||
Eina_Bool slide)
|
|
||||||
{
|
{
|
||||||
ELM_LABEL_CHECK(obj);
|
ELM_LABEL_CHECK(obj);
|
||||||
eo_do(obj, elm_obj_label_slide_set(slide));
|
eo_do(obj, elm_obj_label_slide_mode_set(mode));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_slide_set(Eo *obj, void *_pd, va_list *list)
|
_slide_mode_set(Eo *obj, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
Eina_Bool slide = va_arg(*list, int);
|
Elm_Label_Slide_Mode mode = va_arg(*list, Elm_Label_Slide_Mode);
|
||||||
Elm_Label_Smart_Data *sd = _pd;
|
Elm_Label_Smart_Data *sd = _pd;
|
||||||
|
if (sd->slide_mode == mode) return;
|
||||||
if (sd->slide == slide) return;
|
sd->slide_mode = mode;
|
||||||
sd->slide = slide;
|
|
||||||
|
|
||||||
_label_slide_change(obj);
|
_label_slide_change(obj);
|
||||||
elm_layout_sizing_eval(obj);
|
elm_layout_sizing_eval(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Eina_Bool
|
EAPI Elm_Label_Slide_Mode
|
||||||
elm_label_slide_get(const Evas_Object *obj)
|
elm_label_slide_mode_get(const Evas_Object *obj)
|
||||||
{
|
{
|
||||||
ELM_LABEL_CHECK(obj) EINA_FALSE;
|
ELM_LABEL_CHECK(obj) ELM_LABEL_SLIDE_MODE_NONE;
|
||||||
Eina_Bool ret = EINA_FALSE;
|
Elm_Label_Slide_Mode ret = ELM_LABEL_SLIDE_MODE_NONE;
|
||||||
eo_do((Eo *) obj, elm_obj_label_slide_get(&ret));
|
eo_do((Eo *) obj, elm_obj_label_slide_mode_get(&ret));
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_slide_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
_slide_mode_get(Eo *obj __UNUSED__, void *_pd, va_list *list)
|
||||||
{
|
{
|
||||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
Elm_Label_Slide_Mode *ret = va_arg(*list, Elm_Label_Slide_Mode *);
|
||||||
Elm_Label_Smart_Data *sd = _pd;
|
Elm_Label_Smart_Data *sd = _pd;
|
||||||
*ret = sd->slide;
|
*ret = sd->slide_mode;
|
||||||
|
}
|
||||||
|
|
||||||
|
EINA_DEPRECATED EAPI void
|
||||||
|
elm_label_slide_set(Evas_Object *obj,
|
||||||
|
Eina_Bool slide)
|
||||||
|
{
|
||||||
|
if (slide)
|
||||||
|
elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_ALWAYS);
|
||||||
|
else
|
||||||
|
elm_label_slide_mode_set(obj, ELM_LABEL_SLIDE_MODE_NONE);
|
||||||
|
}
|
||||||
|
|
||||||
|
EINA_DEPRECATED EAPI Eina_Bool
|
||||||
|
elm_label_slide_get(const Evas_Object *obj)
|
||||||
|
{
|
||||||
|
ELM_LABEL_CHECK(obj) EINA_FALSE;
|
||||||
|
Eina_Bool ret = EINA_FALSE;
|
||||||
|
if (elm_label_slide_mode_get(obj) == ELM_LABEL_SLIDE_MODE_ALWAYS)
|
||||||
|
ret = EINA_TRUE;
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
|
@ -683,8 +721,8 @@ _class_constructor(Eo_Class *klass)
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), _wrap_width_get),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET), _wrap_width_get),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), _ellipsis_set),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET), _ellipsis_set),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), _ellipsis_get),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), _ellipsis_get),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_SET), _slide_set),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), _slide_mode_set),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GET), _slide_get),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), _slide_mode_get),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), _slide_duration_set),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET), _slide_duration_set),
|
||||||
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), _slide_duration_get),
|
EO_OP_FUNC(ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), _slide_duration_get),
|
||||||
EO_OP_FUNC_SENTINEL
|
EO_OP_FUNC_SENTINEL
|
||||||
|
@ -698,8 +736,8 @@ static const Eo_Op_Description op_desc[] = {
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET, "Get wrap width of the label."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET, "Get wrap width of the label."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET, "Set the ellipsis behavior of the label."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET, "Set the ellipsis behavior of the label."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET, "Get the ellipsis behavior of the label."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET, "Get the ellipsis behavior of the label."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_SET, "Set slide effect of label widget."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET, "Set slide effect mode of label widget."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_GET, "Get whether slide effect is shown or not."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET, "Get current slide effect mode."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET, "Set the slide duration (speed) of the label."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET, "Set the slide duration (speed) of the label."),
|
||||||
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET, "Get the slide duration(speed) of the label."),
|
EO_OP_DESCRIPTION(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET, "Get the slide duration(speed) of the label."),
|
||||||
EO_OP_DESCRIPTION_SENTINEL
|
EO_OP_DESCRIPTION_SENTINEL
|
||||||
|
|
|
@ -53,8 +53,8 @@ enum
|
||||||
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET,
|
ELM_OBJ_LABEL_SUB_ID_WRAP_WIDTH_GET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET,
|
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_SET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET,
|
ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_SLIDE_SET,
|
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_SLIDE_GET,
|
ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET,
|
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_SET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET,
|
ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET,
|
||||||
ELM_OBJ_LABEL_SUB_ID_LAST
|
ELM_OBJ_LABEL_SUB_ID_LAST
|
||||||
|
@ -136,28 +136,28 @@ enum
|
||||||
#define elm_obj_label_ellipsis_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
#define elm_obj_label_ellipsis_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_ELLIPSIS_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_label_slide_set
|
* @def elm_obj_label_slide_mode_set
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*
|
*
|
||||||
* @brief Set slide effect of label widget.
|
* @brief Set slide effect mode of label widget.
|
||||||
*
|
*
|
||||||
* @param[in] slide
|
* @param[in] mode
|
||||||
*
|
*
|
||||||
* @see elm_label_slide_set
|
* @see elm_label_slide_mode_set
|
||||||
*/
|
*/
|
||||||
#define elm_obj_label_slide_set(slide) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_SET), EO_TYPECHECK(Eina_Bool, slide)
|
#define elm_obj_label_slide_mode_set(mode) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_SET), EO_TYPECHECK(Elm_Label_Slide_Mode, mode)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_label_slide_get
|
* @def elm_obj_label_slide_mode_get
|
||||||
* @since 1.8
|
* @since 1.8
|
||||||
*
|
*
|
||||||
* @brief Get whether slide effect is shown or not.
|
* @brief Get current slide effect mode.
|
||||||
*
|
*
|
||||||
* @param[out] ret
|
* @param[out] ret
|
||||||
*
|
*
|
||||||
* @see elm_label_slide_get
|
* @see elm_label_slide_mode_get
|
||||||
*/
|
*/
|
||||||
#define elm_obj_label_slide_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_GET), EO_TYPECHECK(Eina_Bool *, ret)
|
#define elm_obj_label_slide_mode_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_MODE_GET), EO_TYPECHECK(Elm_Label_Slide_Mode *, ret)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def elm_obj_label_slide_duration_set
|
* @def elm_obj_label_slide_duration_set
|
||||||
|
@ -182,6 +182,14 @@ enum
|
||||||
* @see elm_label_slide_duration_get
|
* @see elm_label_slide_duration_get
|
||||||
*/
|
*/
|
||||||
#define elm_obj_label_slide_duration_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)
|
#define elm_obj_label_slide_duration_get(ret) ELM_OBJ_LABEL_ID(ELM_OBJ_LABEL_SUB_ID_SLIDE_DURATION_GET), EO_TYPECHECK(double *, ret)
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
ELM_LABEL_SLIDE_MODE_NONE = 0, /**< no slide effect */
|
||||||
|
ELM_LABEL_SLIDE_MODE_AUTO, /**< slide only if the label area is bigger than the text width length */
|
||||||
|
ELM_LABEL_SLIDE_MODE_ALWAYS /**< slide always */
|
||||||
|
} Elm_Label_Slide_Mode;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Add a new label to the parent
|
* @brief Add a new label to the parent
|
||||||
*
|
*
|
||||||
|
@ -274,36 +282,6 @@ EAPI void elm_label_ellipsis_set(Evas_Object *obj, Eina_B
|
||||||
*/
|
*/
|
||||||
EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
|
EAPI Eina_Bool elm_label_ellipsis_get(const Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Set slide effect of label widget.
|
|
||||||
*
|
|
||||||
* @param obj The label object
|
|
||||||
* @param slide If true, slide effect will be shown
|
|
||||||
*
|
|
||||||
* If set to true, the text of the label will slide/scroll through the length of
|
|
||||||
* label.
|
|
||||||
*
|
|
||||||
* @warning This only works with the themes "slide_short", "slide_long" and
|
|
||||||
* "slide_bounce".
|
|
||||||
* @warning This doesn't work if the line wrap(elm_label_line_wrap_set()) or
|
|
||||||
* ellipsis(elm_label_ellipsis_set()) is set.
|
|
||||||
*
|
|
||||||
* @ingroup Label
|
|
||||||
*/
|
|
||||||
EAPI void elm_label_slide_set(Evas_Object *obj, Eina_Bool slide);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @brief Get whether slide effect is shown or not.
|
|
||||||
*
|
|
||||||
* @param obj The label object
|
|
||||||
* @return If true, slide effect is shown.
|
|
||||||
*
|
|
||||||
* @see elm_label_slide_set()
|
|
||||||
*
|
|
||||||
* @ingroup Label
|
|
||||||
*/
|
|
||||||
EAPI Eina_Bool elm_label_slide_get(const Evas_Object *obj);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Set the slide duration (speed) of the label
|
* @brief Set the slide duration (speed) of the label
|
||||||
*
|
*
|
||||||
|
@ -327,6 +305,54 @@ EAPI void elm_label_slide_duration_set(Evas_Object *obj,
|
||||||
*/
|
*/
|
||||||
EAPI double elm_label_slide_duration_get(const Evas_Object *obj);
|
EAPI double elm_label_slide_duration_get(const Evas_Object *obj);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Slide only if the
|
||||||
|
*
|
||||||
|
* @param obj The label object
|
||||||
|
* @param duration The duration in seconds in moving text from slide begin position
|
||||||
|
* to slide end position
|
||||||
|
*
|
||||||
|
* @ingroup Label
|
||||||
|
*/
|
||||||
|
EAPI void elm_label_slide_area_limit_set(Evas_Object *obj, Eina_Bool limit);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Set the slide mode of the label widget.
|
||||||
|
*
|
||||||
|
* @param obj The label object
|
||||||
|
* @param mode The slide mode
|
||||||
|
*
|
||||||
|
* elm_label_slide_mode_set() changes label slide mode.
|
||||||
|
* By default, slide mode is none. Possible values for @p mode are:
|
||||||
|
* @li ELM_LABEL_SLIDE_MODE_NONE - no slide effect
|
||||||
|
* @li ELM_LABEL_SLIDE_MODE_AUTO - slide only if the label area is bigger than
|
||||||
|
* the text width length
|
||||||
|
* @li ELM_LABEL_SLIDE_MODE_ALWAYS -slide always
|
||||||
|
*
|
||||||
|
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS only work
|
||||||
|
* with the themes "slide_short", "slide_long" and "slide_bounce".
|
||||||
|
* @warning ELM_LABEL_SLIDE_MODE_AUTO, ELM_LABEL_SLIDE_MODE_ALWAYS don't work
|
||||||
|
* if the line wrap(elm_label_line_wrap_set()) or
|
||||||
|
* ellipsis(elm_label_ellipsis_set()) is set.
|
||||||
|
*
|
||||||
|
* @see elm_label_slide_mode_get().
|
||||||
|
*
|
||||||
|
* @ingroup Label
|
||||||
|
*/
|
||||||
|
EAPI void elm_label_slide_mode_set(Evas_Object *obj, Elm_Label_Slide_Mode mode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Get the slide mode of the label widget.
|
||||||
|
*
|
||||||
|
* @param obj The label object
|
||||||
|
* @return The slide mode
|
||||||
|
*
|
||||||
|
* @see elm_label_slide_set()
|
||||||
|
*
|
||||||
|
* @ingroup Label
|
||||||
|
*/
|
||||||
|
EAPI Elm_Label_Slide_Mode elm_label_slide_mode_get(const Evas_Object *obj);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @}
|
* @}
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -18,9 +18,9 @@ struct _Elm_Label_Smart_Data
|
||||||
Evas_Coord lastw;
|
Evas_Coord lastw;
|
||||||
Evas_Coord wrap_w;
|
Evas_Coord wrap_w;
|
||||||
Elm_Wrap_Type linewrap;
|
Elm_Wrap_Type linewrap;
|
||||||
|
Elm_Label_Slide_Mode slide_mode;
|
||||||
|
|
||||||
Eina_Bool ellipsis : 1;
|
Eina_Bool ellipsis : 1;
|
||||||
Eina_Bool slide : 1;
|
|
||||||
Eina_Bool slide_ellipsis : 1;
|
Eina_Bool slide_ellipsis : 1;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue