summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2012-01-02 09:00:33 +0000
committerChunEon Park <hermet@hermet.pe.kr>2012-01-02 09:00:33 +0000
commit35356124b2fcf7605ff850953cc87dae14d039eb (patch)
treef367ab9157d7e3757194f3dc0ea60eb6ca38bc3b /src
parent95b81e728f44c37a8c26e27c8474949e1c92cfac (diff)
elementry/multibuttonentry - need to use ELM_WIDGET_ITEM internally.
SVN revision: 66735
Diffstat (limited to 'src')
-rw-r--r--src/lib/elc_multibuttonentry.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/lib/elc_multibuttonentry.c b/src/lib/elc_multibuttonentry.c
index 411d1d481..7b195a76b 100644
--- a/src/lib/elc_multibuttonentry.c
+++ b/src/lib/elc_multibuttonentry.c
@@ -36,7 +36,7 @@ typedef enum _Multibuttonentry_View_State
36 36
37struct _Multibuttonentry_Item 37struct _Multibuttonentry_Item
38 { 38 {
39 Evas_Object *multibuttonentry; 39 ELM_WIDGET_ITEM;
40 Evas_Object *button; 40 Evas_Object *button;
41 void *data; 41 void *data;
42 Evas_Coord vw, rw; // vw: visual width, real width 42 Evas_Coord vw, rw; // vw: visual width, real width
@@ -672,7 +672,7 @@ _del_button_item(Elm_Multibuttonentry_Item *item)
672 if (!item) return; 672 if (!item) return;
673 Widget_Data *wd; 673 Widget_Data *wd;
674 674
675 Evas_Object *obj = item->multibuttonentry; 675 Evas_Object *obj = WIDGET(item);
676 wd = elm_widget_data_get(obj); 676 wd = elm_widget_data_get(obj);
677 if (!wd) return; 677 if (!wd) return;
678 EINA_LIST_FOREACH(wd->items, l, _item) 678 EINA_LIST_FOREACH(wd->items, l, _item)
@@ -790,12 +790,11 @@ _add_button_item(Evas_Object *obj, const char *str, Multibuttonentry_Pos pos, co
790 evas_object_show(btn); 790 evas_object_show(btn);
791 791
792 // append item list 792 // append item list
793 item = ELM_NEW(Elm_Multibuttonentry_Item); 793 item = elm_widget_item_new(obj, Elm_Multibuttonentry_Item);
794 if (item) 794 if (item)
795 { 795 {
796 Evas_Coord rw, vw; 796 Evas_Coord rw, vw;
797 _resize_button(btn, &rw, &vw); 797 _resize_button(btn, &rw, &vw);
798 item->multibuttonentry = obj;
799 item->button = btn; 798 item->button = btn;
800 item->data = data; 799 item->data = data;
801 item->rw = rw; 800 item->rw = rw;
@@ -1520,8 +1519,8 @@ elm_multibuttonentry_item_select(Elm_Multibuttonentry_Item *item, Eina_Bool sele
1520 Elm_Multibuttonentry_Item *_item; 1519 Elm_Multibuttonentry_Item *_item;
1521 1520
1522 if (!item) return; 1521 if (!item) return;
1523 ELM_CHECK_WIDTYPE(item->multibuttonentry, widtype); 1522 ELM_CHECK_WIDTYPE(WIDGET(item), widtype);
1524 wd = elm_widget_data_get(item->multibuttonentry); 1523 wd = elm_widget_data_get(WIDGET(item));
1525 if (!wd) return; 1524 if (!wd) return;
1526 1525
1527 EINA_LIST_FOREACH(wd->items, l, _item) 1526 EINA_LIST_FOREACH(wd->items, l, _item)
@@ -1529,9 +1528,9 @@ elm_multibuttonentry_item_select(Elm_Multibuttonentry_Item *item, Eina_Bool sele
1529 if (_item == item) 1528 if (_item == item)
1530 { 1529 {
1531 if (selected) 1530 if (selected)
1532 _select_button(item->multibuttonentry, item->button); 1531 _select_button(WIDGET(item), item->button);
1533 else 1532 else
1534 _select_button(item->multibuttonentry, NULL); 1533 _select_button(WIDGET(item), NULL);
1535 } 1534 }
1536 } 1535 }
1537} 1536}
@@ -1582,8 +1581,8 @@ elm_multibuttonentry_item_label_get(const Elm_Multibuttonentry_Item *item)
1582 Eina_List *l; 1581 Eina_List *l;
1583 Elm_Multibuttonentry_Item *_item; 1582 Elm_Multibuttonentry_Item *_item;
1584 if (!item) return NULL; 1583 if (!item) return NULL;
1585 ELM_CHECK_WIDTYPE(item->multibuttonentry, widtype) NULL; 1584 ELM_CHECK_WIDTYPE(WIDGET(item), widtype) NULL;
1586 wd = elm_widget_data_get(item->multibuttonentry); 1585 wd = elm_widget_data_get(WIDGET(item));
1587 if (!wd || !wd->items) return NULL; 1586 if (!wd || !wd->items) return NULL;
1588 1587
1589 EINA_LIST_FOREACH(wd->items, l, _item) 1588 EINA_LIST_FOREACH(wd->items, l, _item)
@@ -1602,8 +1601,8 @@ elm_multibuttonentry_item_label_set(Elm_Multibuttonentry_Item *item, const char
1602 Eina_List *l; 1601 Eina_List *l;
1603 Elm_Multibuttonentry_Item *_item; 1602 Elm_Multibuttonentry_Item *_item;
1604 if (!item || !str) return; 1603 if (!item || !str) return;
1605 ELM_CHECK_WIDTYPE(item->multibuttonentry, widtype); 1604 ELM_CHECK_WIDTYPE(WIDGET(item), widtype);
1606 wd = elm_widget_data_get(item->multibuttonentry); 1605 wd = elm_widget_data_get(WIDGET(item));
1607 if (!wd || !wd->items) return; 1606 if (!wd || !wd->items) return;
1608 1607
1609 EINA_LIST_FOREACH(wd->items, l, _item) 1608 EINA_LIST_FOREACH(wd->items, l, _item)
@@ -1622,8 +1621,8 @@ elm_multibuttonentry_item_prev_get(const Elm_Multibuttonentry_Item *item)
1622 Eina_List *l; 1621 Eina_List *l;
1623 Elm_Multibuttonentry_Item *_item; 1622 Elm_Multibuttonentry_Item *_item;
1624 if (!item) return NULL; 1623 if (!item) return NULL;
1625 ELM_CHECK_WIDTYPE(item->multibuttonentry, widtype) NULL; 1624 ELM_CHECK_WIDTYPE(WIDGET(item), widtype) NULL;
1626 wd = elm_widget_data_get(item->multibuttonentry); 1625 wd = elm_widget_data_get(WIDGET(item));
1627 if (!wd || !wd->items) return NULL; 1626 if (!wd || !wd->items) return NULL;
1628 1627
1629 EINA_LIST_FOREACH(wd->items, l, _item) 1628 EINA_LIST_FOREACH(wd->items, l, _item)
@@ -1644,8 +1643,8 @@ elm_multibuttonentry_item_next_get(const Elm_Multibuttonentry_Item *item)
1644 Elm_Multibuttonentry_Item *_item; 1643 Elm_Multibuttonentry_Item *_item;
1645 1644
1646 if (!item) return NULL; 1645 if (!item) return NULL;
1647 ELM_CHECK_WIDTYPE(item->multibuttonentry, widtype) NULL; 1646 ELM_CHECK_WIDTYPE(WIDGET(item), widtype) NULL;
1648 wd = elm_widget_data_get(item->multibuttonentry); 1647 wd = elm_widget_data_get(WIDGET(item));
1649 if (!wd || !wd->items) return NULL; 1648 if (!wd || !wd->items) return NULL;
1650 1649
1651 EINA_LIST_FOREACH(wd->items, l, _item) 1650 EINA_LIST_FOREACH(wd->items, l, _item)