* diskselector will display first item after last, and last previous to
* the first one. So, as you can see, @b Sa will appears on left side
* of selected @b Sunday. This property is set with
- * elm_diskselector_round_set().
+ * elm_diskselector_round_enabled_set().
*
* Also, we decide to display only 2 character for side labels, instead of 3.
- * For this we call elm_diskselector_side_label_length_set(). As result,
+ * For this we call elm_diskselector_side_text_max_length_set(). As result,
* we'll see @b Mo displayed instead of @b Mon, when @b Monday is on a
* side position.
*
elm_diskselector_item_append(di, "December", NULL, NULL, NULL);
elm_diskselector_item_selected_set(ds_it, EINA_TRUE);
- elm_diskselector_round_set(di, rnd);
+ elm_diskselector_round_enabled_set(di, rnd);
return di;
}
elm_box_pack_end(bx, disk);
evas_object_show(disk);
evas_object_smart_callback_add(disk, "selected", _print_disk_info_cb, NULL);
- elm_diskselector_side_label_length_set(disk, 4);
+ elm_diskselector_side_text_max_length_set(disk, 4);
disk = elm_diskselector_add(win);
ic = elm_icon_add(win);
elm_diskselector_item_append(disk, "Thursday", NULL, NULL, NULL);
elm_diskselector_item_append(disk, "Friday", NULL, NULL, NULL);
elm_diskselector_item_append(disk, "Saturday", NULL, NULL, NULL);
- elm_diskselector_round_set(disk, EINA_TRUE);
+ elm_diskselector_round_enabled_set(disk, EINA_TRUE);
evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, disk);
elm_diskselector_item_append(disk, "والشريعة", NULL, NULL, NULL);
elm_diskselector_item_append(disk, "עִבְרִית", NULL, NULL, NULL);
elm_diskselector_item_append(disk, "Grüßen", NULL, NULL, NULL);
- elm_diskselector_round_set(disk, EINA_TRUE);
+ elm_diskselector_round_enabled_set(disk, EINA_TRUE);
evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, disk);
}
elm_diskselector_item_selected_set(ds_it, EINA_TRUE);
- elm_diskselector_round_set(disk, EINA_TRUE);
+ elm_diskselector_round_enabled_set(disk, EINA_TRUE);
evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, disk);
}
elm_diskselector_item_selected_set(ds_it, EINA_TRUE);
- elm_diskselector_round_set(disk, EINA_TRUE);
+ elm_diskselector_round_enabled_set(disk, EINA_TRUE);
evas_object_size_hint_weight_set(disk, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(disk, EVAS_HINT_FILL, 0.5);
elm_box_pack_end(bx, disk);
elm_box_pack_end(bx, ds);
for (i = 0; i < sizeof(lbl) / sizeof(lbl[0]); i++)
elm_diskselector_item_append(ds, lbl[i], NULL, NULL, NULL);
- elm_diskselector_round_set(ds, EINA_TRUE);
- elm_diskselector_side_label_length_set(ds, 2);
+ elm_diskselector_round_enabled_set(ds, EINA_TRUE);
+ elm_diskselector_side_text_max_length_set(ds, 2);
evas_object_show(ds);
/* display more than 3 items */
#include <elm_cursor.h> // OK
#include <elm_datetime.h> // OK
#include <elm_debug.h> // OK
-#include <elm_diskselector.h>
+#include <elm_diskselector.h> // OK
// Chuneon Park
//#include <elm_factory.h> // OK
/**
* Get the side labels max length.
*
- * @deprecated use elm_diskselector_side_label_length_get() instead:
+ * @deprecated use elm_diskselector_side_text_max_length_get() instead:
*
* @param obj The diskselector object.
* @return The max length defined for side labels, or 0 if not a valid
/**
* Set the side labels max length.
*
- * @deprecated use elm_diskselector_side_label_length_set() instead:
+ * @deprecated use elm_diskselector_side_text_max_length_set() instead:
*
* @param obj The diskselector object.
* @param len The max length defined for side labels.
*
* An item with label "January" would be displayed on side position as
* "Jan" if max length is set to 3 with function
- * elm_diskselector_side_label_length_set(), or "Janu", if this property
+ * elm_diskselector_side_text_max_length_set(), or "Janu", if this property
* is set to 4.
*
* When this @p item is selected, the entire label will be displayed,
* elm_diskselector_item_append(), it will be already
* displayed by the item.
*
- * @see elm_diskselector_side_label_length_set()
+ * @see elm_diskselector_side_text_max_length_set()
* @see elm_diskselector_item_label_get()
* @see elm_diskselector_item_append()
*
*/
EINA_DEPRECATED EAPI void elm_genlist_item_middle_show(Elm_Object_Item *it);
+/**
+ * Enable or disable round mode.
+ *
+ * @param obj The diskselector object.
+ * @param round @c EINA_TRUE to enable round mode or @c EINA_FALSE to
+ * disable it.
+ *
+ * Disabled by default. If round mode is enabled the items list will
+ * work like a circle list, so when the user reaches the last item,
+ * the first one will popup.
+ *
+ * @see elm_diskselector_round_enabled_get()
+ *
+ * @deprecated elm_diskselector_round_enabled_set()
+ */
+EINA_DEPRECATED EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool round);
+
+/**
+ * Get a value whether round mode is enabled or not.
+ *
+ * @see elm_diskselector_round_enabled_set() for details.
+ *
+ * @param obj The diskselector object.
+ * @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
+ * it's disabled. If @p obj is @c NULL, @c EINA_FALSE is returned.
+ *
+ * @deprecated elm_diskselector_round_enabled_get()
+ */
+EINA_DEPRECATED EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj);
+
+/**
+ * Get the side labels max length.
+ *
+ * @see elm_diskselector_side_text_max_length_set() for details.
+ *
+ * @param obj The diskselector object.
+ * @return The max length defined for side labels, or 0 if not a valid
+ * diskselector.
+ *
+ * @deprecated elm_diskselector_side_text_max_length_get()
+ */
+EINA_DEPRECATED EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj);
+
+/**
+ * Set the side labels max length.
+ *
+ * @param obj The diskselector object.
+ * @param len The max length defined for side labels.
+ *
+ * Length is the number of characters of items' label that will be
+ * visible when it's set on side positions. It will just crop
+ * the string after defined size. E.g.:
+ *
+ * An item with label "January" would be displayed on side position as
+ * "Jan" if max length is set to 3, or "Janu", if this property
+ * is set to 4.
+ *
+ * When it's selected, the entire label will be displayed, except for
+ * width restrictions. In this case label will be cropped and "..."
+ * will be concatenated.
+ *
+ * Default side label max length is 3.
+ *
+ * This property will be applied over all items, included before or
+ * later this function call.
+ *
+ * @deprecated elm_diskselector_side_text_max_length_set()
+ */
+EINA_DEPRECATED EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len);
/**
* @}
}
EAPI Eina_Bool
-elm_diskselector_round_get(const Evas_Object *obj)
+elm_diskselector_round_enabled_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI void
-elm_diskselector_round_set(Evas_Object * obj, Eina_Bool rnd)
+elm_diskselector_round_enabled_set(Evas_Object * obj, Eina_Bool enabled)
{
Eina_List *elist;
Elm_Diskselector_Item *it;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- if (wd->round == rnd)
+ if (wd->round == enabled)
return;
- wd->round = rnd;
- if (rnd)
+ wd->round = !!enabled;
+ if (enabled)
{
wd->r_items = eina_list_clone(wd->items);
elm_box_unpack(wd->main_box, wd->left_blank);
}
EAPI int
-elm_diskselector_side_label_length_get(const Evas_Object *obj)
+elm_diskselector_side_text_max_length_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) 0;
Widget_Data *wd = elm_widget_data_get(obj);
}
EAPI void
-elm_diskselector_side_label_length_set(Evas_Object *obj, int len)
+elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
* Enable or disable round mode.
*
* @param obj The diskselector object.
- * @param rnd @c EINA_TRUE to enable round mode or @c EINA_FALSE to
+ * @param enabled @c EINA_TRUE to enable round mode or @c EINA_FALSE to
* disable it.
*
* Disabled by default. If round mode is enabled the items list will
- * work like a circle list, so when the user reaches the last item,
+ * work like a circular list, so when the user reaches the last item,
* the first one will popup.
*
- * @see elm_diskselector_round_get()
+ * @see elm_diskselector_round_enabled_get()
*
* @ingroup Diskselector
*/
-EAPI void elm_diskselector_round_set(Evas_Object *obj, Eina_Bool rnd);
+EAPI void elm_diskselector_round_enabled_set(Evas_Object *obj, Eina_Bool enabled);
/**
* Get a value whether round mode is enabled or not.
*
- * @see elm_diskselector_round_set() for details.
+ * @see elm_diskselector_round_enabled_set() for details.
*
* @param obj The diskselector object.
* @return @c EINA_TRUE means round mode is enabled. @c EINA_FALSE indicates
*
* @ingroup Diskselector
*/
-EAPI Eina_Bool elm_diskselector_round_get(const Evas_Object *obj);
+EAPI Eina_Bool elm_diskselector_round_enabled_get(const Evas_Object *obj);
/**
* Get the side labels max length.
*
- * @see elm_diskselector_side_label_length_set() for details.
+ * @see elm_diskselector_side_text_max_length_set() for details.
*
* @param obj The diskselector object.
* @return The max length defined for side labels, or 0 if not a valid
*
* @ingroup Diskselector
*/
-EAPI int elm_diskselector_side_label_length_get(const Evas_Object *obj);
+EAPI int elm_diskselector_side_text_max_length_get(const Evas_Object *obj);
/**
* Set the side labels max length.
*
* @ingroup Diskselector
*/
-EAPI void elm_diskselector_side_label_length_set(Evas_Object *obj, int len);
+EAPI void elm_diskselector_side_text_max_length_set(Evas_Object *obj, int len);
/**
* Set the number of items to be displayed.
* The selected item always will be centered on diskselector, with
* full label displayed, i.e., max length set to side labels won't
* apply on the selected item. More details on
- * elm_diskselector_side_label_length_set().
+ * elm_diskselector_side_text_max_length_set().
*
* @ingroup Diskselector
*/
elm_object_item_del_cb_set(item, _diskselector_item_free_cb);
}
}
- elm_diskselector_side_label_length_set(diskselector, text_len);
+ elm_diskselector_side_text_max_length_set(diskselector, text_len);
evas_object_geometry_get(obj, &x, &y, &w, &h);
evas_object_geometry_get(elm_widget_top_get(ctx_mod->mod_data.base), NULL, NULL, &width, NULL);
if (display_item_num < DISKSELECTOR_MIN_ITEMS)
display_item_num = DISKSELECTOR_MIN_ITEMS;
elm_diskselector_display_item_num_set(diskselector, display_item_num);
- elm_diskselector_round_set(diskselector, EINA_TRUE);
+ elm_diskselector_round_enabled_set(diskselector, EINA_TRUE);
elm_ctxpopup_direction_priority_set(ctx_mod->ctxpopup, ELM_CTXPOPUP_DIRECTION_DOWN,
ELM_CTXPOPUP_DIRECTION_UP, -1, -1);