widget: add radio support.

This commit is contained in:
Daniel Juyung Seo 2013-07-21 15:17:05 +09:00
parent 11f90e551d
commit c9d5a1f188
1 changed files with 39 additions and 0 deletions

View File

@ -1265,6 +1265,44 @@ _widget_progressbar_create(const char *style2)
return o;
}
static Evas_Object *
_widget_radio_create(const char *style)
{
Evas_Object *box, *o, *group;
box = o = elm_box_add(win);
EXPAND(o); FILL(o);
evas_object_show(o);
group = o = elm_radio_add(win);
WEIGHT(o, EVAS_HINT_EXPAND, 0.0); FILL(o);
elm_radio_state_value_set(o, 1);
elm_object_style_set(o, style);
elm_object_text_set(o, "Tiffany");
elm_box_pack_end(box, o);
evas_object_show(o);
o = elm_radio_add(win);
WEIGHT(o, EVAS_HINT_EXPAND, 0.0); FILL(o);
elm_radio_state_value_set(o, 2);
elm_radio_group_add(o, group);
elm_object_text_set(o, "Jessica");
elm_object_style_set(o, style);
elm_box_pack_end(box, o);
evas_object_show(o);
o = elm_radio_add(win);
WEIGHT(o, EVAS_HINT_EXPAND, 0.0); FILL(o);
elm_radio_state_value_set(o, 3);
elm_radio_group_add(o, group);
elm_object_text_set(o, "Yuna");
elm_object_style_set(o, style);
elm_box_pack_end(box, o);
evas_object_show(o);
return box;
}
static Evas_Object *
_widget_separator_create(const char *orig_style)
{
@ -1564,6 +1602,7 @@ widget_create(Widget_Type widget, const char *orig_style)
ADD_WIDGET(player, ETV_ID_PLAYER, style);
ADD_WIDGET(pointer, ETV_ID_POINTER, style);
ADD_WIDGET(progressbar, ETV_ID_PROGRESSBAR, orig_style);
ADD_WIDGET(radio, ETV_ID_RADIO, style);
ADD_WIDGET(separator, ETV_ID_SEPARATOR, orig_style);
ADD_WIDGET2(slider, ETV_ID_SLIDER, orig_style, style);
ADD_WIDGET(spinner, ETV_ID_SPINNER, style);