[multibuttonentry] signals(expanded, contracted) added
authorHyunsil <hyunsil.park@samsung.com>
Tue, 14 Sep 2010 07:56:23 +0000 (16:56 +0900)
committerHyunsil <hyunsil.park@samsung.com>
Tue, 14 Sep 2010 07:56:23 +0000 (16:56 +0900)
src/lib/elm_multibuttonentry.c

index 1a48379..0d5aedb 100755 (executable)
@@ -132,9 +132,17 @@ static void
 _resize_cb(void *data, Evas *evas, Evas_Object *obj, void *event)\r
 {\r
        Widget_Data *wd = elm_widget_data_get(data);\r
+       Evas_Coord w, h;\r
        if (!wd) return;\r
 \r
-       evas_object_geometry_get(wd->box, NULL, NULL, &wd->w_box, &wd->h_box);  \r
+       evas_object_geometry_get(wd->box, NULL, NULL, &w, &h);\r
+\r
+       if(wd->h_box < h) evas_object_smart_callback_call(data, "expanded", NULL);\r
+       else if(wd->h_box > h) evas_object_smart_callback_call(data, "contracted", NULL);\r
+       else ;\r
+\r
+       wd->w_box = w;\r
+       wd->h_box = h;\r
 }\r
 \r
 static void\r
@@ -252,7 +260,6 @@ _del_button_item(Elm_Multibuttonentry_Item *item)
                if (_item == item) {\r
                        wd->items = eina_list_remove(wd->items, _item);\r
                        elm_box_unpack(wd->box, _item->button);\r
-                       //_sizing_eval(obj);\r
                        _del_button_obj(obj, _item->button);\r
                        free(_item);\r
                        if(wd->current == l)    \r
@@ -356,8 +363,6 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co
 \r
        evas_object_smart_callback_call(obj, "added", item);\r
 \r
-       //_sizing_eval(obj);\r
-\r
        return item;\r
 }\r
 \r
@@ -453,7 +458,6 @@ elm_multibuttonentry_add(Evas_Object *parent)
        \r
        _view_init(obj);\r
        _event_init(obj);\r
-       //_sizing_eval(obj);\r
 \r
        return obj;\r
 }\r