forked from enlightenment/efl
elementary: add special value del / get funcs to spinner
SVN revision: 77590
This commit is contained in:
parent
93295e2657
commit
e0d1bab54a
|
@ -879,6 +879,48 @@ elm_spinner_special_value_add(Evas_Object *obj,
|
||||||
_label_write(obj);
|
_label_write(obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
elm_spinner_special_value_del(Evas_Object *obj,
|
||||||
|
double value)
|
||||||
|
{
|
||||||
|
Elm_Spinner_Special_Value *sv;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
ELM_SPINNER_CHECK(obj);
|
||||||
|
ELM_SPINNER_DATA_GET(obj, sd);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(sd->special_values, l, sv)
|
||||||
|
{
|
||||||
|
if (sv->value != value)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
sd->special_values = eina_list_remove(sd->special_values, sv);
|
||||||
|
eina_stringshare_del(sv->label);
|
||||||
|
free(sv);
|
||||||
|
_label_write(obj);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI const char *
|
||||||
|
elm_spinner_special_value_get(Evas_Object *obj,
|
||||||
|
double value)
|
||||||
|
{
|
||||||
|
Elm_Spinner_Special_Value *sv;
|
||||||
|
Eina_List *l;
|
||||||
|
|
||||||
|
ELM_SPINNER_CHECK(obj) NULL;
|
||||||
|
ELM_SPINNER_DATA_GET(obj, sd);
|
||||||
|
|
||||||
|
EINA_LIST_FOREACH(sd->special_values, l, sv)
|
||||||
|
{
|
||||||
|
if (sv->value == value)
|
||||||
|
return sv->label;
|
||||||
|
}
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
EAPI void
|
EAPI void
|
||||||
elm_spinner_editable_set(Evas_Object *obj,
|
elm_spinner_editable_set(Evas_Object *obj,
|
||||||
Eina_Bool editable)
|
Eina_Bool editable)
|
||||||
|
|
|
@ -311,10 +311,44 @@ EAPI Eina_Bool elm_spinner_editable_get(const Evas_Object *obj);
|
||||||
* evas_object_show(sp);
|
* evas_object_show(sp);
|
||||||
* @endcode
|
* @endcode
|
||||||
*
|
*
|
||||||
|
* @note If another label was previously set to @p value, it will be replaced
|
||||||
|
* by the new label.
|
||||||
|
*
|
||||||
|
* @see elm_spinner_special_value_get().
|
||||||
|
* @see elm_spinner_special_value_del().
|
||||||
|
*
|
||||||
* @ingroup Spinner
|
* @ingroup Spinner
|
||||||
*/
|
*/
|
||||||
EAPI void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label);
|
EAPI void elm_spinner_special_value_add(Evas_Object *obj, double value, const char *label);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the special string display in the place of the numerical value.
|
||||||
|
*
|
||||||
|
* @param obj The spinner object.
|
||||||
|
* @param value The replaced value.
|
||||||
|
*
|
||||||
|
* It will remove a previously added special value. After this, the spinner
|
||||||
|
* will display the value itself instead of a label.
|
||||||
|
*
|
||||||
|
* @see elm_spinner_special_value_add() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Spinner
|
||||||
|
*/
|
||||||
|
EAPI void elm_spinner_special_value_del(Evas_Object *obj, double value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the special string display in the place of the numerical value.
|
||||||
|
*
|
||||||
|
* @param obj The spinner object.
|
||||||
|
* @param value The replaced value.
|
||||||
|
* @return The used label.
|
||||||
|
*
|
||||||
|
* @see elm_spinner_special_value_add() for more details.
|
||||||
|
*
|
||||||
|
* @ingroup Spinner
|
||||||
|
*/
|
||||||
|
EAPI const char *elm_spinner_special_value_get(Evas_Object *obj, double value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the interval on time updates for an user mouse button hold
|
* Set the interval on time updates for an user mouse button hold
|
||||||
* on spinner widgets' arrows.
|
* on spinner widgets' arrows.
|
||||||
|
|
Loading…
Reference in New Issue