{
const char *selectraise;
if ((it->wd->select_mode == ELM_OBJECT_SELECT_MODE_NONE) ||
- (it->wd->no_highlight) ||
+ (!it->wd->highlight) ||
(it->generation < it->wd->generation) ||
(it->highlighted) || elm_widget_item_disabled_get(it) ||
(it->select_mode == ELM_OBJECT_SELECT_MODE_NONE) || (it->item->mode_view) ||
wd->item_cache_count--;
if (itc->spacer) evas_object_del(itc->spacer);
if (itc->base_view) evas_object_del(itc->base_view);
- if (itc->item_style) eina_stringshare_del(itc->item_style);
+ eina_stringshare_del(itc->item_style);
free(itc);
}
evas_event_thaw(evas_object_evas_get(wd->obj));
}
else
_item_auto_scroll(sd->wd);
+
evas_event_thaw(evas_object_evas_get(obj));
evas_event_thaw_eval(evas_object_evas_get(obj));
}
_multi_move, it);
_item_text_realize(it, it->edit_obj, &it->item->edit_texts, NULL);
- if (it->flipped)
- edje_object_signal_emit(it->edit_obj, "elm,state,flip,enabled", "elm");
+ if (it->flipped) edje_object_signal_emit(it->edit_obj, "elm,state,flip,enabled", "elm");
it->item->edit_content_objs =
_item_mode_content_realize(it, it->edit_obj, &it->contents,
NULL, &it->item->edit_content_objs,
"decorate_contents"); //FIXME
_item_state_realize(it, it->edit_obj, &it->item->edit_states, NULL);
- edje_object_part_swallow(it->edit_obj, "elm.swallow.decorate.content",
- VIEW(it));
+ edje_object_part_swallow(it->edit_obj, "elm.swallow.decorate.content", VIEW(it));
_decorate_mode_item_position(it, it->item->scrl_x, it->item->scrl_y);
evas_object_show(it->edit_obj);
wd->max_items_per_block = MAX_ITEMS_PER_BLOCK;
wd->item_cache_max = wd->max_items_per_block * 2;
wd->longpress_timeout = _elm_config->longpress_timeout;
+ wd->highlight = EINA_TRUE;
wd->tree_effect_enabled = _elm_config->effect_enable;
evas_object_smart_callback_add(obj, "scroll-hold-on", _hold_on, obj);
return EINA_TRUE;
}
+static void
+_item_signal_emit_hook(Elm_Object_Item *it,
+ const char *emission,
+ const char *source)
+{
+ elm_object_signal_emit(VIEW(it), emission, source);
+}
+
Elm_Gen_Item *
_elm_genlist_item_new(Widget_Data *wd,
const Elm_Gen_Item_Class *itc,
elm_widget_item_text_get_hook_set(it, _item_text_hook);
elm_widget_item_disable_hook_set(it, _item_disable_hook);
elm_widget_item_del_pre_hook_set(it, _item_del_pre_hook);
+ elm_widget_item_signal_emit_hook_set(it, _item_signal_emit_hook);
+
/* TEMPORARY */
it->sel_cb = (Ecore_Cb)_item_select;
it->item = ELM_NEW(Elm_Gen_Item_Type);
it->item->type = type;
if (type & ELM_GENLIST_ITEM_GROUP) it->group++;
- it->mouse_cursor = NULL;
-it->item->expanded_depth = 0;
+ it->item->expanded_depth = 0;
ELM_GEN_ITEM_SETUP(it);
+ it->mouse_cursor = NULL;
it->can_focus = EINA_TRUE;
if (it->parent)
{
return EINA_FALSE;
}
-static Eina_Bool _elm_genlist_item_compute_coordinates(
- Elm_Object_Item *it,
- Elm_Genlist_Item_Scrollto_Type type,
- Evas_Coord *x,
- Evas_Coord *y,
- Evas_Coord *w,
- Evas_Coord *h)
+static Eina_Bool
+_elm_genlist_item_compute_coordinates(Elm_Object_Item *it,
+ Elm_Genlist_Item_Scrollto_Type type,
+ Evas_Coord *x,
+ Evas_Coord *y,
+ Evas_Coord *w,
+ Evas_Coord *h)
{
Elm_Gen_Item *_it = (Elm_Gen_Item *)it;
Evas_Coord gith = 0;
}
EAPI const char *
-elm_genlist_item_decorate_mode_get(const Evas_Object *obj)
+elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it)
{
- ELM_CHECK_WIDTYPE(obj, widtype) NULL;
- Widget_Data *wd = elm_widget_data_get(obj);
- if (!wd) return NULL;
- return wd->decorate_type;
+ ELM_OBJ_ITEM_CHECK_OR_RETURN(it, NULL);
+ Elm_Gen_Item *_it = (Elm_Gen_Item *)it;
+ return _it->wd->decorate_type;
}
EAPI const Elm_Object_Item *
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
- highlight = !!highlight;
- wd->no_highlight = !highlight;
+ wd->highlight = !!highlight;
}
EAPI Eina_Bool
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
- return !wd->no_highlight;
+ return wd->highlight;
}
EAPI void
* - @c item_style - This is a constant string and simply defines the name
* of the item style. It @b must be specified and the default should be @c
* "default".
- * - @c mode_item_style - This is a constant string and simply defines the name
- * of the mode item style. It is used to specify mode item style. It can be
- * used to set sweep mode.
* - @c decorate_item_style - This is a constant string and simply defines the name
- * of the decorate item style. It is used to specify decorate item style. It can be
- * used to set selection, checking and deletion mode.
+ * of the decorate mode item style. It is used to specify decorate mode item style. It can be
+ * used when you call elm_genlist_item_decorate_mode_set().
+ * - @c decorate_all_item_style - This is a constant string and simply defines the name
+ * of the decorate all item style. It is used to specify decorate all item style. It can be
+ * used to set selection, checking and deletion mode. This is used when you
+ * call elm_genlist_decorate_mode_set().
* - @c func - A struct with pointers to functions that will be called when
* an item is going to be actually created. All of them receive a @c data
* parameter that will point to the same data passed to
* @li elm_object_item_part_text_get()
* @li elm_object_item_disabled_set()
* @li elm_object_item_disabled_get()
+ * @li elm_object_item_signal_emit()
*
* @section Genlist_Examples Examples
*
ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2) /**< to the middle of viewport */
} Elm_Genlist_Item_Scrollto_Type;
-typedef enum
-{
- ELM_GENLIST_TREE_EFFECT_NONE = 0,
- ELM_GENLIST_TREE_EFFECT_EXPAND = 1,
- ELM_GENLIST_TREE_EFFECT_CONTRACT = 2
-} Elm_Genlist_Item_Move_Effect_Mode;
-
/**
* @see Elm_Gen_Item_Class
*/
EAPI void elm_genlist_item_decorate_mode_set(Elm_Object_Item *it, const char *decorate_type, Eina_Bool mode_set);
/**
- * Get the last (or current) genlist mode used.
+ * Get the item's decorate mode.
*
* @param obj The genlist object
*
- * This function just returns the name of the last used genlist mode. It will
- * be the current mode if it's still active.
+ * This function just returns the name of the item's decorate mode.
*
* @see elm_genlist_item_decorate_mode_set()
* @see elm_genlist_decorated_item_get()
*
* @ingroup Genlist
*/
-EAPI const char *elm_genlist_item_decorate_mode_get(const Evas_Object *obj);
+EAPI const char *elm_genlist_item_decorate_mode_get(const Elm_Object_Item *it);
/**
* Get active genlist mode item