Eina_Bool on_hold : 1;
Eina_Bool multi : 1; /**< a flag for item multi selection */
Eina_Bool wasselected : 1;
+ Eina_Bool no_highlight : 1;
Eina_Bool clear_me : 1; /**< a flag whether genlist is marked as to be cleared or not. if this flag is true, genlist clear was already deferred. */
Eina_Bool h_bounce : 1;
Eina_Bool v_bounce : 1;
static void
_item_highlight(Elm_Gen_Item *it)
{
- if ((it->wd->select_mode == ELM_OBJECT_NO_SELECT) || (it->generation < it->wd->generation) || (it->highlighted)) return;
+ if ((it->wd->select_mode == ELM_OBJECT_NO_SELECT) ||
+ (it->wd->no_highlight) || (it->highlighted) ||
+ (it->generation < it->wd->generation)) return;
edje_object_signal_emit(VIEW(it), "elm,state,selected", "elm");
it->highlighted = EINA_TRUE;
}
{
return elm_genlist_select_mode_get(obj);
}
+
+EAPI void
+elm_gengrid_hilight_mode_set(Evas_Object *obj,
+ Eina_Bool hilight)
+{
+ elm_genlist_hilight_mode_set(obj, hilight);
+}
+
+EAPI Eina_Bool
+elm_gengrid_hilight_mode_get(const Evas_Object *obj)
+{
+ return elm_genlist_hilight_mode_get(obj);
+}
+
elm_gengrid_select_mode_get(const Evas_Object *obj);
/**
+ * Set whether the gengrid items' should be hilighted when item selected.
+ *
+ * @param obj The gengrid object.
+ * @param hilight @c EINA_TRUE to enable hilight or @c EINA_FALSE to
+ * disable it.
+ *
+ * This will turn on/off the hilight effect when items are selected and
+ * they will or will not be hilighted. The selected and clicked
+ * callback functions will still be called.
+ *
+ * hilight is enabled by default.
+ *
+ * @see elm_gengrid_hilight_mode_get().
+ *
+ * @ingroup Gengrid
+ */
+
+EAPI void
+elm_gengrid_hilight_mode_set(Evas_Object *obj,
+ Eina_Bool hilight);
+
+/**
+ * Get whether the gengrid items' should be hilighted when item selected.
+ *
+ * @param obj The gengrid object.
+ * @return @c EINA_TRUE means items can be hilighted. @c EINA_FALSE indicates
+ * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned.
+ *
+ * @see elm_gengrid_hilight_mode_set() for details.
+ *
+ * @ingroup Gengrid
+ */
+
+EAPI Eina_Bool
+elm_gengrid_hilight_mode_get(const Evas_Object *obj);
+
+/**
* @}
*/
{
const char *selectraise;
if ((it->wd->select_mode == ELM_OBJECT_NO_SELECT) ||
+ (it->wd->no_highlight) ||
(it->generation < it->wd->generation) ||
(it->highlighted) || elm_widget_item_disabled_get(it) ||
(it->display_only) || (it->item->mode_view))
return wd->select_mode;
}
+EAPI void
+elm_genlist_hilight_mode_set(Evas_Object *obj,
+ Eina_Bool hilight)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype);
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return;
+ hilight = !!hilight;
+ wd->no_highlight = !hilight;
+}
+
+EAPI Eina_Bool
+elm_genlist_hilight_mode_get(const Evas_Object *obj)
+{
+ ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
+ Widget_Data *wd = elm_widget_data_get(obj);
+ if (!wd) return EINA_FALSE;
+ return !wd->no_highlight;
+}
+
/* for gengrid as of now */
void
_elm_genlist_page_relative_set(Evas_Object *obj,
elm_genlist_select_mode_get(const Evas_Object *obj);
/**
+ * Set whether the genlist items' should be highlighted when item selected.
+ *
+ * @param obj The genlist object.
+ * @param hilight @c EINA_TRUE to enable hilighting or @c EINA_FALSE to
+ * disable it.
+ *
+ * This will turn on/off the highlight effect when item selection and
+ * they will, or will not highlighted. The selected and clicked
+ * callback functions will still be called.
+ *
+ * Highlight is enabled by default.
+ *
+ * @see elm_genlist_hilight_mode_get().
+ *
+ * @ingroup Genlist
+ */
+
+EAPI void
+elm_genlist_hilight_mode_set(Evas_Object *obj,
+ Eina_Bool hilight);
+
+/**
+ * Get whether the genlist items' should be hilighted when item selected.
+ *
+ * @param obj The genlist object.
+ * @return @c EINA_TRUE means items can be hilighted. @c EINA_FALSE indicates
+ * they can't. If @p obj is @c NULL, @c EINA_FALSE is returned.
+ *
+ * @see elm_genlist_hilight_mode_set() for details.
+ *
+ * @ingroup Genlist
+ */
+
+EAPI Eina_Bool
+elm_genlist_hilight_mode_get(const Evas_Object *obj);
+
+/**
* @}
*/