{
Marker_Data *d = data;
- Evas_Object *o = evas_object_image_add(evas_object_evas_get(obj));
- evas_object_image_file_set(o, d->file, NULL);
- evas_object_image_filled_set(o, EINA_TRUE);
- evas_object_size_hint_min_set(o, 64, 64);
- evas_object_show(o);
-
- return o;
+ Evas_Object *bx = elm_box_add(obj);
+ evas_object_show(bx);
+
+ if(d == &data3)
+ {
+ Evas_Object *icon = elm_icon_add(obj);
+ elm_icon_file_set(icon, d->file, NULL);
+ evas_object_show(icon);
+
+ Evas_Object *o = elm_button_add(obj);
+ elm_button_icon_set(o, icon);
+ evas_object_show(o);
+ elm_box_pack_end(bx, o);
+ }
+ else
+ {
+ Evas_Object *o = evas_object_image_add(evas_object_evas_get(obj));
+ evas_object_image_file_set(o, d->file, NULL);
+ evas_object_image_filled_set(o, EINA_TRUE);
+ evas_object_size_hint_min_set(o, 64, 64);
+ evas_object_show(o);
+ elm_box_pack_end(bx, o);
+
+ Evas_Object *lbl = elm_label_add(obj);
+ elm_label_label_set(lbl, "Wolves Go !");
+ evas_object_show(lbl);
+ elm_box_pack_end(bx, lbl);
+ }
+
+ return bx;
}
void
double lon, lat;
} center_on;
+ Ecore_Job *markers_place_job;
Eina_List *markers[19];
Evas_Coord marker_w, marker_h;
Evas_Coord marker_max_w, marker_max_h;
static void _group_bubble_content_update(Marker_Group *group);
static void _group_bubble_content_free(Marker_Group *group);
static void marker_place(Evas_Object *obj, Grid *g, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh);
+static void _bubble_sc_hits_changed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void
rect_place(Evas_Object *obj, Evas_Coord px, Evas_Coord py, Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
{
EINA_LIST_FREE(group->markers, marker)
{
+ evas_object_event_callback_del_full(group->sc, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _bubble_sc_hits_changed_cb, group);
if(free_marker)
free(marker);
}
_group_bubble_place(group);
}
+static void _bubble_sc_hits_changed_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ _group_bubble_place(data);
+}
+
static void
_group_bubble_content_update(Marker_Group *group)
{
Eina_List *l;
Elm_Map_Marker *marker;
+ Evas_Coord h;
if(!group->bubble) return ;
evas_object_show(group->bx);
elm_scroller_content_set(group->sc, group->bx);
+
+ evas_object_event_callback_add(group->sc, EVAS_CALLBACK_RESIZE,
+ _bubble_sc_hits_changed_cb, group);
}
EINA_LIST_FOREACH(group->markers, l, marker)
_group_bubble_free(Marker_Group *group)
{
if(!group->bubble) return ;
+
+ evas_object_event_callback_del_full(group->sc, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
+ _bubble_sc_hits_changed_cb, group);
evas_object_del(group->bubble);
evas_object_del(group->rect);
group->bubble = NULL;
Evas_Coord xx, yy, ww, hh;
const char *s;
- if(!group->bubble) return ;
+ if(!group->bubble || !group->obj) return ;
+
+ evas_object_geometry_get(group->obj, &x, &y, &w, NULL);
+ edje_object_size_min_calc(group->bubble, NULL, &hh);
- evas_object_geometry_get(group->obj, &x, &y, &w, &h);
s = edje_object_data_get(group->bubble, "size_w");
ww = atoi(s);
- s = edje_object_data_get(group->bubble, "size_h");
- hh = atoi(s);
xx = x+w/2-ww/2;
yy = y-hh;